Merge branch 'SingalR_Integration' of https://git.marcoaiot.com/admin/marco.pms.web into SingalR_Integration
This commit is contained in:
commit
6f247fb0e9
@ -44,6 +44,24 @@ const AttendancePage = () => {
|
|||||||
date: new Date().toLocaleDateString(),
|
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) => {
|
const getRole = (roleId) => {
|
||||||
if (!empRoles) return "Unassigned";
|
if (!empRoles) return "Unassigned";
|
||||||
if (!roleId) return "Unassigned";
|
if (!roleId) return "Unassigned";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user