Skip to content

Leave and the holiday calendar

/leave — every employee's leave: balances, applying, reporting an absence, the ledger and the holiday calendar. HR and management approve at /leave/approvals; HR runs the policy at /leave/admin. The policy is the Employee Agreement v3 (Clause 6, 13, 20, Annexure B).

Rules: 22 · Leave and the employee agreement (LV-001 … LV-062). Permissions: PERMISSIONS.md §6.20. Routes: Leave and agreements API. Running it: Leave year end and holidays. The phone: The Alhuda Travels app → Leave.

Pages: src/pages/leave/ · routes: handleLeave() in src/lib/leave.ts. Every screen is one database call (PRF-001). The database counts the days, checks every rule and decides who approves; the screen shows its answer.

Who sees what

Page Sidebar Who
Leave (/leave) Home → Leave every staff login with leave.apply
Holiday calendar (/leave/holidays) from the Leave page any staff login; HR (hr.holidays.manage) edits
Leave approvals (/leave/approvals) Admin → Leave approvals (hr.leave.approve) HR; management and reporting managers open it from the Leave page or a notification
Leave admin (/leave/admin) Admin → Leave admin HR (hr.leave.admin)

Tour leaders, partners and travellers have no leave page (LV-001, LV-003).

The employee's page

Balances. One card per kind of leave for the current leave year (1 April–31 March, LV-002): opening, credited, used, pending, available and what is usable now. On probation the card says so: CL / SL is usable in proportion to the months worked, and earned leave is shown as accruing but locked until HR records the confirmation (LV-011). Leave without pay shows the days taken, never an amount available. A kind of leave that is switched off and never used is not shown.

Apply for leave. Choose the type, the dates and, where allowed, a half day at either end; give a reason; name the colleague who takes over your work, with an optional note (LV-035); add a contact number while away; tick Emergency if it is one. As you type, the form shows the database's answer: the days counted, each date skipped and why (a weekly off or a holiday — LV-005), who approves ("HR", or "your reporting manager", and "then management"), warnings in amber and errors in red. The form scrolls inside the dialog; the day count, Close and Send sit in a footer that stays in view on a short screen. Send stays off while there is an error. Examples of what it says:

  • earned leave with less than 7 days' notice — a warning (LV-013);
  • dates in a peak season — management approves too, 30 days' notice unless an emergency, and a proper reason (LV-032);
  • dates in your notice period — management approves too (LV-040);
  • not enough balance — refused, unless you choose to take the rest as leave without pay, which management approves (LV-041);
  • CL / SL of more than two days — "If this is sick leave for more than 2 days, a medical certificate may be needed (Clause 6.2)". It is a note, not an error: casual leave needs none (LV-014).

A double click sends one application.

Report an absence. For a day you could not come in: today, or up to 3 days back, as CL / SL, comp-off or leave without pay. No handover is needed. HR regularises it by approving it, and your reporting manager is told (LV-042). An absence older than that is recorded by HR (Leave admin → Record an absence, below).

My applications. Each with its status and its timeline — who did what and when (LV-034). From an application you can:

  • Withdraw it while it is pending;
  • Cancel approved leave that has not started — the days come back;
  • Ask to cancel approved leave that has started, with a reason; HR decides (LV-033);
  • Attach a medical certificate: the file is uploaded to the company Shared Drive under Employees / "<name> (<id>)" (never Supabase Storage) and linked to the application; the approvers can open it.

Ledger. Every credit and debit of your leave for a leave year, with the date, the reason and who made it (LV-050).

Approvals count. Someone who approves leave sees on the Leave page how many applications wait for them, with a link to Leave approvals.

Holiday calendar

/leave/holidays lists the year's holidays: name, dates, kind (public, festival, restricted), and Tentative on a date that depends on the moon until HR confirms it (LV-020, LV-021). The 2026 and 2027 calendars come seeded with the eight Jammu & Kashmir holidays (12 paid days each year), the lunar ones tentative; the list is in Leave year end and holidays. It shows how many paid holiday days the year has, the declared peak seasons, and the reader's weekly off. Public and festival holidays are not counted as leave; restricted holidays are listed only.

HR (hr.holidays.manage) adds, changes, confirms and removes holidays; each change is audited. An entry spans at most seven days. Moving a holiday does not recount applications already made.

Leave approvals

/leave/approvals lists what waits for you, as the database routes it (LV-030, LV-031, LV-032):

  • HR (hr.leave.approve) sees every application's HR stage, except their own;
  • a reporting manager sees the HR stage of an HR colleague who reports to them;
  • management (hr.leave.approve_peak) sees the second stage of peak-season, notice-period and leave-without-pay applications.

Each card shows the applicant, the dates and days, the paid / unpaid split, the reason, the handover, the flags (emergency, unplanned, peak, notice, certificate), the applicant's balances and how many others are away on those dates. Approve or Refuse; a refusal needs a reason, which the applicant sees. Timeline opens the application with its history. The tabs are Waiting for me, Cancellation requests (leave that has started, which the applicant asks to cancel: Approve cancellation — the days come back — or Refuse cancellation with a reason), Waiting for others (what you approved that waits for another approver) and Who is away.

HR cancels someone's leave. Holders of hr.leave.admin see Cancel this leave at the foot of an application opened with Timeline, when it is someone else's and is pending, approved or has a cancellation asked — before or after it starts. A reason is required; the dialog is the confirmation. Any days it took go back to the balance (leave without pay included), the timeline keeps it, and the applicant is told with the reason (LV-033). The same button is on each live application in the register (Leave admin, below).

Nobody decides their own leave. The applicant is told of each decision, and the colleague taking over the work is told when the leave is approved.

Who is away. The team view lists approved and pending leave in a date range (up to three months). HR and management see everyone; anyone else sees the people who report to them (LV-055).

Leave admin (HR)

/leave/admin, hr.leave.admin. Every change is audited.

The tabs, in order:

Tab What HR does
Employees For each active employee: joining date, confirmation date, notice period, weekly off, reporting manager, whether they are on the leave policy. Two buttons on each row. Edit sets the confirmation date, the notice start and end, a personal weekly off (LV-004, LV-011, LV-040). Register opens one employee's leave year: balances, ledger, applications, comp-offs, a leave-year picker and Download CSV (LV-054); each application there that is pending, approved or has a cancellation asked has Cancel this leave (LV-033; not on your own register). The joining date and "reports to" are set on the employee record (People)
Record an absence Record an absence for an employee that is older than the reporting window: the employee, recorded as CL / SL, comp-off or LWP, the first and last day absent (today at the latest), whole or half day for a single day, and a reason. Record absence asks to confirm, then files it already approved. It is counted like any leave (weekly offs and holidays skipped); days beyond the balance are leave without pay; it is refused if it overlaps leave already on those days, if the comp-off is not valid, or if the leave year is closed. The employee and their reporting manager are told. You are not in the employee list (LV-042)
Comp-off Record a weekly off or holiday worked on instruction: the day, who instructed, the work, whole or half day (LV-060)
Adjustments An opening balance, a grant (maternity leave) or a correction, in half days, with a reason (LV-051, LV-015)
Leave types Days, on / off, half days, name and description. Paternity, bereavement, marriage and Hajj / Umrah leave are off until their days are set (LV-016); CL / SL, EL, comp-off and LWP cannot be switched off
Peak seasons Declare or remove a date range (LV-032)
Settings Company weekly off, sandwich rule (off), Send leave e-mails (on — LV-039; below), days back for an absence (3), comp-off expiry (90), peak notice (30), planned notice (7), EL carry-forward cap (30), year-end encashment (off), certificate after (2 days); the company's legal name and address and the authorised signatory's name and designation used by the employee agreement
Accruals & year end One tab, two cards. Accruals: Run accruals now — the nightly job's catch-up, by hand, up to today (LV-062). Year end: choose the leave year, read the preview, then Close this year once, on or after 1 April (LV-052). The confirmation asks you to type the year; "2026-27" with a keyboard hyphen is taken as well as "2026–27", "2026/27" and "2026 27". Below: the years already closed, by whom

Nobody records a comp-off or an absence to, adjusts, or changes the leave record of their own login.

Notifications

The applicant, the approvers whose turn it is, the reporting manager (for an absence) and the handover colleague are told in the notification inbox — the app's Notifications, and /m/notifications on the web phone layout (TRV-010).

E-mails

Each step of an application is also e-mailed to the company address of the people concerned (LV-036 … LV-039). The reporting officer is the "reports to" on the employee record. The database queues the e-mails as the step happens; the communications dispatcher sends them at once (and its five-minute run catches anything missed).

Step Who gets an e-mail Subject (example)
Leave applied for the reporting officer Leave request: Bilal Testdar — Casual / sick leave 05/10/2026–06/10/2026 (2 days) — "Your approval is needed" if it is routed to them, otherwise "For your information — HR approves"
each approver it is routed to — HR, or the HR applicant's reporting officer; management too for peak season, the notice period or leave without pay Leave waiting for your approval: Bilal Testdar — Casual / sick leave 05/10/2026–06/10/2026 (2 days)
Absence reported the reporting officer; the approvers as above Absence reported: Bilal Testdar — Casual / sick leave 30/09/2026 (1 day)
One stage approved, another left the next stage's approvers Leave waiting for your approval: … ("the first approval is done")
Finally approved the applicant, with the balance left Your leave is approved: Casual / sick leave 05/10/2026–06/10/2026 (2 days)
the reporting officer Leave approved for Bilal Testdar: …
Refused the applicant, with the remarks; the reporting officer Your leave is not approved: … / Leave not approved for Bilal Testdar: …
Withdrawn while pending the reporting officer Leave request withdrawn: Bilal Testdar — …
Cancelled (by the applicant, by HR with the reason, or a request to cancel agreed) the applicant; the reporting officer Your leave is cancelled: … / Leave cancelled for Bilal Testdar: …
Cancellation asked for leave that has started the HR stage Cancellation waiting for your decision: Bilal Testdar — …
Cancellation refused the applicant, with the remarks Your cancellation is not agreed: …
Absence recorded by HR the employee, with the balance left; the reporting officer HR recorded an absence: … / Absence recorded for Bilal Testdar: …

Each e-mail lists the type, the dates (DD/MM/YYYY) with any half day, the days counted (paid and without pay), the reason, the colleague taking over, the flags (peak season, notice period, leave without pay, emergency, unplanned) and who approves, with a button to Leave approvals or the Leave page. It never carries the medical certificate, the contact number while away, the handover note, an Aadhaar or PAN number.

  • One each. A person who is both reporting officer and approver gets one e-mail. A double click or a repeated step sends nothing more.
  • No reporting officer recorded. Only the approvers are e-mailed, and they are told to set "reports to".
  • Who is skipped. A paused, deactivated or deleted login, and a login without a real address (none, or a placeholder such as …@signup.alhudatravels.invalid). The reporting officer is not e-mailed about a decision they took themselves.
  • No-reply. The sender is the mailer's no-reply address. The footer says replies are not read and to speak to HR or call the office.
  • Switching it off. Leave admin → Settings → Send leave e-mails (on by default). While off, nothing is queued; the in-app notifications still go. This is the switch of the HR leave category of automatic e-mails: Admin → Reminders lists it and points here; there is no second switch.
  • One queue. Leave e-mails go through the same queue, dispatcher and mailer as every other automatic e-mail, as category hr_leave, keyed by application, step and recipient (COMM-039). An e-mail queued before 02/10/2026 kept its key, so none is sent again.

Not built

  • Push for leave. No push notification is sent; the in-app message waits in the notification inbox and the e-mail goes as above (LV-034).
  • E-mail to the handover colleague, or about a medical certificate. The colleague taking over is told in the app only; attaching a certificate sends no e-mail.
  • Leave in the Work inbox. Leave approvals are not shown in the Work inbox (/work). They have their own list at /leave/approvals, a count on the Leave page and the notifications. There is no sidebar badge count for leave approvals.
  • Payroll. Leave without pay and encashment are recorded as days; no salary is calculated (LV-041, LV-053).
  • Attendance. There is no clock-in; an absence exists only when it is reported or recorded.
  • Recording an absence on the phone. Leave admin, including Record an absence, is on the website only.
  • Leave for tour leaders — open (LV-003).
  • Paternity, bereavement, marriage and Hajj / Umrah leave — built, switched off until the Company sets the days (LV-016).
  • The sandwich rule and year-end encashment — built as settings, off (LV-006, LV-053).
  • Working out maternity leave from the Act. HR records the entitlement as a grant (LV-015).