Skip to main content

Attendance & Timesheets Module

The Attendance module (src/features/attendance/) manages daily work logs, weekly timesheets, manager approvals, and attendance policies.


Routes & Access

RouteComponentRequired PermissionsPurpose
/attendanceAttendancePageAuthenticatedTimesheets dashboard with My(individual/personal), Team, and All tabs
/attendance/:idTimesheetDetailAuthenticatedDetailed daily breakdown and approval controls for a timesheet
/admin/attendance-policies/newAttendancePolicyWizardPageATTENDANCE_POLICY_CREATEMulti-step attendance policy creation wizard
/admin/attendance-policies/:id/editAttendancePolicyWizardPageATTENDANCE_POLICY_UPDATEEdit existing policy rules & working hour thresholds
/admin/attendance-policies/:id/summaryAttendancePolicySummaryPageATTENDANCE_POLICY_READPolicy assignment & affected employees overview

Timesheet Lifecycle & State Machine

┌──────────────┐
│ DRAFT │ ◄── (Reopened by Manager)
└──────┬───────┘
│ (Employee submits timesheet)

┌──────────────┐
│ SUBMITTED │
└───┬──────┬───┘
│ │
(Approve) │ │ (Reject / Decline)
▼ ▼
┌────────────┐ ┌────────────┐
│ APPROVED │ │ REJECTED │
└────────────┘ └────────────┘

Timesheet Status Definitions

StatusColor BadgeDescription
DRAFTAmber (#825b01 / #fcedc8)Editable by employee; entries can be added or updated
SUBMITTEDInfo Blue (#0088ff)Locked for editing; pending manager review
APPROVEDGreen (#2d9a6b)Finalized and counted toward payroll / records
REJECTEDRed (#ff383c)Returned to employee with reviewer comments for correction

Clock-In / Clock-Out Flow

  1. Located directly in MyTimesheets.tsx.
  2. Checks current date and timestamp.
  3. Invokes attendanceService.clockIn() / attendanceService.clockOut().
  4. Updates the active timesheet day log and recomputes total weekly working hours dynamically.

Attendance Policies Wizard (AttendancePolicyWizardPage.tsx)

Admins configure site-wide and departmental attendance expectations:

  • Work Schedules: Standard daily working hours (e.g. 8h/day, 40h/week).
  • Core Hours & Break Durations: Required presence windows and unpaid lunch deductions.
  • Overtime & Thresholds: Overtime multiplier rules and missing clock-out tolerances.
  • Employee Assignment: Bulk assignment to specific departments or office sites.