[HR Import] Route HR fix connection Time Sensitive notifications to the Workspace HR page#91813
[HR Import] Route HR fix connection Time Sensitive notifications to the Workspace HR page#91813mhawryluk wants to merge 2 commits into
Conversation
…onnection types to their respective pages
|
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 |
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.
|
|
@sobitneupane 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e69dc55580
ℹ️ 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".
| : translate('homePage.timeSensitiveSection.fixPolicyConnection.defaultSubtitle'); | ||
|
|
||
| const isHRConnection = (CONST.POLICY.CONNECTIONS.HR_CONNECTION_NAMES as readonly PolicyConnectionName[]).includes(connectionName); | ||
| const fixRoute = isHRConnection ? ROUTES.WORKSPACE_HR.getRoute(policyID) : ROUTES.WORKSPACE_ACCOUNTING.getRoute(policyID); |
There was a problem hiding this comment.
Gate HR fix CTAs before routing to HR
When this renders for a broken HR connection, the CTA now always navigates to WORKSPACE_HR, but WorkspaceHRPage is blocked unless an HR beta is enabled (shouldBeBlocked) and the policy passes the control/admin access wrapper. TimeSensitiveSection only filters adminPolicies, so admins who can see this time-sensitive item without the HR beta/control access will land on the not-found page instead of somewhere they can fix the connection; either hide the HR item in those contexts or route to an accessible fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I guess we could, but we don't check for a beta when navigating to the HR page from Members and Workflows pages when a provider is connected. so I think it's okay here too
There was a problem hiding this comment.
I think it's fine too, since a user can have a broken connection only if they have a beta
|
@bernhardoj will review this one (merge.dev project) |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb Chromeandroid.mweb.mp4iOS: HybridAppios.mp4iOS: mWeb Safariios.mweb.mp4MacOS: Chrome / Safariweb.mp4 |
Explanation of Change
The Time Sensitive section on the home page surfaces a "Fix" CTA for every broken policy connection. Previously every broken connection: accounting (QBO, Xero etc.) and HR (Gusto, Zenefits, Merge HR) was rendered by
FixAccountingConnection, which hard-coded navigation toROUTES.WORKSPACE_ACCOUNTING. A user with a broken Gusto/Zenefits/Merge HR connection would click "Fix" and land on the Accounting page, now they're correctly routed to the HR page. Also fixes the title of the menu to use the provider name for merge HR connections (Workday, BambooHR...) instead of "Merge HR".Fixed Issues
$ #91712
PROPOSAL: N/A
Tests
also:
Offline tests
N/A
QA Steps
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
Nagranie.z.ekranu.2026-05-27.o.11.45.04.mov