Blocks
AddEmployeesHoliday
Employee selection screen for assigning employees to a company's holiday pay policy.
AddEmployeesHolidayProps
Props for AddEmployeesHoliday.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
Inherits children, className, defaultValues, dictionary, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/holidayAddEmployees/done | Employee selection is saved | The updated HolidayPayPolicy response, or undefined when no changes were submitted |
CANCEL | The user cancels | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/employees |
| GET | /v1/companies/:companyUuid/holiday_pay_policy |
| PUT | /v1/companies/:companyUuid/holiday_pay_policy/add |
AddEmployeesToPolicy
Employee selection screen for assigning employees to a sick or vacation time off policy.
Remarks
Displays all active employees with search filtering and pagination. Employees already enrolled in the policy are pre-selected, and carry-over balances are auto-populated from each employee's existing paid time off data. Starting balances can be manually set or overridden per employee. When employees are being moved from another policy a reassignment warning is shown, and removing a previously enrolled employee requires confirmation.
Example
import { TimeOff } from '@gusto/embedded-react-sdk'
function MyComponent() {
return (
<TimeOff.AddEmployeesToPolicy
companyId="your-company-id"
policyId="policy-uuid"
policyType="vacation"
onEvent={() => {}}
/>
)
}
AddEmployeesToPolicyProps
Props for AddEmployeesToPolicy.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
policyId | string | The time off policy identifier. |
policyType | CreatableTimeOffPolicyType | The type of policy being edited — 'sick' or 'vacation'. |
Inherits children, className, defaultValues, dictionary, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/addEmployees/done | Fired when employee selection is saved | The updated time off policy, or undefined when no changes were submitted |
timeOff/addEmployees/back | Fired when the user navigates back without saving | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/employees |
| GET | /v1/time_off_policies/:timeOffPolicyUuid |
| PUT | /v1/time_off_policies/:timeOffPolicyUuid |
| PUT | /v1/time_off_policies/:timeOffPolicyUuid/add_employees |
HolidaySelectionForm
Lets a user select which US federal holidays are observed by the company's holiday pay policy.
In 'create' mode, submitting creates a new holiday pay policy. In 'edit' mode, the form
is pre-populated with the existing policy's selections and submitting updates it. All 11 US
federal holidays are shown with their observed and next-observation dates; in create mode they
are all selected by default.
HolidaySelectionFormProps
Props for HolidaySelectionForm.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffHolidayPolicy>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
mode? | "edit" | "create" | Whether to create a new holiday policy or edit the existing one. Defaults to 'create'. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/holidaySelection/done | Holidays were saved in create mode | — |
timeOff/holidaySelection/editDone | Holidays were saved in edit mode | — |
CANCEL | The user backed out of the form | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyUuid/holiday_pay_policy |
| POST | /v1/companies/:companyUuid/holiday_pay_policy |
| PUT | /v1/companies/:companyUuid/holiday_pay_policy |
PolicyConfigurationForm
Form for creating or editing the details of a sick or vacation time off policy — its name and accrual configuration.
Remarks
Omit policyId to create a new policy; pass policyId to edit an existing
one. In edit mode, the form fetches the policy via Suspense and merges the
derived defaults with any defaultValues you supply (your overrides win).
When editing a policy whose configuration is already complete, the accrual
method selector is restricted to the matching category (unlimited vs.
accrual-based).
PolicyConfigurationFormProps
Props for PolicyConfigurationForm.
| Property | Type | Description |
|---|---|---|
companyId | string | Company that owns the policy being created or edited. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
policyType | "vacation" | "sick" | Type of policy being configured. |
defaultValues? | Partial<PolicyConfigurationFormData> | Pre-populated values to merge into the form's defaults. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffCreateTimeOffPolicy>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
policyId? | string | When set, the form loads the existing policy and submits an update. |
Inherits children, className, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/policyDetails/done | Fired after the policy is successfully created or updated | { policyId: string, accrualMethod: string } |
CANCEL | Fired when the user clicks the cancel button | — |
Endpoints
| Method | Path |
|---|---|
| POST | /v1/companies/:companyUuid/time_off_policies |
| GET | /v1/time_off_policies/:timeOffPolicyUuid |
| PUT | /v1/time_off_policies/:timeOffPolicyUuid |
PolicyList
Displays all active time off policies (sick, vacation, and holiday) for a company.
Each row shows the policy name and the enrolled-employee count. Incomplete policies surface a finish-setup action. Sick and vacation policies are deactivated via the time-off policies API; the holiday pay policy (if one exists) is merged into the same list and is deleted via the holiday pay policy API. Both flows go through a confirmation dialog and show a success alert.
PolicyListProps
Props for the PolicyList component.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffTimeOffPolicies>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/createPolicy | The user clicked the create-policy action. | — |
timeOff/viewPolicy | The user opened an existing policy or clicked finish-setup on an incomplete one. | { policyId: string, policyType: string } |
timeOff/deletePolicy/done | A policy was successfully deleted. | { policyId: string } |
Endpoints
PolicySettings
Configures additional policy limits and rules for a sick or vacation policy. This step is skipped for policies with unlimited accrual.
Remarks
Fetches the time off policy, derives the accrual method category, and submits updates to the time off policies endpoint. Emits the following events:
PolicySettingsProps
Props for PolicySettings.
| Property | Type | Description |
|---|---|---|
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
policyId | string | UUID of the time off policy being configured. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffCreateTimeOffPolicy>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
mode? | "edit" | "create" | Whether the form is being used to create a new policy or edit an existing one. Defaults to create. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/policySettings/done | Fired when policy settings are saved | The updated TimeOffPolicy |
timeOff/policySettings/back | Fired when the user navigates back | — |
Endpoints
PolicySettingsPresentation
Presentation-only form for configuring time off policy limits and rules.
Remarks
Use this component when you need to render the policy settings form without the data-fetching container — provide the accrualMethod and handle submission yourself. For the data-connected version, use PolicySettings.
The fields shown depend on accrualMethod:
- Accrual maximum and waiting period are shown for
'hours_worked'and'fixed_per_pay_period' - Balance maximum, carry-over limit, and paid-out-on-termination are always shown
PolicySettingsPresentationProps
Props for PolicySettingsPresentation.
| Property | Type | Description |
|---|---|---|
accrualMethod | PolicySettingsAccrualMethod | Accrual method category of the policy. Controls which fields are shown. |
onBack | () => void | Called when the user navigates back. |
onContinue | (data: PolicySettingsFormData) => void | Called with the form values when the user submits. |
className? | string | CSS class name applied to the root element. |
defaultValues? | Partial<PolicySettingsFormData> | Optional default values to prefill the form. |
editingPolicyName? | string | Name of the policy being edited. Shown in the heading when mode is 'edit'. |
isPending? | boolean | Whether a submit is in flight. Disables the back button and shows a loading state on the continue button. |
mode? | "edit" | "create" | Whether the form is being used to create a new policy or edit an existing one. Defaults to create. |
Endpoints
PolicyTypeSelector
Selection screen for choosing which kind of time-off policy to create — sick, vacation, or holiday.
Remarks
The holiday option is omitted when the company already has a holiday pay policy, since a company can only have one.
PolicyTypeSelectorProps
Props for PolicyTypeSelector.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
defaultPolicyType? | PolicyType | Pre-selected policy type rendered when the form mounts. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffSelectPolicyType>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/policyTypeSelected | The user confirms a selection | { policyType: {@link PolicyType} } |
CANCEL | The user cancels | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyUuid/holiday_pay_policy |
TimeOffPolicyDetail
Detail view for a sick or vacation time-off policy.
Remarks
Loads the policy and its enrolled employees, then renders the tabbed detail view with actions for editing the policy, adding or removing employees, and adjusting individual balances. Editable actions are only shown for sick and vacation policies.
TimeOffPolicyDetailProps
Props for TimeOffPolicyDetail.
| Property | Type | Description |
|---|---|---|
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
policyId | string | UUID of the time-off policy to display. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffTimeOffPolicyDetails>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/addEmployeesToPolicy | The add-employees action was clicked. | { policyId: string } |
timeOff/backToList | The back navigation was clicked. | — |
timeOff/changeSettings | The change-settings action was clicked. | { policyId: string } |
timeOff/editPolicy | The edit-policy action was clicked. | { policyId: string } |
Endpoints
TimeOffPolicyDetailPresentation
Presentational detail view for sick and vacation time-off policies.
Remarks
Displays policy configuration and accrual settings in a tabbed interface alongside the list of enrolled employees. Provides actions for editing the policy, changing settings, adding employees, removing employees, and editing individual employee balances. This component is fully controlled — pass in the data, selected tab, and dialog state and wire up the callbacks. The corresponding container component is TimeOffPolicyDetail.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | TimeOffPolicyDetailPresentationProps | See TimeOffPolicyDetailPresentationProps. |
Endpoints
ViewHolidayEmployees
Displays the holiday policy detail view with the employees tab selected.
Remarks
Shows enrolled employees with search filtering, and provides actions to add employees, edit the holiday selection, or remove employees.
ViewHolidayEmployeesProps
Props for ViewHolidayEmployees.
| Property | Type | Description |
|---|---|---|
companyId | string | Identifier of the company whose holiday policy enrollment is displayed. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffHolidayPolicy>> | Record<"en", DeepPartial<CompanyTimeOffPolicyDetail>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/holidayAddEmployees | User clicks to add employees | — |
timeOff/editHolidayPolicy | User clicks to edit holidays | — |
timeOff/backToList | User navigates back to the policy list | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/employees |
| GET | /v1/companies/:companyUuid/holiday_pay_policy |
| PUT | /v1/companies/:companyUuid/holiday_pay_policy/remove |
ViewHolidayPolicyDetails
Displays the holiday pay policy for a company with tabbed views of the included holidays and the enrolled employees.
ViewHolidayPolicyDetailsProps
Props for the ViewHolidayPolicyDetails component.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
defaultTab? | "employees" | "holidays" | Which tab to display initially. Defaults to 'holidays'. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffHolidayPolicy>> | Record<"en", DeepPartial<CompanyTimeOffPolicyDetail>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/backToList | The user clicked the back navigation. | — |
timeOff/holidayAddEmployees | The user clicked the add-employees action. | — |
timeOff/editHolidayPolicy | The user clicked the edit-policy action. | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/employees |
| GET | /v1/companies/:companyUuid/holiday_pay_policy |
| PUT | /v1/companies/:companyUuid/holiday_pay_policy/remove |
ViewHolidaySchedule
Displays the holiday policy detail view with the holidays tab selected.
Shows the list of selected holidays with their next observation dates.
ViewHolidayScheduleProps
Props for ViewHolidaySchedule.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<CompanyTimeOffHolidayPolicy>> | Record<"en", DeepPartial<CompanyTimeOffPolicyDetail>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
timeOff/holidayAddEmployees | Fired when user clicks to add employees | — |
timeOff/editHolidayPolicy | Fired when user clicks to edit holidays | — |
timeOff/backToList | Fired when user navigates back to policy list | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/employees |
| GET | /v1/companies/:companyUuid/holiday_pay_policy |
| PUT | /v1/companies/:companyUuid/holiday_pay_policy/remove |
Utility types
AccrualMethod
AccrualMethod =
"per_hour_paid"|"per_calendar_year"|"unlimited"
Top-level accrual method selected on the policy configuration form.
Remarks
per_hour_paid covers all hourly accrual variants — the allPaidHours and
includeOvertime toggles on PolicyConfigurationFormData narrow it to
a specific API accrual method on submit.
AccrualMethodFixed
AccrualMethodFixed =
"per_pay_period"|"all_at_once"
Sub-method for fixed (per-calendar-year) accrual — whether hours are granted at the start of the year or spread evenly across pay periods.
CreatableTimeOffPolicyType
CreatableTimeOffPolicyType =
Extract<PolicyType,"sick"|"vacation">
Time off policy types that can be created through the time off policy management workflow.
Remarks
Only sick and vacation are creatable through the time off policy endpoint. Holiday policies are a separate concept managed through the holiday pay policy endpoint family.
EmployeeTableItem
Minimum shape an employee row must satisfy to be rendered in the shared employee table.
Extend this interface to add fields specific to a given policy detail view.
Extended by
Properties
| Property | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the employee. |
firstName? | string | null | Employee's first name; combined with lastName to render the name column. |
jobTitle? | string | null | Employee's job title; rendered in its own column unless hideJobTitle is set. |
lastName? | string | null | Employee's last name; combined with firstName to render the name column. |
HolidayItem
A single federal holiday row shown in the holiday selection table.
Properties
| Property | Type | Description |
|---|---|---|
name | string | Localized display name of the holiday. |
nextObservation | string | Localized date string for the next time this holiday will be observed. |
observedDate | string | Localized text describing when the holiday is observed. |
uuid | string | Stable identifier for the holiday (the federal holiday key). |
HolidayPolicyDetailEmployee
An employee row rendered in the holiday policy detail employees tab.
Extends
Properties
| Property | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the employee. |
firstName? | string | null | Employee's first name; combined with lastName to render the name column. |
jobTitle? | string | null | Employee's job title; rendered in its own column unless hideJobTitle is set. |
lastName? | string | null | Employee's last name; combined with firstName to render the name column. |
HolidayPolicyDetailPresentationProps
Props for the holiday policy detail presentation component, which renders the holidays and employees tabs along with the remove-employee confirmation dialog and an optional success alert.
Properties
| Property | Type | Description |
|---|---|---|
backLabel | string | Label for the back navigation link. |
employees | PolicyDetailEmployeeTableData<HolidayPolicyDetailEmployee> | Employee table data and handlers for the employees tab. |
holidays | HolidayItem[] | Selected holidays shown in the holidays tab. |
onBack | () => void | Called when the user clicks the back navigation. |
onTabChange | (id: string) => void | Called with the tab id when the user switches tabs. |
removeDialog | RemoveDialogState | State for the employee removal confirmation dialog. |
selectedTabId | string | The currently active tab ('holidays' or 'employees'). |
title | string | The policy name displayed as the page heading. |
actions? | ReactNode[] | Action buttons displayed in the header (e.g. add employees, edit policy). |
className? | string | CSS class name applied to the root element. |
onAddEmployee? | () => void | Called when the user triggers the add-employee action from the empty state. |
onDismissAlert? | () => void | Called when the success alert is dismissed. |
subtitle? | string | Secondary label shown beneath the title. |
successAlert? | string | Success message displayed as a dismissible alert above the content. |
PolicyConfigurationFormData
Values collected by PolicyConfigurationForm for a sick or vacation time off policy.
Remarks
Fields beyond name and accrualMethod are conditionally relevant based on
the selected accrualMethod:
unlimited— no other fields apply.per_hour_paid—accrualRate,accrualRateUnit,includeOvertime, andallPaidHoursconfigure the hourly accrual variant.per_calendar_year—accrualRateandaccrualMethodFixedconfigure how hours are granted;resetDateTypeplusresetMonth/resetDayconfigure when balances reset.
Properties
| Property | Type | Description |
|---|---|---|
accrualMethod | AccrualMethod | Top-level accrual strategy selected by the user. |
name | string | Display name of the policy. |
accrualMethodFixed? | AccrualMethodFixed | For per_calendar_year: grant hours all at once or spread per pay period. |
accrualRate? | number | Hours accrued per accrualRateUnit (hourly) or per year (fixed). |
accrualRateUnit? | number | Hours worked needed to earn accrualRate hours of time off. Hourly only. |
allPaidHours? | boolean | Whether all paid hours (not just worked hours) count toward accrual. Hourly only. |
includeOvertime? | boolean | Whether overtime hours count toward accrual. Hourly only. |
resetDateType? | ResetDateType | Whether balances reset on anniversary or on a fixed calendar date. |
resetDay? | number | Reset day of month when resetDateType is per_calendar_year. |
resetMonth? | number | Reset month (1–12) when resetDateType is per_calendar_year. |
PolicyDetailEmployeeTableData
Employee table data and callbacks for a policy detail view.
Pass this as the employees prop to TimeOffPolicyDetailPresentationBaseProps
or HolidayPolicyDetailPresentationProps.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends EmployeeTableItem | The employee row shape, which must extend EmployeeTableItem. |
Properties
| Property | Type | Description |
|---|---|---|
data | T[] | Employee rows to render. |
onSearchChange | (value: string) => void | Called when the search input value changes. |
onSearchClear | () => void | Called when the search input is cleared. |
searchValue | string | Current value of the search input. |
emptyState? | () => ReactNode | Renders a custom empty state when data is empty and there is no active search. |
isFetching? | boolean | When true, renders the loading state instead of the rows. |
itemMenu? | (item: T) => ReactNode | Renders a row-level menu (e.g. a kebab menu) for the given item. |
pagination? | PaginationControlProps | Pagination control props passed through to the underlying data view. |
searchPlaceholder? | string | Placeholder text for the search input; defaults to a localized placeholder. |
PolicyDetails
PolicyDetails =
UnlimitedPolicyDetails|RateBasedPolicyDetails
Policy type and accrual configuration for the detail view.
Remarks
A discriminated union on accrualMethod. When accrualMethod is 'unlimited',
no rate or reset date is present. For rate-based methods, accrualRate is set
and resetDate / accrualRateUnit may also be provided.
PolicySettingsAccrualMethod
PolicySettingsAccrualMethod =
"hours_worked"|"fixed_per_pay_period"|"fixed_all_at_once"
Accrual method category for a time off policy. Determines which settings fields are shown.
PolicySettingsDisplay
Accrual caps, carryover, and termination settings displayed alongside a rate-based policy.
Properties
| Property | Type | Description |
|---|---|---|
accrualWaitingPeriodDays | number | null | Days before a newly enrolled employee begins accruing, or null for no waiting period. |
carryoverLimitHours | number | null | Maximum hours that carry over on reset, or null for no limit. |
maxAccrualHoursPerYear | number | null | Maximum hours that can accrue per year, or null for no limit. |
maxHours | number | null | Maximum balance an employee can hold, or null for no limit. |
paidOutOnTermination | boolean | Whether the remaining balance is paid out when an employee is terminated. |
PolicySettingsFormData
Form values captured by the policy settings form.
Properties
| Property | Type | Description |
|---|---|---|
accrualMaximumEnabled | boolean | Whether an annual accrual cap is enabled. |
balanceMaximumEnabled | boolean | Whether a total balance cap is enabled. |
carryOverLimitEnabled | boolean | Whether a carry-over limit is enabled. |
paidOutOnTermination | boolean | Whether accrued balance is paid out when an employee is terminated. |
waitingPeriodEnabled | boolean | Whether a waiting period is enabled. |
accrualMaximum? | number | Maximum hours that can accrue per year when PolicySettingsFormData.accrualMaximumEnabled is true. |
balanceMaximum? | number | Maximum hours an employee can hold in their balance at any time when PolicySettingsFormData.balanceMaximumEnabled is true. |
carryOverLimit? | number | Maximum hours that carry over when the policy resets when PolicySettingsFormData.carryOverLimitEnabled is true. |
waitingPeriod? | number | Number of days a new employee must wait before accrual begins when PolicySettingsFormData.waitingPeriodEnabled is true. |
PolicyType
PolicyType =
"sick"|"vacation"|"holiday"
Identifier for the kind of time-off policy a company can configure.
PolicyTypeKey
PolicyTypeKey =
"vacation"|"sick"
RateBasedAccrualMethod
RateBasedAccrualMethod =
"perPayPeriod"|"perCalendarYear"|"perAnniversaryYear"|"perHourWorked"|"perHourWorkedNoOvertime"|"perHourPaid"|"perHourPaidNoOvertime"
RateBasedPolicyDetails
Policy details for a rate-based accruing time-off policy.
Properties
| Property | Type | Description |
|---|---|---|
accrualMethod | RateBasedAccrualMethod | The method by which time off accrues. |
accrualRate | number | Hours accrued per accrual period. |
policyType | PolicyTypeKey | Whether the policy covers vacation or sick time. |
accrualRateUnit? | number | Divisor used to compute the per-unit accrual rate, if applicable. |
resetDate? | string | ISO date string for the annual balance reset, if applicable. |
RemoveDialogState
State for the confirmation dialog shown when removing an employee from a time off or holiday policy.
Properties
| Property | Type | Description |
|---|---|---|
employeeName | string | Name of the employee being removed; interpolated into the dialog copy. |
isOpen | boolean | Whether the dialog is currently visible. |
isPending | boolean | Whether the removal request is in flight; disables the confirm action while true. |
onClose | () => void | Called when the user cancels or dismisses the dialog without confirming. |
onConfirm | () => void | Called when the user confirms the removal. |
ResetDateType
ResetDateType =
"per_anniversary_year"|"per_calendar_year"
When a policy's balance resets — on each employee's hire anniversary or on a fixed calendar month/day shared across all employees.
TimeOffPolicyDetailEmployee
Row shape for an employee enrolled in a time-off policy.
Extends
Properties
| Property | Type | Description |
|---|---|---|
balance | number | null | Current balance in hours, or null for unlimited policies. |
uuid | string | Unique identifier for the employee. |
firstName? | string | null | Employee's first name; combined with lastName to render the name column. |
jobTitle? | string | null | Employee's job title; rendered in its own column unless hideJobTitle is set. |
lastName? | string | null | Employee's last name; combined with firstName to render the name column. |
TimeOffPolicyDetailPresentationBaseProps
Shared base props for TimeOffPolicyDetailPresentation.
Properties
| Property | Type | Description |
|---|---|---|
backLabel | string | Label for the back navigation link. |
employees | PolicyDetailEmployeeTableData<TimeOffPolicyDetailEmployee> | Employee table data and callbacks. |
onBack | () => void | Called when the back navigation is clicked. |
onTabChange | (id: string) => void | Called with the new tab id when the user switches tabs. |
removeDialog | RemoveDialogState | State for the employee removal confirmation dialog. |
selectedTabId | string | The currently active tab id. |
title | string | Policy name displayed as the page heading. |
actions? | ReactNode[] | Optional action buttons rendered in the header. |
className? | string | CSS class name applied to the root element. |
onAddEmployee? | () => void | Called when the add-employee action is clicked. |
onDismissAlert? | () => void | Called when the success alert is dismissed. |
subtitle? | string | Secondary label, typically the policy type. |
successAlert? | string | Optional success message rendered as a dismissible alert. |
TimeOffPolicyDetailPresentationProps
TimeOffPolicyDetailPresentationProps =
TimeOffPolicyDetailPresentationBaseProps& {policyDetails:UnlimitedPolicyDetails;onChangeSettings?:never;policySettings?:never; } | {policyDetails:RateBasedPolicyDetails;policySettings:PolicySettingsDisplay;onChangeSettings?: () =>void; }
Props for TimeOffPolicyDetailPresentation.
Remarks
The props form a discriminated union on policyDetails.accrualMethod. Unlimited policies
omit policySettings and onChangeSettings; rate-based policies require policySettings
and may provide onChangeSettings to enable the change-settings action.
| Field | Description |
|---|---|
title | The policy name displayed as the page heading. |
subtitle | Secondary label, typically the policy type. |
onBack | Called when the back navigation is clicked. |
backLabel | Label for the back navigation link. |
actions | Optional action buttons rendered in the header. |
policyDetails | Policy type and accrual configuration. See PolicyDetails. |
policySettings | Accrual caps and termination settings. See PolicySettingsDisplay. Required for rate-based policies. |
onChangeSettings | Called when the change-settings action is clicked. Rate-based policies only. |
selectedTabId | The currently active tab id. |
onTabChange | Called with the new tab id when the user switches tabs. |
employees | Employee table data including data, searchValue, onSearchChange, onSearchClear, and optional itemMenu. |
onAddEmployee | Called when the add-employee action is clicked. |
removeDialog | State for the employee removal confirmation dialog. |
successAlert | Optional success message rendered as a dismissible alert. |
onDismissAlert | Called when the success alert is dismissed. |
className | CSS class name applied to the root element. |
UnlimitedPolicyDetails
Policy details for an unlimited (no-accrual) time-off policy.
Properties
| Property | Type | Description |
|---|---|---|
accrualMethod | "unlimited" | Accrual method discriminant — always 'unlimited' for this variant. |
policyType | PolicyTypeKey | Whether the policy covers vacation or sick time. |