Skip to content

[TriNet] Build ZenefitsApprovalModePage settings page #90583

@yuwenmemon

Description

@yuwenmemon

Parent: https://github.com/Expensify/Expensify/issues/625136
Design doc: https://docs.google.com/document/d/1TGdZYwm4_fvPOZtUziiz27bwVRqYm6HuEGopUYWNg8Y/edit

Scope

Build the Approval mode settings page reachable from the TriNet card's push-row on the HR page. Three radio options (Basic / Manager / Custom) with a draft state, Save button, and warning confirm modal before save. Mirrors gusto1.8 from the Gusto port.

Depends on: Issue 6 (updateZenefitsApprovalMode action) and Issue 7 (HR card push-row).

Implementation notes (from design doc)

src/pages/workspace/hr/zenefits/ZenefitsApprovalModePage.tsx

Mirror src/pages/workspace/hr/gusto/GustoApprovalModePage.tsx. Uses SettingsNavigatorParamList (not WorkspaceSplitNavigatorParamList) since it's an RHP screen registered in ModalStackNavigators.

  • Three radio options (Basic / Manager / Custom) using SelectionList and SingleSelectListItem.
  • Draft state, Save button, warning confirm modal before saving.
  • Calls updateZenefitsApprovalMode on confirm.
  • AccessOrNotFoundWrapper:
shouldBeBlocked={!isBetaEnabled(CONST.BETAS.ZENEFITS) || (!!policy && !isZenefitsConnected(policy))}

Tests

  • Unit / component test: page renders with current approval mode selected; selecting a new mode and saving triggers updateZenefitsApprovalMode with the right payload.
  • Component test: warning confirm modal appears before save and dismisses cleanly on cancel.
  • Manual: per Manual Test Doc Release 1 "Approval mode update" section.
Issue OwnerCurrent Issue Owner: @ShridharGoel

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

CRITICAL

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions