fix: Distance - Error displayed when creating distance expense in workspace that not opened yet.#47599
Conversation
…kspace that not opened yet. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@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/VideosMacOS: Chrome / SafariScreen.Recording.2024-08-21.at.5.07.54.PM.movMacOS: DesktopScreen.Recording.2024-08-21.at.5.11.31.PM.movAndroid: NativeScreen.Recording.2024-08-21.at.5.34.29.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-21.at.5.31.59.PM.moviOS: NativeScreen.Recording.2024-08-21.at.5.27.39.PM.moviOS: mWeb SafariScreen.Recording.2024-08-21.at.5.14.41.PM.mov |
allgandalf
left a comment
There was a problem hiding this comment.
Changes LGTM and works well on all platforms
| const defaultRate = defaultMileageRate?.customUnitRateID ?? ''; | ||
| const rateID = canUseP2PDistanceRequests ? lastSelectedDistanceRates?.[policy?.id ?? ''] ?? defaultRate : defaultRate; |
There was a problem hiding this comment.
I find this to be quite a lot of question marks to follow in one line. I think something like this is easier to follow.
| const defaultRate = defaultMileageRate?.customUnitRateID ?? ''; | |
| const rateID = canUseP2PDistanceRequests ? lastSelectedDistanceRates?.[policy?.id ?? ''] ?? defaultRate : defaultRate; | |
| const defaultRate = defaultMileageRate?.customUnitRateID ?? ''; | |
| const lastSelectedRate = lastSelectedDistanceRates?.[policy?.id ?? ''] ?? defaultRate; | |
| const rateID = canUseP2PDistanceRequests ? lastSelectedRate : defaultRate; |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
✋ 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/puneetlath in version: 9.0.24-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.0.24-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.24-5 🚀
|
Details
Fixed Issues
$ #45856
PROPOSAL: #45856 (comment)
Tests
Clear cache and restart>Reset and refreshOffline tests
Clear cache and restart>Reset and refreshQA Steps
Clear cache and restart>Reset and refreshPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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_native.mp4
Android: mWeb Chrome
android_chrome_r.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4