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

This commit is contained in:
ashutosh.nehete 2025-06-17 17:19:02 +05:30
commit 6f247fb0e9

View File

@ -44,6 +44,24 @@ const AttendancePage = () => {
date: new Date().toLocaleDateString(),
});
const handler = useCallback(
(msg) => {
if (selectedProject == msg.projectId) {
const updatedAttendance = attendances.map((item) =>
item.employeeId === msg.response.employeeId
? { ...item, ...msg.response }
: item
);
cacheData("Attendance", {
data: updatedAttendance,
projectId: selectedProject,
});
setAttendances(updatedAttendance);
}
},
[selectedProject, attrecall]
);
const getRole = (roleId) => {
if (!empRoles) return "Unassigned";
if (!roleId) return "Unassigned";