Changed some functionallity in attendance
This commit is contained in:
parent
792529776c
commit
f8ee3d3a86
@ -129,14 +129,13 @@ const AttendanceLog = ({ handleModalData, projectId, showOnlyCheckout }) => {
|
||||
(msg) => {
|
||||
const { startDate, endDate } = dateRange;
|
||||
const checkIn = msg.response.checkInTime.substring(0, 10);
|
||||
|
||||
if (
|
||||
projectId === msg.projectId &&
|
||||
startDate <= checkIn &&
|
||||
checkIn <= endDate
|
||||
) {
|
||||
const updatedAttendance = data.map((item) =>
|
||||
item.employeeId === msg.response.employeeId
|
||||
item.id === msg.response.id
|
||||
? { ...item, ...msg.response }
|
||||
: item
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user