Merge branch 'Feature_Task_Management' of https://git.marcoaiot.com/admin/marco.pms.web into Feature_Task_Management

This commit is contained in:
Pramod Mahajan 2025-04-09 11:28:20 +05:30
commit 453c53940f

View File

@ -240,8 +240,7 @@ export const useEmployeeProfile =(employeeId)=>{
const fetchData = async () => {
const Employee_cache = getCachedData("employeeProfile");
if(!Employee_cache || Employee_cache.employeeId !== employeeId){
EmployeeRepository.getEmployeeProfile(employeeId)
.then((response) => {
setEmployees(response.data);
@ -260,7 +259,9 @@ export const useEmployeeProfile =(employeeId)=>{
};
useEffect(()=>{
fetchData(employeeId);
if(employeeId){
fetchData(employeeId);
}
},[employeeId])
return {employee,loading,error}