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
{(isBetaEnabled(CONST.BETAS.GUSTO) || isBetaEnabled(CONST.BETAS.ZENEFITS)) && (
|| !!policy?.connections?.zenefits
!!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 Owner
Current Issue Owner: @mallenexpensify
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,
PolicyUtilshelpers, sync-failure routing, accounting-vs-HR group splits, and add the new TriNet-specific language strings. Mirrorsgusto1.4from the Gusto port.Depends on: Issue 4 (constants and types).
Implementation notes (from design doc)
src/libs/PolicyUtils.tsisZenefitsConnected(policy)parallel toisGustoConnected.isPolicyFeatureEnabledforIS_HR_ENABLEDto also checkpolicy?.connections?.zenefits.src/pages/workspace/WorkspaceInitialPage.tsxUpdate the
IS_HR_ENABLEDfeature state:src/pages/workspace/WorkspaceMoreFeaturesPage/index.tsxisActive:disabled:src/libs/AccountingUtils.tssrc/libs/ReportUtils.tssrc/libs/ReportActionsUtils.tsgetIntegrationSyncFailedMessageto route HR integration sync failures to the HR page.src/languages/en.ts(+ other locales)zenefitsblock insideworkspace.hr.syncStageNameswitch.Tests
PolicyUtilsTest.tscases forisZenefitsConnected.Issue Owner
Current Issue Owner: @mallenexpensify