Skip to main content

Blocks

AddEmployeesHoliday​

Employee selection screen for assigning employees to a company's holiday pay policy.


AddEmployeesHolidayProps​

Props for AddEmployeesHoliday.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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​

EventDescriptionData
timeOff/holidayAddEmployees/doneEmployee selection is savedThe updated HolidayPayPolicy response, or undefined when no changes were submitted
CANCELThe user cancels—

Endpoints​


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.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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.
policyIdstringThe time off policy identifier.
policyTypeCreatableTimeOffPolicyTypeThe type of policy being edited — 'sick' or 'vacation'.

Inherits children, className, defaultValues, dictionary, FallbackComponent, LoaderComponent from BaseComponentInterface.


Events​

EventDescriptionData
timeOff/addEmployees/doneFired when employee selection is savedThe updated time off policy, or undefined when no changes were submitted
timeOff/addEmployees/backFired when the user navigates back without saving—

Endpoints​


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.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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​

EventDescriptionData
timeOff/holidaySelection/doneHolidays were saved in create mode—
timeOff/holidaySelection/editDoneHolidays were saved in edit mode—
CANCELThe user backed out of the form—

Endpoints​


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.

PropertyTypeDescription
companyIdstringCompany that owns the policy being created or edited.
onEventOnEventType<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?stringWhen set, the form loads the existing policy and submits an update.

Inherits children, className, FallbackComponent, LoaderComponent from BaseComponentInterface.


Events​

EventDescriptionData
timeOff/policyDetails/doneFired after the policy is successfully created or updated{ policyId: string, accrualMethod: string }
CANCELFired when the user clicks the cancel button—

Endpoints​


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.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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​

EventDescriptionData
timeOff/createPolicyThe user clicked the create-policy action.—
timeOff/viewPolicyThe user opened an existing policy or clicked finish-setup on an incomplete one.{ policyId: string, policyType: string }
timeOff/deletePolicy/doneA 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.

PropertyTypeDescription
onEventOnEventType<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.
policyIdstringUUID 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​

EventDescriptionData
timeOff/policySettings/doneFired when policy settings are savedThe updated TimeOffPolicy
timeOff/policySettings/backFired 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.

PropertyTypeDescription
accrualMethodPolicySettingsAccrualMethodAccrual method category of the policy. Controls which fields are shown.
onBack() => voidCalled when the user navigates back.
onContinue(data: PolicySettingsFormData) => voidCalled with the form values when the user submits.
className?stringCSS class name applied to the root element.
defaultValues?Partial<PolicySettingsFormData>Optional default values to prefill the form.
editingPolicyName?stringName of the policy being edited. Shown in the heading when mode is 'edit'.
isPending?booleanWhether 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.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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?PolicyTypePre-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​

EventDescriptionData
timeOff/policyTypeSelectedThe user confirms a selection{ policyType: {@link PolicyType} }
CANCELThe user cancels—

Endpoints​


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.

PropertyTypeDescription
onEventOnEventType<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.
policyIdstringUUID 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​

EventDescriptionData
timeOff/addEmployeesToPolicyThe add-employees action was clicked.{ policyId: string }
timeOff/backToListThe back navigation was clicked.—
timeOff/changeSettingsThe change-settings action was clicked.{ policyId: string }
timeOff/editPolicyThe 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​


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.

PropertyTypeDescription
companyIdstringIdentifier of the company whose holiday policy enrollment is displayed.
onEventOnEventType<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​

EventDescriptionData
timeOff/holidayAddEmployeesUser clicks to add employees—
timeOff/editHolidayPolicyUser clicks to edit holidays—
timeOff/backToListUser navigates back to the policy list—

Endpoints​


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.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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​

EventDescriptionData
timeOff/backToListThe user clicked the back navigation.—
timeOff/holidayAddEmployeesThe user clicked the add-employees action.—
timeOff/editHolidayPolicyThe user clicked the edit-policy action.—

Endpoints​


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.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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​

EventDescriptionData
timeOff/holidayAddEmployeesFired when user clicks to add employees—
timeOff/editHolidayPolicyFired when user clicks to edit holidays—
timeOff/backToListFired when user navigates back to policy list—

Endpoints​


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​

PropertyTypeDescription
uuidstringUnique identifier for the employee.
firstName?string | nullEmployee's first name; combined with lastName to render the name column.
jobTitle?string | nullEmployee's job title; rendered in its own column unless hideJobTitle is set.
lastName?string | nullEmployee's last name; combined with firstName to render the name column.

HolidayItem​

A single federal holiday row shown in the holiday selection table.

Properties​

PropertyTypeDescription
namestringLocalized display name of the holiday.
nextObservationstringLocalized date string for the next time this holiday will be observed.
observedDatestringLocalized text describing when the holiday is observed.
uuidstringStable identifier for the holiday (the federal holiday key).

HolidayPolicyDetailEmployee​

An employee row rendered in the holiday policy detail employees tab.

Extends​

Properties​

PropertyTypeDescription
uuidstringUnique identifier for the employee.
firstName?string | nullEmployee's first name; combined with lastName to render the name column.
jobTitle?string | nullEmployee's job title; rendered in its own column unless hideJobTitle is set.
lastName?string | nullEmployee'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​

PropertyTypeDescription
backLabelstringLabel for the back navigation link.
employeesPolicyDetailEmployeeTableData<HolidayPolicyDetailEmployee>Employee table data and handlers for the employees tab.
holidaysHolidayItem[]Selected holidays shown in the holidays tab.
onBack() => voidCalled when the user clicks the back navigation.
onTabChange(id: string) => voidCalled with the tab id when the user switches tabs.
removeDialogRemoveDialogStateState for the employee removal confirmation dialog.
selectedTabIdstringThe currently active tab ('holidays' or 'employees').
titlestringThe policy name displayed as the page heading.
actions?ReactNode[]Action buttons displayed in the header (e.g. add employees, edit policy).
className?stringCSS class name applied to the root element.
onAddEmployee?() => voidCalled when the user triggers the add-employee action from the empty state.
onDismissAlert?() => voidCalled when the success alert is dismissed.
subtitle?stringSecondary label shown beneath the title.
successAlert?stringSuccess 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, and allPaidHours configure the hourly accrual variant.
  • per_calendar_year — accrualRate and accrualMethodFixed configure how hours are granted; resetDateType plus resetMonth/resetDay configure when balances reset.

Properties​

PropertyTypeDescription
accrualMethodAccrualMethodTop-level accrual strategy selected by the user.
namestringDisplay name of the policy.
accrualMethodFixed?AccrualMethodFixedFor per_calendar_year: grant hours all at once or spread per pay period.
accrualRate?numberHours accrued per accrualRateUnit (hourly) or per year (fixed).
accrualRateUnit?numberHours worked needed to earn accrualRate hours of time off. Hourly only.
allPaidHours?booleanWhether all paid hours (not just worked hours) count toward accrual. Hourly only.
includeOvertime?booleanWhether overtime hours count toward accrual. Hourly only.
resetDateType?ResetDateTypeWhether balances reset on anniversary or on a fixed calendar date.
resetDay?numberReset day of month when resetDateType is per_calendar_year.
resetMonth?numberReset 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 ParameterDescription
T extends EmployeeTableItemThe employee row shape, which must extend EmployeeTableItem.

Properties​

PropertyTypeDescription
dataT[]Employee rows to render.
onSearchChange(value: string) => voidCalled when the search input value changes.
onSearchClear() => voidCalled when the search input is cleared.
searchValuestringCurrent value of the search input.
emptyState?() => ReactNodeRenders a custom empty state when data is empty and there is no active search.
isFetching?booleanWhen true, renders the loading state instead of the rows.
itemMenu?(item: T) => ReactNodeRenders a row-level menu (e.g. a kebab menu) for the given item.
pagination?PaginationControlPropsPagination control props passed through to the underlying data view.
searchPlaceholder?stringPlaceholder 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​

PropertyTypeDescription
accrualWaitingPeriodDaysnumber | nullDays before a newly enrolled employee begins accruing, or null for no waiting period.
carryoverLimitHoursnumber | nullMaximum hours that carry over on reset, or null for no limit.
maxAccrualHoursPerYearnumber | nullMaximum hours that can accrue per year, or null for no limit.
maxHoursnumber | nullMaximum balance an employee can hold, or null for no limit.
paidOutOnTerminationbooleanWhether the remaining balance is paid out when an employee is terminated.

PolicySettingsFormData​

Form values captured by the policy settings form.

Properties​

PropertyTypeDescription
accrualMaximumEnabledbooleanWhether an annual accrual cap is enabled.
balanceMaximumEnabledbooleanWhether a total balance cap is enabled.
carryOverLimitEnabledbooleanWhether a carry-over limit is enabled.
paidOutOnTerminationbooleanWhether accrued balance is paid out when an employee is terminated.
waitingPeriodEnabledbooleanWhether a waiting period is enabled.
accrualMaximum?numberMaximum hours that can accrue per year when PolicySettingsFormData.accrualMaximumEnabled is true.
balanceMaximum?numberMaximum hours an employee can hold in their balance at any time when PolicySettingsFormData.balanceMaximumEnabled is true.
carryOverLimit?numberMaximum hours that carry over when the policy resets when PolicySettingsFormData.carryOverLimitEnabled is true.
waitingPeriod?numberNumber 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​

PropertyTypeDescription
accrualMethodRateBasedAccrualMethodThe method by which time off accrues.
accrualRatenumberHours accrued per accrual period.
policyTypePolicyTypeKeyWhether the policy covers vacation or sick time.
accrualRateUnit?numberDivisor used to compute the per-unit accrual rate, if applicable.
resetDate?stringISO 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​

PropertyTypeDescription
employeeNamestringName of the employee being removed; interpolated into the dialog copy.
isOpenbooleanWhether the dialog is currently visible.
isPendingbooleanWhether the removal request is in flight; disables the confirm action while true.
onClose() => voidCalled when the user cancels or dismisses the dialog without confirming.
onConfirm() => voidCalled 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​

PropertyTypeDescription
balancenumber | nullCurrent balance in hours, or null for unlimited policies.
uuidstringUnique identifier for the employee.
firstName?string | nullEmployee's first name; combined with lastName to render the name column.
jobTitle?string | nullEmployee's job title; rendered in its own column unless hideJobTitle is set.
lastName?string | nullEmployee's last name; combined with firstName to render the name column.

TimeOffPolicyDetailPresentationBaseProps​

Shared base props for TimeOffPolicyDetailPresentation.

Properties​

PropertyTypeDescription
backLabelstringLabel for the back navigation link.
employeesPolicyDetailEmployeeTableData<TimeOffPolicyDetailEmployee>Employee table data and callbacks.
onBack() => voidCalled when the back navigation is clicked.
onTabChange(id: string) => voidCalled with the new tab id when the user switches tabs.
removeDialogRemoveDialogStateState for the employee removal confirmation dialog.
selectedTabIdstringThe currently active tab id.
titlestringPolicy name displayed as the page heading.
actions?ReactNode[]Optional action buttons rendered in the header.
className?stringCSS class name applied to the root element.
onAddEmployee?() => voidCalled when the add-employee action is clicked.
onDismissAlert?() => voidCalled when the success alert is dismissed.
subtitle?stringSecondary label, typically the policy type.
successAlert?stringOptional 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.

FieldDescription
titleThe policy name displayed as the page heading.
subtitleSecondary label, typically the policy type.
onBackCalled when the back navigation is clicked.
backLabelLabel for the back navigation link.
actionsOptional action buttons rendered in the header.
policyDetailsPolicy type and accrual configuration. See PolicyDetails.
policySettingsAccrual caps and termination settings. See PolicySettingsDisplay. Required for rate-based policies.
onChangeSettingsCalled when the change-settings action is clicked. Rate-based policies only.
selectedTabIdThe currently active tab id.
onTabChangeCalled with the new tab id when the user switches tabs.
employeesEmployee table data including data, searchValue, onSearchChange, onSearchClear, and optional itemMenu.
onAddEmployeeCalled when the add-employee action is clicked.
removeDialogState for the employee removal confirmation dialog.
successAlertOptional success message rendered as a dismissible alert.
onDismissAlertCalled when the success alert is dismissed.
classNameCSS class name applied to the root element.

UnlimitedPolicyDetails​

Policy details for an unlimited (no-accrual) time-off policy.

Properties​

PropertyTypeDescription
accrualMethod"unlimited"Accrual method discriminant — always 'unlimited' for this variant.
policyTypePolicyTypeKeyWhether the policy covers vacation or sick time.