Disable request money on a paid policy submitted expense#33182
Disable request money on a paid policy submitted expense#33182mountiny merged 12 commits intoExpensify:mainfrom
Conversation
|
@hoangzinh 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] |
There is a discussion here and reverting this locally fix the issue. I have added the iOS Safari recording |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-19.at.23.15.35.-.android.movAndroid: mWeb ChromeScreen.Recording.2023-12-19.at.22.37.58.android.chrome.moviOS: NativeScreen.Recording.2023-12-19.at.22.54.51.-.ios.moviOS: mWeb SafariScreen.Recording.2023-12-19.at.22.59.49.-.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2023-12-19.at.22.33.38.-.web.movMacOS: DesktopScreen.Recording.2023-12-19.at.22.35.29.-.desktop.mov |
|
cc @mountiny just in case you missed this PR |
mountiny
left a comment
There was a problem hiding this comment.
Sorry for the delay, been travelling, requesting mainly some safety changes
| if (isMoneyRequestReport(report)) { | ||
| return ((isExpenseReport(report) && isOwnPolicyExpenseChat) || isIOUReport(report)) && !isReportApproved(report) && !isSettled(report?.reportID); | ||
| const isOwnExpenseReport = isExpenseReport(report) && isOwnPolicyExpenseChat; | ||
| if (isOwnExpenseReport && PolicyUtils.isPaidGroupPolicy(policy)) { |
There was a problem hiding this comment.
cc @Beamanator We will need to update this with instant submit for paid policies
| key: `${ONYXKEYS.COLLECTION.SELECTED_TAB}${CONST.TAB.RECEIPT_TAB_ID}`, | ||
| }, | ||
| policy: { | ||
| key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${lodashGet(report, 'policyID')}`, |
There was a problem hiding this comment.
I think just to be safe we should add 0 here, thats because that in case no policyID is found then we are not loading the entire collection
| key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${lodashGet(report, 'policyID')}`, | |
| key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${lodashGet(report, 'policyID', '0')}`, |
There was a problem hiding this comment.
I intentionally didn't put any default value to it, so it would return undefined and the key will be policy_undefined, so it won't load the whole collection.
There was a problem hiding this comment.
Ah ok, I thought the default would be an empty string
src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
Outdated
Show resolved
Hide resolved
|
@bernhardoj Also seems like there is a conflict |
|
@mountiny conflicts solved. |
mountiny
left a comment
There was a problem hiding this comment.
Thanks for the changes!
|
✋ 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 production by https://github.com/mountiny in version: 1.4.18-8 🚀
|



Details
When a paid policy expense report is submitted, we want to hide the option to request money.
Fixed Issues
$ #32796
PROPOSAL: #32796 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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.2023-12-16.at.01.54.41.mov
Android: mWeb Chrome
Screen.Recording.2023-12-16.at.01.57.34.mov
iOS: Native
Screen.Recording.2023-12-16.at.01.51.40.mov
iOS: mWeb Safari
Screen.Recording.2023-12-18.at.19.08.43.mov
MacOS: Chrome / Safari
Screen.Recording.2023-12-16.at.01.47.17.mov
MacOS: Desktop
Screen.Recording.2023-12-16.at.01.49.27.mov