Frontend
Masters
Holiday Master

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 NameTypeDescription
YearDropdownFilters holidays by a specific financial or calendar year.
UnitDropdownFilters for unit-specific local holidays.
Holiday NameText InputSearch 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 NameDescription
S NoSerial number.
DateThe calendar date of the holiday.
Holiday NameThe official name of the holiday (e.g., "Republic Day").
UnitThe specific unit the holiday applies to (or "All" if global).
NationalA boolean indicator for National Holidays (NFH).
ActionsEdit and Delete options.

Row Actions

ActionDescription
EditOpens the Edit Holiday page with pre-filled details.
DeleteOpens 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 NFH flag in payroll.

Add Holiday – Fields

Field NameTypeMandatoryDescription
DateDate PickerYesSelect the calendar date of the holiday.
YearDropdownYesSelect the associated Financial Year.
UnitDropdownYesMap the holiday to a specific unit.
Holiday NameText InputYesFull name of the holiday (max 100 characters).
National HolidayCheckboxYesIf checked, this record is treated as a National/Festival Holiday.

Actions

ActionBehavior
SaveValidates the date/unit combination and saves the record.
ResetClears all input fields.
CancelReturns 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 NameEditable
DateYes
Holiday NameYes
Unit MappingYes
NationalYes

Actions

ActionBehavior
UpdateSaves changes and refreshes the master list.
CancelDiscards 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 NameData TypeDescription
dateDateThe specific date of the holiday.
holidayNameStringCommercial name (Required, Max 100 chars).
unitObjectIdReference to the Unit master. Scopes holiday to a location.
yearObjectIdReference to SalaryYearMaster.
isNationalHolidayBooleanCritical 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

EndpointMethodDescriptionParameters/Body
${SALARYHOLIDAYMASTER_URL}POSTCreate a new holidayBody: data
${SALARYHOLIDAYMASTER_URL}GETGet all active holidaysQuery: page, limit
${SALARYHOLIDAYMASTER_URL}/:idGETGet holiday by IDPath: id
${SALARYHOLIDAYMASTER_URL}/:idPATCHUpdate holiday detailsPath: id, Body: data
${SALARYHOLIDAYMASTER_URL}/delete/:idPATCHSoft delete a holidayPath: id

RTK Query Hooks

Available in salaryHolidayMasterApiSlice.js:

  • useCreateHolidayMasterMutation
  • useGetAllHolidayMastersQuery
  • useGetHolidayMasterByIdQuery
  • useUpdateHolidayMasterMutation
  • useDeleteHolidayMastersMutation

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