Create per diem still appears under Quick action after Per diem feature is disabled#73073
Conversation
|
@abdulrahuman5196 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] |
Codecov Report❌ Patch coverage is
... and 14 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| isReportArchived: boolean | undefined, | ||
| isRestrictedToPreferredPolicy = false, | ||
| ) => { | ||
| if (quickAction?.action === CONST.QUICK_ACTIONS.PER_DIEM && !quickActionPolicy?.arePerDiemRatesEnabled) { |
There was a problem hiding this comment.
@nkdengineer Why are we moving this? Didn't your proposal suggest to remove this altogether since the optimistic data is updated, right?
There was a problem hiding this comment.
I forgot to mention. I tested the issue when users disable PerDiem on the second device, and BE didn't clear it through Pusher so I think we should add this safe guard here
There was a problem hiding this comment.
How is quick action normally added/removed via backend? Do we have separate api call for it? Can we check if we can use the same flow? If not we can add a followup request to fix this in backend as followup as well.
There was a problem hiding this comment.
Also kindly check on the jest failures
There was a problem hiding this comment.
merged main and the jest error was fixed
There was a problem hiding this comment.
How is quick action normally added/removed via backend? Do we have separate api call for it? Can we check if we can use the same flow? If not we can add a followup request to fix this in backend as followup as well.
@abdulrahuman5196 quick action is added through some APIs such as RequestMoney, ...
we don't have the specific API to add/remove it, so I think we can request BE change if needed
There was a problem hiding this comment.
@JS00001 What do you think here? Should we create followup request for backend? Or is frontend fix fine?
Regardless if we just fix in frontend as well, the issue will not be shown to the user.
There was a problem hiding this comment.
Im fine with frontend validation as well, so that we dont ever accidentily get out of sync
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-11-04.at.7.17.25.PM.movAndroid: mWeb ChromeScreen.Recording.2025-11-04.at.7.19.17.PM.moviOS: HybridAppScreen.Recording.2025-11-04.at.6.31.05.PM.moviOS: mWeb SafariScreen.Recording.2025-11-04.at.6.32.44.PM.movMacOS: Chrome / SafariScreen.Recording.2025-11-04.at.5.43.46.PM.movMacOS: DesktopScreen.Recording.2025-11-04.at.5.45.51.PM.mov |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @JS00001
🎀 👀 🎀
C+ Reviewed
|
✋ 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/JS00001 in version: 9.2.44-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.44-5 🚀
|
| isReportArchived: boolean | undefined, | ||
| isRestrictedToPreferredPolicy = false, | ||
| ) => { | ||
| if (quickAction?.action === CONST.QUICK_ACTIONS.PER_DIEM && !quickActionPolicy?.arePerDiemRatesEnabled) { |
There was a problem hiding this comment.
Coming from #76046, we should hide per-diem quick action if there's no rate
Explanation of Change
Fixed Issues
$ #72409
PROPOSAL: #72409 (comment)
Tests
Precondition:
Workspace has per diem rates
Offline tests
Same as tests
QA Steps
Same as tests
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.2025-10-21.at.15.54.30.mov
Android: mWeb Chrome
Screen.Recording.2025-10-21.at.15.47.41.mov
iOS: Native
Screen.Recording.2025-10-21.at.15.55.44.mov
iOS: mWeb Safari
Screen.Recording.2025-10-21.at.15.49.19.mov
MacOS: Chrome / Safari
Screen.Recording.2025-10-21.at.15.39.57.mov
MacOS: Desktop
Screen.Recording.2025-10-21.at.16.01.14.mov