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​
| Component | File Path | Description |
|---|---|---|
TimeOffPage | features/timeoff/components/TimeOffPage.tsx | Main container with My Time Off, Team Time Off, and All Time Off tabs |
MyTimeOff | features/timeoff/components/MyTimeOff.tsx | Employee balance cards, upcoming leaves, and request history |
TeamTimeCalendar | features/timeoff/components/TeamTimeCalendar.tsx | Monthly/weekly team schedule using FullCalendar |
RequestTimeOffModal | features/timeoff/components/RequestTimeOffModal.tsx | Leave submission dialog with balance validation |
ReviewModal | features/timeoff/components/ReviewModal.tsx | Manager approval dialog with optional comments |
DeclineModal | features/timeoff/components/DeclineModal.tsx | Rejection 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.tsxandRequestsExportTab.tsx.
Leave Status Colors (timeOffColors.ts)​
| Status | Color Constant | Hex Value |
|---|---|---|
PENDING | TIME_OFF_STATUS_PENDING | #ff8d28 (Warm Orange) |
APPROVED | TIME_OFF_STATUS_APPROVED | #2d9a6b (Vibrant Green) |
REJECTED | TIME_OFF_STATUS_REJECTED | #ff383c (Crimson Red) |
CANCELLED | TIME_OFF_STATUS_CANCELLED | #7b7b7b (Muted Gray) |