[NoQA] [HR Import] Refactor policyUtils helpers for HR integrations#90959
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0462fc73b4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fa3e9f176
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
|
|
||
| /** Returns display info for every HR provider currently connected to the policy (Gusto, Zenefits, and Merge HR). */ | ||
| function getConnectedHRProviders(policy?: OnyxEntry<Policy>): HRProviderInfo[] { |
There was a problem hiding this comment.
I think we settled that there will only be one connection max for a workspace
There was a problem hiding this comment.
This was the task specification but changing it makes since we're allowing only 1
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| gusto: 'Gusto', | ||
| billCom: 'Bill.com', | ||
| zenefits: 'TriNet', | ||
| merge_hris: 'Merge HR', |
There was a problem hiding this comment.
it's together with other integrations now, keeping context together
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-05-19.12.28.33.movAndroid: mWeb Chrome2026-05-19.12.37.20.moviOS: HybridApp2026-05-19.12.28.33.moviOS: mWeb Safari2026-05-19.12.25.14.movMacOS: Chrome / Safari2026-05-19.12.15.09.mov |
|
I know that I use mocks for testing 😅 2026-05-19.12.14.00.mov |
I don't think there should be a situation where workflows are configured via HR, but HR is disabled. |
|
Good then 😁 |
| function isMergeHRConnected(policy?: OnyxEntry<Policy>): boolean { | ||
| return !!policy?.connections?.merge_hris; | ||
| } |
There was a problem hiding this comment.
does it matter if they are added but not yet set up/synced?
There was a problem hiding this comment.
For now we're assuming that we're showing isMergeHRConnected even when sync has failed / is syncing, but the RBR & UI is not in place yet.
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.78-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.78-1 🚀
|
Explanation of Change
NOTE: This branch is based off #90949.
This PR adds new helpers and generalizes the Gusto-specific helpers so they work for any HR provider.
Fixed Issues
$ #90596
PROPOSAL:
Tests
Verify that Gusto integration is working as before:
injectconnection mock into FE (look snippet below)Snippet:
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Screen.Recording.2026-05-18.at.15.02.25.mov