React Query Integration for Server State Sync in Clinet #245

Merged
admin merged 60 commits from react-query into main 2025-07-11 11:32:19 +00:00
Showing only changes of commit 7afea8e52a - Show all commits

View File

@ -20,7 +20,7 @@ import {useMutation} from "@tanstack/react-query";
const mobileNumberRegex = /^[0-9]\d{9}$/; const mobileNumberRegex = /^[0-9]\d{9}$/;
const ManageEmployee = ({ employeeId, onClosed }) => { const ManageEmployee = ({ employeeId, onClosed,IsAllEmployee }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const { mutate: updateEmployee, isLoading } = useUpdateEmployee(); const { mutate: updateEmployee, isLoading } = useUpdateEmployee();
@ -203,7 +203,7 @@ const { mutate: updateEmployee, isLoading } = useUpdateEmployee();
data.email = null; data.email = null;
} }
updateEmployee(data, { updateEmployee({...data,IsAllEmployee},{
onSuccess: () => { onSuccess: () => {
reset(); reset();
onClosed(); onClosed();