Skip to main content

Time Off & Leave Management Module

The Time Off module (src/features/timeoff/) provides self-service leave requests, balance tracking, holiday calendar integration, and manager review workflows.


Routes & Components​

ComponentFile PathDescription
TimeOffPagefeatures/timeoff/components/TimeOffPage.tsxMain container with My Time Off, Team Time Off, and All Time Off tabs
MyTimeOfffeatures/timeoff/components/MyTimeOff.tsxEmployee balance cards, upcoming leaves, and request history
TeamTimeCalendarfeatures/timeoff/components/TeamTimeCalendar.tsxMonthly/weekly team schedule using FullCalendar
RequestTimeOffModalfeatures/timeoff/components/RequestTimeOffModal.tsxLeave submission dialog with balance validation
ReviewModalfeatures/timeoff/components/ReviewModal.tsxManager approval dialog with optional comments
DeclineModalfeatures/timeoff/components/DeclineModal.tsxRejection dialog requiring a mandatory rejection reason

Holiday-Aware Date Picker (HolidayAwareDatePicker.tsx)​

The leave booking form accounts for company holidays and non-working weekends:

  • Highlights regional public holidays in calendar date pickers.
  • Automatically excludes weekend days and holidays from calculated requested day counts.
  • Displays remaining balance projections in real-time before submission.

Balance Calculations & Adjustments​

  • Accrual Types: Annual entitlement, monthly accrual, carry-over limits.
  • Admin Adjustments: HR managers can grant manual adjustments (AdjustBalanceModal.tsx) with required audit justification notes.
  • Exporting: Export balances and history to CSV via BalanceExportTab.tsx and RequestsExportTab.tsx.

Leave Status Colors (timeOffColors.ts)​

StatusColor ConstantHex Value
PENDINGTIME_OFF_STATUS_PENDING#ff8d28 (Warm Orange)
APPROVEDTIME_OFF_STATUS_APPROVED#2d9a6b (Vibrant Green)
REJECTEDTIME_OFF_STATUS_REJECTED#ff383c (Crimson Red)
CANCELLEDTIME_OFF_STATUS_CANCELLED#7b7b7b (Muted Gray)