pramod_Task-#444 : Add "Assign Project" Feature in Employee Action Menu #191

Merged
pramod.mahajan merged 8 commits from pramod_Task-#444 into Feature_Directory 2025-06-09 05:18:40 +00:00
Showing only changes of commit 0b46dc0f1f - Show all commits

View File

@ -145,12 +145,12 @@ export const useProjectsByEmployee = ( employeeId ) =>
setError(''); // clear previous error
const res = await ProjectRepository.getProjectsByEmployee(id);
setProjectList(res.data);
cacheData('ProjectsByEmployee', { data: res.data, employeeId: id });
cacheData( 'ProjectsByEmployee', {data: res.data, employeeId: id} );
setLoading(false)
} catch (err) {
setError(err?.message || 'Failed to fetch projects');
} finally {
setLoading(false);
}
setError( err?.message || 'Failed to fetch projects' );
setLoading(false)
}
};
useEffect(() => {
@ -171,8 +171,8 @@ export const useProjectsByEmployee = ( employeeId ) =>
return {
projectList,
loading,
error
error,
refetch : fetchProjects
}
};