Apply for Leave
Summary
Employees can submit Leave from ESS or the broader Leave page; administrators can also add a request for a selected employee in the broader UI.
Audience
Employees, HR administrators, QA, support, and developers.
Overview
- Purpose/navigation: select Apply Leave or use the inline ESS form at
/leave. - Fields: Leave type, from date, to date, and reason; the broader form also has employee selection/read-only employee context.
- Not present: half-day input, supporting-document upload, calculated-day preview, and a per-type balance in the form.
- Client validation: ESS requires an ordered date range and a trimmed reason of at least three characters. The broader form requires employee and dates, checks joining date, and blocks while a conflict exists.
- Conflict checks: the broader form queries Attendance and approved-Leave compatibility data after relevant fields change.
- Submission: ESS posts to its gateway contract and shows success toast then reloads. The broader form posts to its compatibility contract, closes on success, and reloads.
- Error state: broader API errors are shown safely. ESS has no local submit try/catch; global handling behavior requires confirmation.
- Permission behavior: route checks are client-side; API enforcement is authoritative.
- Screenshot placeholder: sanitized request form, conflict state, and saving state.
Server-side day calculation and validation remain authoritative; see Leave day calculation.
Screen reference
| Requirement | Confirmed behavior |
|---|---|
| Purpose | Create a tenant-scoped employee Leave request. |
| Navigation path | /leave inline ESS form or Apply Leave/Add Approved Leave action. |
| Intended users | Employees; the broader form also supports its confirmed admin rendering. |
| Preconditions | Authenticated route, employee context, and available request form. |
| Main components | EssLeavePage form or LeaveManagementPage modal. |
| Fields, columns, or sections | Leave type, from date, to date, reason, and employee in the broader form. No half-day or document field. |
| Filters | None. |
| Actions | Submit/request Leave; close/cancel the broader modal. |
| Validation | Required context/dates, date order, ESS reason length, joining date, and broader conflict checks. |
| Loading state | Broader checking/saving indicators; ESS page skeleton before data loads. |
| Empty state | Not applicable to the form; history may be empty. |
| Success state | ESS toast/reset/reload; broader close and reload. |
| Error state | Broader validation/API error; ESS submit-error presentation requires confirmation. |
| Permission behavior | Route and local employee/admin rendering; server authorization remains authoritative. |
| API dependencies | ESS gateway submission or compatibility creation plus Attendance/approved-overlap checks. |
| Related business rules | Server-side working-day calculation, overlap, joining-date, state, and employee rules. |
| Screenshot placeholder | Sanitized blank form, checking state, conflict state, and saving state. |
Source References
UI/salary-ui/apps/client-hrms-portal/src/pages/hr/PayrollFeaturePages.tsxUI/salary-ui/apps/client-hrms-portal/src/ess/EssPages.tsxmicroservices/src/leave-service/Application/LeaveWorkflows.cs
Related Articles
See Also
Keywords
- Leave UI
- Apply for Leave
- Workforce management
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly