Changed some functionallity in attendance

This commit is contained in:
ashutosh.nehete 2025-06-12 11:05:10 +05:30
parent 792529776c
commit f8ee3d3a86

View File

@ -129,14 +129,13 @@ const AttendanceLog = ({ handleModalData, projectId, showOnlyCheckout }) => {
(msg) => { (msg) => {
const { startDate, endDate } = dateRange; const { startDate, endDate } = dateRange;
const checkIn = msg.response.checkInTime.substring(0, 10); const checkIn = msg.response.checkInTime.substring(0, 10);
if ( if (
projectId === msg.projectId && projectId === msg.projectId &&
startDate <= checkIn && startDate <= checkIn &&
checkIn <= endDate checkIn <= endDate
) { ) {
const updatedAttendance = data.map((item) => const updatedAttendance = data.map((item) =>
item.employeeId === msg.response.employeeId item.id === msg.response.id
? { ...item, ...msg.response } ? { ...item, ...msg.response }
: item : item
); );