fix: do not display approve button in more menu for unsubmitted reports#65057
Conversation
|
Note for reviewer: Since the condition in isApproveAction is based on isProcessingReport, I changed the function to return early. This avoids unnecessary calculations. |
|
@ahmedGaber93 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/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari20250701095937359.mp4MacOS: Desktop |
@linhvovan29546 there is no step 6 on your test steps 🙌 Also, both ONYX actions are the same |
|
@ahmedGaber93 I’ve split the test into two separate tests. |
|
@linhvovan29546 Why create 2 expense? Isn't one enough?
|
|
You can compare two expenses with one expense. The UI and logic differ in this case, and the issue seems to occur only on two expenses. |
I think the issue OP doesn't mention any steps to have that violation, Let's rewrite it as precondition step Precondition
|
Hmm! I will check while testing. |
The issue occur with one expense with me on latest staging 20250701093712974.mp4 |
|
Ah, I might have remembered incorrectly. I just tested with one expense, and this PR also fixes that issue. |
|
|
I've updated the test, one expense is enough. |
|
@linhvovan29546 Last thing instead of 'Follow the steps outlined ....'
|
|
Thank you! I’ve updated it. Does everything look good now? |
|
✋ 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/aldo-expensify in version: 9.1.74-2 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.74-10 🚀
|

Explanation of Change
This PR updates
isApproveActioningetSecondaryReportActionsto:Fixed Issues
$ #63137
PROPOSAL: #63137 (comment)
Tests
Test: 1
Test:2
Offline tests
Same as test above
QA Steps
Precondition
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))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
N/A. My Android app crashes when opening the Report preview (this also happens on the main branch), so I am unable to record a screenshot. Since this works on other platforms, I have skipped that step.
Android: mWeb Chrome
iOS: Native
Screen.Recording.2025-06-27.at.09.35.28.mov
iOS: mWeb Safari
Screen.Recording.2025-06-27.at.09.38.23.mov
MacOS: Chrome / Safari
Screen.Recording.2025-06-27.at.09.11.47.mov
MacOS: Desktop
Screen.Recording.2025-06-27.at.09.20.52.mov