ποΈLeave Requests
Leave Requests are the core of the leave management workflow. Employees submit requests for time off, which then flow through an approval process. The system tracks the full lifecycle from submission through approval or rejection, with automatic balance updates at each step.
Submitting a Leave Request
As an Employee (Portal)
Navigate to Leave Requests from the sidebar.
Click Create.
Select the Leave Type.
Enter the Start Date and End Date.
Enter the number of Days (supports half-day increments, e.g., 0.5, 1.5).
Optionally add a Reason.
Click Save.
The Employee field is automatically set to the logged-in employee β it does not appear on the form.
As an Administrator
Administrators see the same form, but with an additional Employee field to select which employee the request is for. They can also fill in the Admin Notes field (hidden from employees).
From Employee Detail View
Administrators can create leave requests directly from an employee's detail page using the Create Leave Request action. The employee is pre-filled, and an additional Is Half Day toggle is available for convenience.
Validation Rules
The system enforces several validation rules when submitting or editing a leave request:
Days Validation
The number of days must match the date range:
Full days: Days must equal
end_date - start_date + 1Half days: Days must equal
(end_date - start_date + 1) Γ 0.5
Any other value is rejected with an error message.
Overlap Detection
The system checks for overlapping leave requests for the same employee. A request is blocked if its date range overlaps with any existing approved or pending request.
Two date ranges overlap if:
start_date_1 β€ end_date_2 AND start_date_2 β€ end_date_1
When editing an existing request, the overlap check excludes the current record.
Request Statuses
Pending
Yellow
Awaiting approval. Balance is reserved in pending_days.
Approved
Green
Approved by a manager. Days moved from pending_days to used_days.
Rejected
Red
Rejected by a manager. Days removed from pending_days.
Cancelled
Gray
Cancelled by the employee or administrator. Days restored.
Approval Workflow
Standard Flow
Auto-Approve Flow
For leave types configured for auto-approval (in Settings > Leave Management):
Approval Workflow Settings
Navigate to Settings > HRM Configuration > Leave Management to configure the workflow:
Approval Workflow
Single Level / Multi Level / Auto Approve
Single Level
Auto-Approve Leave Types
Select specific leave types
None
Approving a Leave Request
Requires the approve leave requests permission.
Navigate to Leave Requests or open from the pending requests dashboard card.
Select one or more pending requests.
Click the Approve action.
Optionally add Admin Notes.
Confirm.
What happens:
Status changes to Approved
approved_byis set to the current userapproved_atis set to the current timestampLeave balance:
pending_daysdecreases,used_daysincreasesEmployee receives a notification
Rejecting a Leave Request
Requires the approve leave requests permission.
Select one or more pending requests.
Click the Reject action.
Enter a Rejection Reason (required).
Optionally add Admin Notes.
Confirm.
What happens:
Status changes to Rejected
rejection_reasonis recorded and visible to the employeeLeave balance:
pending_daysdecreasesEmployee receives a notification
Cancelling a Leave Request
Requires the cancel leave requests permission. Both employees and administrators can cancel requests.
Select a pending or approved request.
Click the Cancel action.
Confirm.
What happens:
Status changes to Cancelled
If the request was pending:
pending_daysdecreasesIf the request was approved:
used_daysdecreases (days are returned)
Note: Only pending and approved requests can be cancelled. Rejected and already-cancelled requests cannot be cancelled.
Table Views
The leave requests list includes four pre-configured views:
All Leave Requests
No filter
Pending Requests
Status = Pending
Approved Requests
Status = Approved
Rejected Requests
Status = Rejected
Available Filters
Status β Pending, Approved, Rejected, Cancelled
Start Date β date range
End Date β date range
Days β numeric range
Notifications
The system sends email notifications at key points in the leave request lifecycle:
When a Request is Submitted
A notification is sent to all users who have the approve leave requests permission. The email includes:
Employee name and email
Leave type, start/end dates, total days
Reason (if provided)
Link to view the request
When a Request Status Changes
The employee receives a notification when their request is approved, rejected, or cancelled. The email includes:
Leave type, dates, and total days
New status
Rejection reason (if rejected)
Approver's name
Link to view the request
Email templates can be customized from Settings > Email Accounts > Templates.
Dashboard Cards
The leave management system provides three dashboard cards:
Leave Requests by Status
Pie chart
Distribution of requests across statuses
Leave Requests by Type
Bar chart
Count of requests grouped by leave type
Pending Leave Requests
Table
Latest 15 pending requests requiring action
Approval & Rejection Workflow
The leave approval workflow controls how leave requests move from submission to resolution. The HRM module supports three workflow modes, configurable from the settings page.
Workflow Modes
Configure the workflow mode in Settings > HRM Configuration > Leave Management.
Single Level (Default)
The simplest workflow. One authorized user reviews and approves or rejects the request.
Employee β Submit β Manager/HR Approves or Rejects β Done
Any user with the approve leave requests permission can approve or reject requests.
Multi Level
Requests pass through multiple approval stages. This is suitable for organizations that require both a direct manager and HR sign-off.
Employee β Submit β Manager Approves β HR Approves β Done
Auto Approve
All leave requests are automatically approved on submission. No human review is needed.
Employee β Submit β Automatically Approved β Done
Tip: You can combine workflow modes with the Auto-Approve Leave Types setting to auto-approve specific types (e.g., Work From Home) while requiring approval for others (e.g., Annual Leave).
Auto-Approve for Specific Leave Types
Rather than auto-approving all requests, you can select specific leave types that bypass approval:
Go to Settings > HRM Configuration > Leave Management.
In Auto-Approve Leave Types, select the types (e.g., Work From Home, Compensatory Off).
Save.
When an employee submits a request for an auto-approved leave type:
The status is immediately set to Approved.
The leave balance is updated (
used_daysincreased directly, nopending_daysstep).No notification is sent to managers.
The employee does not receive an approval notification (since it's instant).
Requests for non-auto-approved leave types follow the standard approval workflow regardless of this setting.
Balance Updates by Action
Submit request
+days
β
decreases
Approve request
-days
+days
unchanged
Reject request
-days
β
increases
Cancel (was pending)
-days
β
increases
Cancel (was approved)
β
-days
increases
Who Can Approve
Approval actions are controlled by the approve leave requests permission. This permission must be explicitly granted to a role β it is not included in the default Employee role.
Typical roles that should have this permission:
HR Manager
Department Head
Team Lead
Any administrator role
Super administrators can always approve requests (bypassed via Gate::before).
Rejection Reasons
When rejecting a leave request, a Rejection Reason is required. This reason is:
Stored on the leave request record
Visible to the employee in their leave request detail view
Included in the status change notification email
Administrators can also add Admin Notes during approval or rejection. Admin notes are only visible to other administrators, never to the employee.
Cancelling a Leave Request
Employees and administrators can cancel leave requests that are in Pending or Approved status. Cancellation restores the consumed or reserved leave days back to the employee's balance.
Who Can Cancel
Cancellation requires the cancel leave requests permission. By default, employees have this permission and can cancel their own requests.
Employee
Yes (with permission)
No (data scoping prevents seeing others)
Administrator
Yes
Yes (if they have the permission)
Super Admin
Yes
Yes (bypasses all checks)
How to Cancel
Navigate to Leave Requests.
Find the request to cancel (must be Pending or Approved).
Click the Cancel Leave action (shown inline in the actions column).
Confirm the cancellation.
What Happens When Cancelled
Cancelling a Pending Request
Before: pending_days = 5, used_days = 10, available_days = 3 Cancel 2-day pending request After: pending_days = 3, used_days = 10, available_days = 5
pending_daysdecreases by the request's daysavailable_daysincreases accordinglyThe request status changes to Cancelled
Cancelling an Approved Request
Before: pending_days = 3, used_days = 12, available_days = 3 Cancel 2-day approved request After: pending_days = 3, used_days = 10, available_days = 5
used_daysdecreases by the request's daysavailable_daysincreases accordinglyThe request status changes to Cancelled
Restrictions
Rejected requests cannot be cancelled (they're already resolved).
Already cancelled requests cannot be cancelled again.
The Cancel action button only appears for requests in Pending or Approved status.
Overlap Validation
The HRM module prevents employees from submitting leave requests that overlap with their existing approved or pending requests. This ensures accurate leave tracking and prevents double-booking of time off.
How It Works
When a leave request is created or updated, the system checks for overlapping date ranges:
Queries all leave requests for the same employee.
Filters to only approved and pending requests (rejected and cancelled are ignored).
When editing, excludes the current request from the check.
Tests for overlap using the formula:
existing_start β€ new_end AND new_start β€ existing_end.
If an overlap is found, the request is rejected with a validation error.
Examples
Blocked (Overlap)
Jan 10β12 (Approved)
Jan 11β14
Blocked β overlaps on Jan 11β12
Jan 15β15 (Pending)
Jan 15β15
Blocked β exact same date
Jan 1β31 (Approved)
Jan 10β10
Blocked β contained within existing range
Allowed (No Overlap)
Jan 10β12 (Approved)
Jan 13β15
Allowed β adjacent but not overlapping
Jan 10β12 (Rejected)
Jan 10β12
Allowed β rejected requests are ignored
Jan 10β12 (Cancelled)
Jan 10β12
Allowed β cancelled requests are ignored
Cross-Type Overlap
Overlap validation applies across all leave types. An employee cannot have overlapping Annual Leave and Sick Leave requests β the dates must not conflict regardless of the leave type.
Leave Carryover
Leave Carryover allows unused leave days from one fiscal year to be carried forward to the next. This feature is configurable at both the global level (settings) and the individual leave type level.
How Carryover Works
At the end of each fiscal year, the system processes carryover for all employees:
For each employee's leave balance from the ending year:
Checks if the leave type has Carry Forward enabled.
Calculates unused days:
total_days - used_days - pending_days.Applies the carryover cap (the lesser of the leave type's Max Carry Forward Days and the global Max Carryover Days setting).
Creates or updates the next year's leave balance with the Carried Forward Days.
Carried-forward days have an expiry based on the Carryover Expiry setting.
Configuration
Global Settings
Navigate to Settings > HRM Configuration > Leave Management:
Carryover Enabled
Yes
Master switch for the carryover feature
Max Carryover Days
10
Global cap on carried-forward days across all leave types
Carryover Expiry (months)
3
Carried-forward days expire this many months into the new fiscal year
Per Leave Type Settings
Each leave type has its own carryover configuration:
Carry Forward
Enable/disable carryover for this specific leave type
Max Carry Forward Days
Maximum days that can carry forward for this type
The effective carryover cap is the lesser of the leave type limit and the global limit.
Example: Leave type allows 10 days carry forward, but global max is 5. Only 5 days will carry over.
Processing Carryover
Carryover is processed automatically via a scheduled command that runs on the first day of the fiscal year start month:
Carryover Expiry
Carried-forward days are not permanent β they expire after a configurable period. Once expired, they are no longer counted in the available balance.
Last updated