fix: Dismissing the error for corrupted PDF scan request does not delete the expense#43346
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Native0-android.mp4Android: mWeb Chrome0-mobile-chrome.mp4iOS: Native0-ios.mp4iOS: mWeb Safari0-ios.mp4MacOS: Chrome / Safari0-web.mp4MacOS: Desktop0-desktop.mp4 |
eh2077
left a comment
There was a problem hiding this comment.
Tested well. Just comments about Default value for inexistent IDs
|
@nkdengineer Gentle bump in case you missed this one. Please take a look at comments^ |
|
@eh2077 i'll update today |
Co-authored-by: Eric Han <117511920+eh2077@users.noreply.github.com>
Co-authored-by: Eric Han <117511920+eh2077@users.noreply.github.com>
| const deleteTransaction = useCallback(() => { | ||
| if (!parentReportAction) { | ||
| return; | ||
| } | ||
| const iouTransactionID = parentReportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? parentReportAction.originalMessage?.IOUTransactionID ?? '-1' : '-1'; | ||
| if (ReportActionsUtils.isTrackExpenseAction(parentReportAction)) { | ||
| IOU.deleteTrackExpense(parentReport?.reportID ?? '-1', iouTransactionID, parentReportAction, true); | ||
| return; | ||
| } | ||
| IOU.deleteMoneyRequest(iouTransactionID, parentReportAction, true); | ||
| }, [parentReport?.reportID, parentReportAction]); |
There was a problem hiding this comment.
I think there is no point in using useCallback here since you are not passing down this function to another component and you are not using it in another function wrapped in useCallback.
Can you instead define this function outside of the component and receive as parameters parentReport and parentReportAction 🙏 ?
Then later you call it with deleteTransaction(parentReport, parentReportAction)
aldo-expensify
left a comment
There was a problem hiding this comment.
Thanks for doing the changes @nkdengineer 🙇
|
✋ 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.0.1-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.1-19 🚀
|
Details
Fixed Issues
$ #42120
PROPOSAL: #42120 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
desktop.mov
MacOS: Desktop
web.mov