created new repo for attendanceByEmployee

This commit is contained in:
Pramod Mahajan 2025-05-06 15:26:14 +05:30
parent f1e3ce4504
commit c00b33926a

View File

@ -19,7 +19,21 @@ const AttendanceRepository = {
},
getAttendanceLogs: ( id ) => api.get( `api/attendance/log/attendance/${ id }` ),
getRegularizeList: (id)=> api.get(`api/attendance/regularize?projectId=${id}`)
getRegularizeList: ( id ) => api.get( `api/attendance/regularize?projectId=${ id }` ),
getAttendanceByEmployee: ( employeeId, fromDate, toDate ) =>
{
let url = `api/Attendance/log/employee/${ employeeId }?`
if (fromDate) {
url += `&dateFrom=${fromDate}`;
}
if (toDate) {
url += `&dateTo=${toDate}`;
}
return api.get(url)
},
}