[CP Staging] Fix amount value in header & report preview#60824
[CP Staging] Fix amount value in header & report preview#60824mountiny merged 9 commits intoExpensify:mainfrom
Conversation
|
@allgandalf 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-04-24.at.9.29.10.PM.movScreen.Recording.2025-04-24.at.9.41.32.PM.movMacOS: DesktopScreen.Recording.2025-04-24.at.9.33.01.PM.mov |
allgandalf
left a comment
There was a problem hiding this comment.
Tested on macOS and works great,
since this is a DB approving faster, heading off to dinner so didn't upload native videos yet, but tested on iOS and it worked fine, so good to merge else i will upload native videos in ~45 mins
|
@JakubKorytko conflictsssss |
| [CONST.REPORT.REPORT_PREVIEW_ACTIONS.APPROVE]: ( | ||
| <Button | ||
| text={translate('iou.approve')} | ||
| text={translate('iou.approve', {formattedAmount: getTotalAmountForIOUReportPreviewButton(iouReport, policy, CONST.REPORT.REPORT_PREVIEW_ACTIONS.APPROVE)})} |
There was a problem hiding this comment.
NOTE TO SELF:
Report issues where we sometimes use CONSt and sometimes, secondary actions on slack
|
And we are nukedddd!!! Screen.Recording.2025-04-24.at.10.42.59.PM.mov |
| } | ||
| return options; | ||
| }, [moneyRequestReport, reportActions, selectedTransactionsID, session?.accountID, setSelectedTransactionsID, translate]); | ||
| const selectedTransactionsOptions = useSelectedTransactionsActions({report: moneyRequestReport, reportActions, session, onExportFailed: () => setIsDownloadErrorModalVisible(true)}); |
This comment was marked as outdated.
This comment was marked as outdated.
allgandalf
left a comment
There was a problem hiding this comment.
Works well!!
Screen.Recording.2025-04-24.at.11.57.14.PM.mov
mountiny
left a comment
There was a problem hiding this comment.
Thanks! this code was already reviewed and tested before for the new component but this is to fix issues in old previews
| * @param flags.shouldShowApproveButton - Flag indicating if the approve button should be shown. | ||
| * @returns - Returns the type of button that should be displayed based on the input flags. | ||
| */ | ||
| const getIOUReportPreviewButtonType = ({ |
There was a problem hiding this comment.
I was like I do not remember reverting this 😂
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…ove-0-00 [CP Staging] Fix amount value in header & report preview (cherry picked from commit 0e0c185) (CP triggered by mountiny)
…649716162-1 🍒 Cherry pick PR #60824 to staging 🍒
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.1.32-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.1.32-8 🚀
|
Explanation of Change
Currently the amount is calculated correctly for the Better Expense Report view, but it does not work on the current view.
This PR reuses the same logic for the buttons on the current view.
Fixed Issues
$ #60778
PROPOSAL: N/A
Tests
Offline tests
Same as tests
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))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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Web.mov
MacOS: Desktop