Add itemized receipt changelog support and fix manual approval threshold bug#87414
Add itemized receipt changelog support and fix manual approval threshold bug#87414
Conversation
…old format, fix bug - Add UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPT action type to CONST - Add original message fields for itemized receipt amounts - Add getPolicyChangeLogMaxExpenseAmountNoItemizedReceiptMessage function - Add dispatch in PureReportActionItem and SidebarUtils - Add English and Spanish translations for itemized receipt changelogs - Fix bug in getUpdatedManualApprovalThresholdMessage that checked oldLimit twice instead of checking newLimit on the second clause Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: The diff is too large to include in this comment (64KB), so I've created a gist for you: 📋 View the translation diff here 📋 Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the Prettier check failure: import statements in |
Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the failing checks: added missing |
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.
|
|
All checks are now passing. The latest run shows every substantive check green — typecheck, ESLint, Prettier, all 8 test jobs, Storybook, iOS build, Android build, spellcheck, codecov, and CLA all pass. The only remaining item is It's possible the checks were still running when you posted — the most recent push triggered a fresh CI run and everything completed successfully. |
|
The failing Evidence:
You can re-run the check, but no code changes are needed. |
|
@MelvinBot please update the variable names to isOldLimitDisabled and isNewLimitDisabled instead of oldIsDisabled and newIsDisabled |
…sabled Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Renamed |
…ble reference The file on main was refactored from useState/isModalVisible to useConfirmModal but a reference to isModalVisible was left on line 85 (SelectCountryStep's disableAutoFocus prop). This caused TS2304 when CI merges main into the branch. Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the failing typecheck. Root cause: On `main`, `AddNewCardPage.tsx` was refactored from `useState`/`isModalVisible` to `useConfirmModal`, but a stale reference to `isModalVisible` was left on line 85 (``). When CI merges `main` into this branch, that broken reference caused `TS2304: Cannot find name 'isModalVisible'`. Fix: Updated the branch's copy of `AddNewCardPage.tsx` to match `main`'s version with the stale `isModalVisible` prop removed from `SelectCountryStep`. |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
Explanation of Change
This PR adds frontend support for the itemized receipt changelog action type and fixes a bug in the manual approval threshold message, to match the formatting changes made in https://github.com/Expensify/Web-Expensify/pull/51501.
Itemized receipt changelog:
UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPTaction type toCONST.tsoldMaxExpenseAmountNoItemizedReceiptandnewMaxExpenseAmountNoItemizedReceiptfields toOriginalMessage.tsgetPolicyChangeLogMaxExpenseAmountNoItemizedReceiptMessagefunction inReportActionsUtils.ts(mirrors the existingNoReceiptversion)PureReportActionItem.tsxandSidebarUtils.tsBug fix:
getUpdatedManualApprovalThresholdMessagewhich checkedtypeof oldLimit !== 'number'twice instead of checkingnewLimiton the second clause. This meantnewLimitwas never validated, so if it wasundefined, the function would produce incorrect output instead of falling back togetReportActionText.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/616183
Tests
POLICYCHANGELOG_UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPTreport actionPOLICYCHANGELOG_UPDATE_MANUAL_APPROVAL_THRESHOLDaction with undefinednewLimitnow falls back togetReportActionTextinstead of showing "undefined"Offline tests
N/A - these are display-only changes for server-generated report actions.
QA Steps
Same as tests.
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
Android: Native
N/A - display-only changelog text changes
Android: mWeb Chrome
N/A - display-only changelog text changes
iOS: Native
N/A - display-only changelog text changes
iOS: mWeb Safari
N/A - display-only changelog text changes
MacOS: Chrome / Safari
N/A - display-only changelog text changes