-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix delete conditions #62997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix delete conditions #62997
Conversation
|
@hungvu193 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 / SafariMacOS: Desktop |
allgandalf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works nicely! great job with the tests @luacmartins 🫡
[user A] Track and expense
[user A] Verify that you can delete it in the More button
Screen.Recording.2025-05-29.at.11.26.43.AM.mov
[user A] Send an IOU request to [user B]
[user B] Verify that you cannot delete the expense
[user A] Verify that you can delete the expense
Screen.Recording.2025-05-29.at.11.28.07.AM.mov
[user A] Send 2 IOU requests to [user B]
[user A] Verify that you cannot delete the report, but you can delete the individual expenses
Screen.Recording.2025-05-29.at.11.29.22.AM.mov
Screen.Recording.2025-05-29.at.11.30.52.AM.mov
[user A] Send 2 IOU requests to [user B]
[user B] Pay the request
[user A] Verify that you cannot delete the report nor the individual expenses
Screen.Recording.2025-05-29.at.11.31.28.AM.mov
[user B] Create [workspace] and invite [user A] as an employee
[user A] Submit one expense to [workspace]
[user B] Verify that you cannot delete the expense
[user A] Verify that you can delete the expense
Screen.Recording.2025-05-29.at.11.41.02.AM.mov
[user A] Submit 2 requests to [workspace]
[user A] Verify that you can delete the individual expenses and the report.
Screen.Recording.2025-05-29.at.11.41.49.AM.mov
[user A] Submit 2 requests to [workspace]
[user B] Pay the report
[user A] Verify that you cannot delete the report nor the individual expenses
Screen.Recording.2025-05-29.at.11.46.37.AM.mov
|
@luacmartins lets fix conflicts |
|
Resolved! @blimpich all yours |
|
✋ 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/blimpich in version: 9.1.55-0 🚀
|
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.1.56-2 🚀
|
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.1.58-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.1.58-4 🚀
|
|
In src/components/MoneyRequestHeader.tsx, we need to handle delete money request and track expense differently, see #63273 (comment) and PR #63297 |
Explanation of Change
Only allow deleting expenses and reports in the following cases:
Expenses
Report
Fixed Issues
$ #62722
Tests
Pre-conditions: 2 users
MorebuttonOffline tests
N/A
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))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
Screen.Recording.2025-05-28.at.2.09.46.PM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop