From c53aa1ec92cb5683d722fe069d6a134fddb666f2 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Tue, 29 Apr 2025 00:56:01 +0530 Subject: [PATCH] Add activity column to logs for clearer action tracking --- src/components/Activities/AttendLogs.jsx | 32 +++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/components/Activities/AttendLogs.jsx b/src/components/Activities/AttendLogs.jsx index f8d39f7a..85424943 100644 --- a/src/components/Activities/AttendLogs.jsx +++ b/src/components/Activities/AttendLogs.jsx @@ -7,6 +7,30 @@ const AttendLogs = ({ Id }) => { const {logs, loading} = useEmployeeAttendacesLog( Id ) + const whichActivityPerform = ( actvity ) => + { + switch (actvity) { + case 1: + return "IN" + break; + case 2: + return "Requested" + break; + case 3: + return "Deleted" + break; + case 4: + return "OUT" + break; + case 5: + return "Regularized" + break; + + default: + break; + } + } + return (
{loading &&

Loading..

} @@ -21,9 +45,10 @@ const AttendLogs = ({ Id }) => { - + + - + @@ -32,7 +57,8 @@ const AttendLogs = ({ Id }) => { .sort((a, b) => b.id - a.id) .map((log, index) => ( - + +
TimeTimeActivity DateDescriptionDescription
{convertShortTime(log.activityTime)}{convertShortTime( log.activityTime )}{whichActivityPerform(log.activity)} {log.activityTime.slice(0, 10)} {log?.comment}