sumona-banerjeee 96cc1bb684 Added working-day-only calculation, Fixed leave logic so balance is deducted only on approval and pending requests are considered to prevent over-application.
Ensured consistent day calculation using stored days field and removed duplicate daysBetween logic.
Implemented working-day-only calculation, excluding weekends (Saturday & Sunday), and blocked invalid date selections.
Corrected handling of Unpaid leave so it does not affect leave balance.
Added routing and integrated Sonner notifications for login, manager actions, and employee leave submission.
2026-04-29 19:14:58 +05:30

24 lines
435 B
JSON

[
{
"id": 101,
"userId": 1,
"type": "Sick",
"fromDate": "2026-04-25",
"toDate": "2026-04-26",
"days": 2,
"reason": "Fever",
"status": "Approved",
"appliedAt": "2026-04-20"
},
{
"id": 102,
"userId": 2,
"type": "Casual",
"fromDate": "2026-04-28",
"toDate": "2026-04-30",
"days": 3,
"reason": "Family trip",
"status": "Pending",
"appliedAt": "2026-04-27"
}
]