Workspace currency optimistic actions update#33171
Conversation
|
|
||
| // Because of the Expense reports are stored as negative values, we substract the total from the amount | ||
| iouReport.total -= amount; | ||
| if (policy.outputCurrency === currency) { |
There was a problem hiding this comment.
I think we better use lodash here so that it does not crash when we make a distance request in the workspace chat because we are not passing any policy here and accessing outputCurrency on undefined will crash the app.
|
@c3024 Upon further inspection, I noticed that this does solve the following case:
We see that the But since it seems that we don't do that, would be be alright if we check for the currency of the if (lodashGet(iouReport, 'currency') === currency) {The question basically is that if the user updates the workspace default currency, then should the
|
|
Nice find.
The currency and the amount of the |
|
Yes @c3024 that would require backend changes. Moreover, I think we need to make the decision whether that conversion should happen or not as well. But I think that can be a separate issue as well... maybe feedback from an internal engineer is required. |
I too think is outside the scope of this issue.
We should get the currency from iouReport like you pointed out. This is not inconsistent with the Slack discussion as well. Please make those changes. We will refer our discussion to the CME for final approval of PR. If they suggest something different then their suggested changes can be incorporated. |
|
@c3024 Made the requested changes |
Reviewer Checklist
Screenshots/VideosAndroid: NativereportPreviewEshTest1Android.movreportPreviewEshTest2Android.movAndroid: mWeb ChromeiOS: NativereportPreviewEshTest1iOSNative.movreportPreviewEshTest2iOSNative.moviOS: mWeb SafarireportPreviewEshTestiOSSafari.movMacOS: Chrome / SafarireportPreviewEshTestMacChrome.movMacOS: DesktopreportPreviewEshTestMacDesktop.mov |
|
Please attach test videos of all platforms. |
|
@c3024 Really sorry for the delay... I have been trying to make the web version work on mWeb safari but for some reason the simulator doesn't load beyond the logo page. Videos for other platforms has been attached. |
|
Fixed the conflict that came up |
|
Ah sorry can you fix the conflict @esh-g ? |
|
@nkuoch Fixed! |
|
✋ 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/nkuoch in version: 1.4.22-0 🚀
|
|
🚀 Deployed to staging by https://github.com/nkuoch in version: 1.4.22-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.22-6 🚀
|
| onPress={() => IOU.submitReport(props.iouReport)} | ||
| /> | ||
| )} | ||
| {!isScanning && (numberOfRequests > 1 || hasReceipts) && ( |
There was a problem hiding this comment.
Coming from #33874
We should have checked for a partial merchant. i.e. (none)
Details
Fixed Issues
$ #31638
PROPOSAL: #31638 (comment)
Tests
Test 1
Test 2
Offline tests
QA Steps
Test 1
Test 2
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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
325822be-5b00-4975-b866-59d629090c07.mp4
ef0777e2-8964-4bb6-ba88-7941ede3e90e.mp4
Android: mWeb Chrome
041b2ba4-5cc3-4181-aa6f-4a5364aa9790.mp4
b4d7b0a6-443c-4909-a760-1a887ada23a2.mp4
iOS: Native
3e7c8dc7-04bb-4755-93fa-dc8dda8d3201.mp4
18d3b201-afbd-4380-865f-ac32a2278eba.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
2380fe02-f64e-4cdc-a518-5d3647e30e0e.mp4
c4606897-d3d0-4c75-9466-62e1cc1b680f.mp4
MacOS: Desktop
04da6809-a236-4414-9aa2-c4bba9af2e72.mp4
91b4692a-2ce0-43e9-9b80-5ddb450b1bd9.mp4