Holiday Master
The Holiday Master allows administrators to manage unit-wise and national holidays. These records are critical for payroll processing, as they determine leave entitlements, holiday pay, and OT (Overtime) multipliers for employees working on restricted days.
Navigation Path
Company → Masters → Holiday Master
1. Holiday List Page
URL
/masters/holiday-master
Page Description
- Displays a chronological list of all configured holidays.
- Allows filtering by Year and Unit to manage specific holiday calendars.
- National holidays (defined here) are globally applicable and impact statutory pay rules.
Filter & Search Section
| Field Name | Type | Description |
|---|---|---|
| Year | Dropdown | Filters holidays by a specific financial or calendar year. |
| Unit | Dropdown | Filters for unit-specific local holidays. |
| Holiday Name | Text Input | Search for a specific holiday by its name. |
Actions:
- Search → Updates the table with filtered holiday records.
- Reset → Clears all filters and reloads the default list.
List Table Columns
| Column Name | Description |
|---|---|
| S No | Serial number. |
| Date | The calendar date of the holiday. |
| Holiday Name | The official name of the holiday (e.g., "Republic Day"). |
| Unit | The specific unit the holiday applies to (or "All" if global). |
| National | A boolean indicator for National Holidays (NFH). |
| Actions | Edit and Delete options. |
Row Actions
| Action | Description |
|---|---|
| Edit | Opens the Edit Holiday page with pre-filled details. |
| Delete | Opens a delete confirmation alert for soft-deletion. |
2. Add Holiday Page
Triggered From
Holiday List Page → Add Holiday button
Page Description
- Allows administrators to create a new holiday entry for a specific date and unit.
- Defines high-priority National Holidays that impact the
NFHflag in payroll.
Add Holiday – Fields
| Field Name | Type | Mandatory | Description |
|---|---|---|---|
| Date | Date Picker | Yes | Select the calendar date of the holiday. |
| Year | Dropdown | Yes | Select the associated Financial Year. |
| Unit | Dropdown | Yes | Map the holiday to a specific unit. |
| Holiday Name | Text Input | Yes | Full name of the holiday (max 100 characters). |
| National Holiday | Checkbox | Yes | If checked, this record is treated as a National/Festival Holiday. |
Actions
| Action | Behavior |
|---|---|
| Save | Validates the date/unit combination and saves the record. |
| Reset | Clears all input fields. |
| Cancel | Returns to the Holiday List page. |
Validation Rules
- Date, Year, and Holiday Name are mandatory.
- Holiday Name must not exceed 100 characters.
- System prevents duplicate holiday entries for the same Date + Unit combination.
3. Edit Holiday Page
Triggered From
Holiday List Page → Edit icon
Page Description
- Allows updating existing holiday details, such as shifting dates or changing the National flag status.
- Fields are pre-filled with existing database values.
Editable Fields
| Field Name | Editable |
|---|---|
| Date | Yes |
| Holiday Name | Yes |
| Unit Mapping | Yes |
| National | Yes |
Actions
| Action | Behavior |
|---|---|
| Update | Saves changes and refreshes the master list. |
| Cancel | Discards changes and returns to the list view. |
4. Delete Holiday Confirmation Alert
Triggered From
Holiday List Page → Delete icon
Alert Content
- "Are you sure you want to delete this Holiday?"
Actions:
- Confirm / Yes → Soft deletes the record (
isDeleted.status: true). - Cancel → Dismisses the alert.
Field Definitions, Usage, and Calculation Logic
1. Technical Field Definitions
| Field Name | Data Type | Description |
|---|---|---|
date | Date | The specific date of the holiday. |
holidayName | String | Commercial name (Required, Max 100 chars). |
unit | ObjectId | Reference to the Unit master. Scopes holiday to a location. |
year | ObjectId | Reference to SalaryYearMaster. |
isNationalHoliday | Boolean | Critical flag for NFH premium pay logic. |
2. Business Logic & System Impact
A. National Holiday Pay (NFH)
The isNationalHoliday flag has a downstream impact on the Salary Head Master. If an employee works on a date marked as a National Holiday, the system uses this flag to trigger nfhgross multipliers defined in the Head Master, insuring higher pay for festival attendance.
B. Unit-Wise Scoping
Holidays can be defined at a unit level. This supports regional holidays that may only apply to a specific branch or plant without affecting the entire company's payroll logic.
API Endpoints
Base URL
export const SALARYHOLIDAYMASTER_URL = '/api/salaryHolidayMaster'
Endpoints
| Endpoint | Method | Description | Parameters/Body |
|---|---|---|---|
${SALARYHOLIDAYMASTER_URL} | POST | Create a new holiday | Body: data |
${SALARYHOLIDAYMASTER_URL} | GET | Get all active holidays | Query: page, limit |
${SALARYHOLIDAYMASTER_URL}/:id | GET | Get holiday by ID | Path: id |
${SALARYHOLIDAYMASTER_URL}/:id | PATCH | Update holiday details | Path: id, Body: data |
${SALARYHOLIDAYMASTER_URL}/delete/:id | PATCH | Soft delete a holiday | Path: id |
RTK Query Hooks
Available in salaryHolidayMasterApiSlice.js:
useCreateHolidayMasterMutationuseGetAllHolidayMastersQueryuseGetHolidayMasterByIdQueryuseUpdateHolidayMasterMutationuseDeleteHolidayMastersMutation
Summary
The Holiday Master provides a localized and national calendar for the organization, bridging the gap between attendance tracking and premium payroll calculations.
End of Documentation