EmployeeListFlow
Hub for viewing and managing all employees, including onboarding new ones.
Remarks
Drop-in entry point for managing all employees in a company. Begins on the management employee list and routes into DashboardFlow, TerminationFlow, or OnboardingExecutionFlow based on the action the admin invokes on a row (or the "Add employee" CTA). A "Back to employees" header is added to each sub-flow so the admin can return to the list at any time.
The flow forwards every event emitted by its blocks to onEvent;
see the events table on each block for the full set of events and
payloads observable from this flow.
Example
import { EmployeeManagement } from '@gusto/embedded-react-sdk'
function MyApp() {
return (
<EmployeeManagement.EmployeeListFlow
companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365"
onEvent={() => {}}
/>
)
}
EmployeeListFlowProps
Props for EmployeeListFlow.
| 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.
Sub-components
| Component | Description |
|---|---|
| EmployeeList | Renders a tabbed list of a company's employees split across Active, Onboarding, and Dismissed tabs, with per-row actions tailored to each tab (edit, delete, dismiss, rehire). |
| DashboardFlow | Hub for viewing and managing a single employee's profile, pay, and documents. |
| TerminationFlow | Guided flow to terminate an employee and arrange their final paycheck. |
| EmployeeOnboarding.OnboardingExecutionFlow | Guided flow to onboard an employee. |
Step flow
The flow rests on the management employee list and routes into one of three sub-flows based on the row action invoked (or the "Add employee" CTA):
- Edit (
employee/update) →DashboardFlow - Dismiss (
employee/dismiss) →TerminationFlow - Add employee (
employee/create) →OnboardingExecutionFlow
Each sub-flow is given a "Back to employees" header that emits employee/returnToList to come back to the list. The onboarding sub-flow also returns to the list when it completes (company/employees) or is canceled (CANCEL).
The list itself is tabbed into Active, Onboarding, and Dismissed employees, with per-row actions tailored to each tab (edit, delete, dismiss, rehire).