Frontend
Masters
Stationed At Master

Stationed At Master

The Stationed At Master provides a centralized way to manage specific physical or logical locations where employees are stationed, ensuring consistent reporting across HR, deployment, and operational modules.

Navigation Path

Company → Masters → Stationed At Master


1. Stationed At List Page

URL

/masters/stationed-at-master

Page Description

  • Displays a comprehensive list of all configured stationing locations.
  • Allows administrators to search, filter, and manage station records.
  • Locations defined here are typically used in Grade configurations and Employee profiles.

Filter & Search Section

Field NameTypeDescription
CodeText InputSearch for a station by its unique alphabetic or numeric code.
DescriptionText InputSearch for a station by its full name or description.

Actions:

  • Search → Filters the table based on the entered criteria.
  • Reset → Clears all search inputs and reloads the full list.

List Table Columns

Column NameDescription
S NoSerial number.
CodeUnique identifier for the location.
DescriptionDetailed name of the station (e.g., "Main Plant", "Head Office").
ActionsEdit and Delete options.

Row Actions

ActionDescription
EditOpens Edit Station drawer/form with pre-filled data.
DeleteOpens delete confirmation alert.

2. Add Stationed At Page

Triggered From

Stationed At List Page → Add Station button

Page Description

  • Allows administrators to create a new location entry.
  • Defines the "Code" which is often used in export reports and legacy integrations.

Add Stationed At – Fields

Field NameTypeMandatoryDescription
CodeText InputYesEnter a unique alphanumeric code for the station.
DescriptionText InputYesEnter the full descriptive name of the location.

Actions

ActionBehavior
SaveValidates and saves the new station record.
ResetClears the entered text values.
CancelReturns to the Stationed At List page.

Validation Rules

  • Both Code and Description are mandatory.
  • Duplicate codes are prohibited within the same company.
  • Input is trimmed to avoid spacing-related duplicates.

3. Edit Stationed At Page

Triggered From

Stationed At List Page → Edit icon

Page Description

  • Allows updating existing station details.
  • Useful for correcting descriptions or updating internal codes without breaking relations.

Editable Fields

Field NameEditable
CodeYes
DescriptionYes

Actions

ActionBehavior
UpdateSaves changes and refreshes the list view.
CancelDiscards changes and returns to the list.

4. Delete Stationed At Confirmation Alert

Triggered From

Stationed At List Page → Delete icon

Alert Content

  • "Are you sure you want to delete this Stationed At record?"

Actions:

  • Confirm / Yes → Marks the record as deleted (isDeleted.status: true).
  • Cancel → Closes the alert without action.

Field Definitions, Usage, and Calculation Logic

This section provides a technical analysis of the Stationed At Master's data structure.

1. Field Definitions

Field NameData TypeDescriptionExample Value
codeStringUnique alphanumeric identifier (Required).M-PLANT
descriptionStringHuman-readable name of the station (Required).Main Production Plant
isActiveBooleanOperational status of the station.true
companyIdObjectIdReference to the parent Company.60d8a...

2. Field Usage & System Impact

CategoryValidation / RuleSystem Behavior
MappingEmployeeProfileEmployees are linked to a station for deployment tracking.
Grade LogicSalaryGradeMasterGrades can be scoped to specific stations for differential pay.
Data PartitioningcompanyIdEnsures multi-tenant isolation.

3. Business Logic

A. Soft Delete Pattern

Records are not permanently purged. The isDeleted flag ensures historical consistency in employee deployment records while hiding the station from new dropdown selections.

B. Search Interface

The backend implements a multi-field search allowing users to find records by either code or description using case-insensitive partial matching.


API Endpoints

The Station At Master module interacts with the following API endpoints:

Base URL

export const STATIONATMASTER_URL = '/api/stationAtMaster'

Endpoints

EndpointMethodDescriptionParameters/Body
${STATIONATMASTER_URL}POSTCreate a new stationBody: data
${STATIONATMASTER_URL}GETGet all stationsQuery: page, limit
${STATIONATMASTER_URL}/:stationIdGETGet station by IDPath: stationId
${STATIONATMASTER_URL}/:stationIdPATCHUpdate an existing stationPath: stationId, Body: body
${STATIONATMASTER_URL}/delete/:stationIdPATCHSoft delete a stationPath: stationId

RTK Query Hooks

The following hooks are available for frontend integration (from stationAtMasterApiSlice.js):

  • useCreateStationAtMutation
  • useGetAllStationAtQuery
  • useGetStationAtByIdQuery
  • useUpdateStationAtMutation
  • useDeleteStationAtMutation

Summary

The Stationed At Master ensures consistent location-based grouping of employees, facilitating accurate deployment reporting and station-specific payroll logic.


End of Documentation