Add DualEntry integration export pages - #97513
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e00d20908e
ℹ️ 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".
| cardList ?? {}, | ||
| CONST.COMPANY_CARDS.EXPORT_CARD_TYPES.NVP_DUALENTRY_EXPORT_ACCOUNT, | ||
| ), | ||
| onAdvancedPagePress: () => null, |
There was a problem hiding this comment.
Hide the dead DualEntry advanced row
For a connected DualEntry workspace, PolicyAccountingPage still renders the standard Advanced menu item and wires it to integrationData?.onAdvancedPagePress, but this DualEntry handler is a no-op and there are no DualEntry advanced routes/pages in this change. Users will see an enabled Advanced row that does nothing when tapped, while it can still show pending/error badges for the listed advanced settings; either hide the row for DualEntry or add the page it should navigate to.
Useful? React with 👍 / 👎.
| value: DualEntryAccount['id']; | ||
| }; | ||
|
|
||
| function DualEntryCompanyCardAccountPage({policy}: WithPolicyConnectionsProps) { |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
This file is a near-verbatim copy of DualEntryCompanyCardAccountPage.tsx — the account-list building (dualentryData?.accounts?.filter(... CREDIT_CARD || BANK).map(...)), headerContent, listEmptyContent, and the entire SelectionScreen render are duplicated between the two pages, differing only in which account ID field is read/written. The duplication also carried over a copy-paste bug: this Expensify Card page still declares its component as function DualEntryCompanyCardAccountPage and passes displayName="DualEntryCompanyCardAccountPage", so it renders under the wrong name.
Extract the shared account-selection logic (filtering active credit-card/bank accounts, empty/header content, and the SelectionScreen wiring) into a single reusable component/hook that takes the selected ID + update handler as params, and have both pages consume it. At minimum, rename this component and its displayName to DualEntryExpensifyCardAccountPage to avoid the incorrect name.
function DualEntryExpensifyCardAccountPage({policy}: WithPolicyConnectionsProps) {
// ...
return (
<SelectionScreen
displayName="DualEntryExpensifyCardAccountPage"
// ...
/>
);
}
export default withPolicyConnections(DualEntryExpensifyCardAccountPage);Reviewed at: e00d209 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
|
🚧 dubielzyk-expensify 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! 🧪🧪
|
|
Initial test looks good 👍 |
JmillsExpensify
left a comment
There was a problem hiding this comment.
LGTM, part of an existing product initiative.
Explanation of Change
Fixed Issues
$ #97238
PROPOSAL:
Tests
Test 1
Test 2
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari