Skip to content

[Due for payment 2026-05-26] [TriNet] Wire TriNet into HR feature toggle, beta gate, shared utils, and language strings #90584

@yuwenmemon

Description

@yuwenmemon

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

Scope

Glue PR: wire TriNet into the existing HR feature flag, More Features toggle, PolicyUtils helpers, sync-failure routing, accounting-vs-HR group splits, and add the new TriNet-specific language strings. Mirrors gusto1.4 from the Gusto port.

Depends on: Issue 4 (constants and types).

Implementation notes (from design doc)

src/libs/PolicyUtils.ts

  • Add isZenefitsConnected(policy) parallel to isGustoConnected.
  • Update isPolicyFeatureEnabled for IS_HR_ENABLED to also check policy?.connections?.zenefits.

src/pages/workspace/WorkspaceInitialPage.tsx

Update the IS_HR_ENABLED feature state:

[CONST.POLICY.MORE_FEATURES.IS_HR_ENABLED]:
    (isBetaEnabled(CONST.BETAS.GUSTO) || isBetaEnabled(CONST.BETAS.ZENEFITS)) &&
    (policy?.isHREnabled === true || !!policy?.connections?.gusto || !!policy?.connections?.zenefits) &&
    canPolicyAccessFeature(policy, CONST.POLICY.MORE_FEATURES.IS_HR_ENABLED),

src/pages/workspace/WorkspaceMoreFeaturesPage/index.tsx

  • Update beta gate:
{(isBetaEnabled(CONST.BETAS.GUSTO) || isBetaEnabled(CONST.BETAS.ZENEFITS)) && (
  • Update isActive:
|| !!policy?.connections?.zenefits
  • Update disabled:
!!policy?.connections?.gusto || !!policy?.connections?.zenefits

src/libs/AccountingUtils.ts

  • Add Zenefits to both mapping objects.

src/libs/ReportUtils.ts

  • Add TriNet icon case beside Gusto.

src/libs/ReportActionsUtils.ts

  • Update getIntegrationSyncFailedMessage to route HR integration sync failures to the HR page.

src/languages/en.ts (+ other locales)

  • Add zenefits block inside workspace.hr.
  • Add TriNet sync stages to syncStageName switch.

Tests

  • Add PolicyUtilsTest.ts cases for isZenefitsConnected.
  • Verify the HR feature flag activates the LHN HR row for Zenefits-connected policies.
  • Manual: per Manual Test Doc Release 1 sections covering HR toggle visibility and upgrade flow.
Issue OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2EngineeringNewFeatureSomething to build that is a new item.

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