Skip to main content

DashboardFlow

Hub for viewing and managing a single employee's profile, pay, and documents.

Tabs

The dashboard organizes an employee's payroll information into four tabs. Switching tabs emits employee/dashboard/tabChange.

  • Basic details — legal name, start date, SSN, date of birth, and personal email, plus home address and work address cards. Fields are read-only with "Edit"/"Manage" CTAs.
  • Job and pay — compensation (one job, or a table of jobs when the primary job is nonexempt), payment method (direct-deposit bank accounts), deductions (garnishments), and paystub history. Lists paginate.
  • Taxes — federal tax withholding (supports both pre-2020 and Rev 2020 W-4 versions, so the visible fields vary with the W-4 on file) and per-state tax withholding records.
  • Documents — a read-only table of employee forms (W-2s, W-4s, direct-deposit authorizations, and other documents) with a "View" CTA per row.

Remarks

Renders a tabbed view of an employee's profile (Basic details, Job and pay, Taxes, Documents), wires the card surfaces to their corresponding edit screens via an internal state machine, and surfaces success alerts at the top of the dashboard after each successful edit. Wraps the dashboard in error and suspense boundaries.

Every tab section of the dashboard is also exported as a self-contained block that can be dropped into a custom layout without the surrounding dashboard chrome (see the blocks below).

Each block wraps its read-only card, its edit form, and the card↔form transitions as a single drop-in. For cases where that built-in orchestration doesn't fit — rendering a form in a modal, driving navigation via a router, or showing a card read-only — each block's card and form are also exported individually (e.g. CompensationCard, CompensationEditForm). Using the individual pieces means owning the swap, any success alerts, and cross-component state yourself.

The dashboard composes self-fetching cards and their edit forms and forwards every event they emit to the partner via onEvent; its internal state machine also reacts to a subset of these events to swap between the cards and edit screens and to surface success alerts. The table below is the complete, current set of events observable from DashboardFlow, grouped by the tab that emits them.

Example

App.tsx
import { EmployeeManagement } from '@gusto/embedded-react-sdk'

function MyApp() {
return (
<EmployeeManagement.DashboardFlow
employeeId="4b3f930f-82cd-48a8-b797-798686e12e5e"
onEvent={() => {}}
/>
)
}

DashboardFlowProps

Props for DashboardFlow.

PropertyTypeDescription
employeeIdstringThe associated employee 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
employee/management/profile/editRequestedFired when "Edit" is clicked on the Basic details (Profile) card{ employeeId: string }
employee/management/profile/updatedFired after the basic-details edit form is saved; the dashboard returns to the cards and surfaces the "Profile updated" alertUpdated Employee entity
employee/management/profile/editCancelledFired when the user clicks Cancel on the basic-details edit form; the dashboard returns to the cards
employee/management/homeAddress/editRequestedFired when "Manage" is clicked on the Home address card{ employeeId: string }
employee/management/homeAddress/createdFired after a new home address is created on the manage screen; the manage screen stays openCreated EmployeeAddress entity
employee/management/homeAddress/updatedFired after a home address is updated on the manage screen; the manage screen stays openUpdated EmployeeAddress entity
employee/management/homeAddress/deletedFired after a non-active home address is deleted on the manage screen; the manage screen stays openDeleted EmployeeAddress entity
employee/management/homeAddress/editCancelledFired when the user clicks Back on the manage screen; the dashboard returns to the cards
employee/management/workAddress/editRequestedFired when "Manage" is clicked on the Work address card{ employeeId: string }
employee/management/workAddress/createdFired after a new work address is created on the manage screen; the manage screen stays openCreated EmployeeWorkAddress entity
employee/management/workAddress/updatedFired after a work address is updated on the manage screen; the manage screen stays openUpdated EmployeeWorkAddress entity
employee/management/workAddress/deletedFired after a work address is deleted on the manage screen; the manage screen stays openDeleted EmployeeWorkAddress entity
employee/management/workAddress/editCancelledFired when the user clicks Back on the manage screen; the dashboard returns to the cards
employee/management/compensation/card/editRequestedFired when an "Edit" CTA is clicked for a job on the Compensation card{ employeeId: string, jobId: string }
employee/management/compensation/card/addRequestedFired when "Add job" is clicked from the Compensation card's empty state{ employeeId: string }
employee/management/compensation/card/addAnotherRequestedFired when "Add another job" is clicked on the Compensation card{ employeeId: string }
employee/management/compensation/card/jobDeletedFired after a non-primary job is deleted via the card's confirm dialog{ employeeId: string, jobId: string }
employee/management/compensation/card/changeCancelledFired after a scheduled future-dated change is cancelled from the card{ employeeId: string, compensationId: string }
employee/management/compensation/editForm/submittedFired after an edit-compensation save completes; the dashboard returns to the cardsUpdated Compensation entity
employee/management/compensation/editForm/cancelledFired when the user cancels the edit-compensation form; the dashboard returns to the cards
employee/management/compensation/addJobForm/submittedFired after the first job and compensation are saved; the dashboard returns to the cards and surfaces the "Job added" alertUpdated Compensation entity
employee/management/compensation/addJobForm/cancelledFired when the user cancels the add-job form; the dashboard returns to the cards
employee/management/compensation/addAnotherJobForm/submittedFired after a secondary job and compensation are saved; the dashboard returns to the cards and surfaces the "Job added" alertUpdated Compensation entity
employee/management/compensation/addAnotherJobForm/cancelledFired when the user cancels the add-another-job form; the dashboard returns to the cards
employee/management/paymentMethod/card/addRequestedFired when "Add bank account" / "Add another bank account" is clicked on the Payment card
employee/management/paymentMethod/card/splitRequestedFired when "Split paycheck" is clicked on the Payment card
employee/management/paymentMethod/card/bankAccountDeletedFired after a bank account is deleted from the card; the dashboard surfaces the "Bank account deleted" alertResponse from the Delete a bank account endpoint
employee/management/paymentMethod/bankForm/submittedFired after a new bank account is saved; the dashboard returns to the cards and surfaces the "Bank account added" alertCreated EmployeeBankAccount entity
employee/management/paymentMethod/bankForm/cancelledFired when the user cancels the add-bank-account screen; the dashboard returns to the cards
employee/management/paymentMethod/splitForm/submittedFired after the split configuration is saved; the dashboard returns to the cards and surfaces the "Split updated" alertUpdated EmployeePaymentMethod entity
employee/management/paymentMethod/splitForm/cancelledFired when the user cancels the split-paycheck screen; the dashboard returns to the cards
employee/management/deductions/card/addRequestedFired when "Add deduction" is clicked on the Deductions card{ employeeId: string }
employee/management/deductions/card/editRequestedFired when a row's "Edit" menu item is chosen on the Deductions cardThe Garnishment row being edited
employee/management/deductions/card/deletedFired after the soft-delete dialog is confirmed; the dashboard surfaces the "Deduction deleted" alertThe now-inactive Garnishment
employee/management/deductions/editForm/createdFired after a new deduction is created; the dashboard returns to the cards and surfaces the "Deduction added" alertThe created Garnishment
employee/management/deductions/editForm/updatedFired after a deduction is updated; the dashboard returns to the cards and surfaces the "Deduction updated" alertThe updated Garnishment
employee/management/deductions/editForm/cancelledFired when the user cancels the add/edit deduction form; the dashboard returns to the cards
employee/management/paystubs/card/downloadRequestedFired when a paystub row's download button is clicked, before the PDF is fetched{ employeeId: string, payrollUuid: string }
employee/management/paystubs/card/downloadedFired after the paystub PDF is fetched and opened in a new tab{ employeeId: string, payrollUuid: string }
employee/management/federalTaxes/card/editRequestedFired when "Edit" is clicked on the Federal taxes card{ employeeId: string }
employee/management/federalTaxes/editForm/submittedFired after a federal-taxes save succeeds; the dashboard returns to the cards and surfaces the "Federal taxes updated" alertUpdated EmployeeFederalTax entity
employee/management/federalTaxes/editForm/cancelledFired when the user cancels the federal-taxes edit form; the dashboard returns to the cards
employee/management/stateTaxes/editRequestedFired when "Edit" is clicked on the State taxes card{ employeeId: string }
employee/management/stateTaxes/updatedFired after a state-taxes save succeeds; the dashboard returns to the cards and surfaces the "State taxes updated" alert{ employeeStateTaxesList: EmployeeStateTaxesList[] }
employee/management/stateTaxes/editCancelledFired when the user cancels the state-taxes edit form; the dashboard returns to the cards
employee/management/documents/card/viewRequestedFired when a document row's "View" CTA is clicked; the dashboard swaps to the read-only document viewer{ employeeId: string, formId: string }
CANCELFired when the user clicks Back in the document viewer; the dashboard returns to the cards
employee/dashboard/tabChangeFired when the user switches dashboard tabs{ tab: 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents' }
employee/dismissFired when the user dismisses a top-of-dashboard success alert

Sub-components

ComponentDescription
DashboardEmployee self-service dashboard summarizing a single employee's basic details, job and pay, taxes, and documents.
ProfileEditFormStandalone edit form for an employee's basic profile details.
HomeAddressEditFormStandalone employee home address edit form for creating, updating, and deleting addresses.
WorkAddressEditFormStandalone employee work address edit form for creating, updating, and deleting addresses.
FederalTaxesEditFormStandalone form for editing an employee's federal tax (W-4) withholdings — filing status, multiple-jobs flag, dependents, other income, deductions, and extra withholding.
StateTaxesEditFormStandalone edit screen for the state-tax management flow. Renders the shared state-tax form against the Employee.Management.StateTaxes namespace and emits scoped management events on submit and cancel, so partner copy overrides on the management namespace do not leak into the onboarding flow.
PaymentMethodBankFormStandalone bank-account form for the management flow.
PaymentMethodSplitFormStandalone split-paycheck form for the management flow.
CompensationAddJobFormStandalone form for adding an employee's first job and compensation from the management surface.
CompensationEditFormStandalone form that edits the compensation for a single job, branching automatically between editing the current compensation and an already-scheduled future-dated change.
CompensationAddAnotherJobFormStandalone form for adding a secondary job and compensation to an employee from the management surface.
DeductionsEditFormStandalone add/edit surface for a single employee deduction.
DocumentManagerRead-only document viewer for the admin-facing employee dashboard. Renders the selected form's PDF — including unsigned forms, which are shown as-is. Signing is intentionally not offered here; forms are signed by the employee during onboarding, not by an admin viewing the dashboard.

Step flow

The dashboard is a hub: the Dashboard cards view is the resting state. A card's edit/manage CTA opens that section's edit form; submitting or cancelling returns to the cards, and a successful save shows a dismissible success alert. The documents card is the exception — its View CTA opens DocumentManager, a read-only viewer that returns on Back; signing happens during employee onboarding, not here.

Some actions stay on the cards view without a screen swap: switching tabs (employee/dashboard/tabChange), dismissing a success alert (employee/dismiss), and deleting a bank account or deduction.

Empty states

Each section handles missing data on its own: compensation shows an empty state whose header CTA switches from "Edit" to "Add job"; payment methods, deductions, and state taxes each show a "none on file" message with the relevant add CTA; paystubs indicate that records appear after payroll is run; documents show a "No forms" message.

Endpoints