Fix per diem destination not showing with multiple workspaces#81277
Conversation
| @@ -30,6 +31,7 @@ function IOURequestStepPerDiemWorkspace({route, navigation}: IOURequestStepPerDi | |||
| return; | |||
| } | |||
| const perDiemUnit = getPerDiemCustomUnit(policy); | |||
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
The isDraft parameter is hardcoded to true, but similar code in IOURequestStepTimeWorkspace.tsx uses shouldUseTransactionDraft(action) to determine whether to use draft mode or not. This inconsistency violates the DRY principle and may cause bugs when the action is not a draft action.
Suggested fix:
import {shouldUseTransactionDraft} from '@libs/IOUUtils';
// Inside the component:
const isTransactionDraft = shouldUseTransactionDraft(action);
// In the onSelectWorkspace callback:
setTransactionReport(transactionID, {reportID: policyExpenseReportID}, isTransactionDraft);This matches the pattern used in IOURequestStepTimeWorkspace.tsx (line 23 and line 37).
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
Pujan92
left a comment
There was a problem hiding this comment.
LGTM!
Screen.Recording.2026-02-06.at.18.43.13.mov
|
@youssef-lr, kindly bump. thanks. |
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.3.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.16-9 🚀
|
Explanation of Change
Fixed Issues
$ #80406
PROPOSAL: #80406 (comment)
Tests
Precondition:
Offline tests
Same as Tests
QA Steps
Same as Tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.1404-11-17.at.4.55.32.PM.mov
Android: mWeb Chrome
Screen.Recording.1404-11-17.at.4.58.54.PM.mov
iOS: Native
Screen.Recording.1404-11-17.at.5.02.36.PM.mov
iOS: mWeb Safari
Screen.Recording.1404-11-17.at.5.05.34.PM.mov
MacOS: Chrome / Safari
Screen.Recording.1404-11-17.at.4.45.09.PM.mov