Issues_July_3W #262

Merged
vikas.nale merged 13 commits from Issues_July_3W into main 2025-07-17 11:50:25 +00:00
Showing only changes of commit b9c240261c - Show all commits

View File

@ -213,7 +213,7 @@ export const useUpdateEmployee = () =>
export const useSuspendEmployee = ({ setIsDeleteModalOpen, setemployeeLodaing }) => {
const queryClient = useQueryClient();
const selectedProject = useSelector((store)=>store.localVariables.projectId)
return useMutation({
mutationFn: (id) => {
setemployeeLodaing(true);
@ -221,12 +221,12 @@ export const useSuspendEmployee = ({ setIsDeleteModalOpen, setemployeeLodaing })
},
onSuccess: () => {
showToast("Employee deleted successfully.", "success");
// queryClient.invalidateQueries( ['allEmployee',false]);
queryClient.invalidateQueries( {queryKey: [ 'projectEmployees' ]} );
queryClient.invalidateQueries( {queryKey:[ 'employeeListByProject' ,selectedProject]} );
showToast("Employee deleted successfully.", "success");
setIsDeleteModalOpen(false);
},