-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Zero amount not displayed in receipt and expense details for distance expense #58649
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
I'm just wondering, as per some comments in the thread if the |
If we don't have the amount I think we should display as empty. |
The PR has been updated to cover that case |
const hasRoute = hasRouteTransactionUtils(transactionBackup ?? transaction, isDistanceRequest); | ||
const pendingTransactionAmount = transaction?.pendingAction && isDistanceRequest && !hasRoute ? undefined : transactionAmount; | ||
const formattedTransactionAmount = | ||
pendingTransactionAmount !== null && pendingTransactionAmount !== undefined ? convertToDisplayString(pendingTransactionAmount, transactionCurrency) : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we define pendingTransactionAmount !== null && pendingTransactionAmount !== undefined
in a seperate const to avoid repeating ourselves? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I've updated the code to separate the pending amount check into a new const
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
@ryntgh Something I just noticed is that the amount doesn't show up if we change it while the request is pending: Screen.Recording.2025-03-20.at.17.15.51.mov |
Ah yeah, you're right! I've updated the code to cover that edge case. Could you please check it again? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
@ryntgh I will review now, but do you mind merging main? I think some lint issues are fixed |
Sure, I've merged latest main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
✋ 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/rlinoz in version: 9.1.18-0 🚀
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.1.18-4 🚀
|
Explanation of Change
Fixed Issues
$ #58478
PROPOSAL: #58478 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
65, Pappammal Koil, Vaithikuppam, Puducherry, India & 67, Pappammal Koil, Vaithikuppam, Puducherry, India.
MoneyRequestView
is 0.00PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-mWeb.mp4
MacOS: Chrome / Safari
MacOS-Chrome.mp4
MacOS: Desktop
MacOS-Desktop.mp4