fix: Delete Receipt button is not displayed in merged transaction#55474
Conversation
|
@dukenv0307 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] |
|
code looks good, I'm facing the android build issue. I'll complete the checklist soon |
| const transactionID = ReportActionsUtils.isMoneyRequestAction(parentReportAction) ? ReportActionsUtils.getOriginalMessage(parentReportAction)?.IOUTransactionID ?? '-1' : '-1'; | ||
| const parentReportAction = getReportAction(report?.parentReportID, report?.parentReportActionID); | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| const transactionID = (isMoneyRequestAction(parentReportAction) && getOriginalMessage(parentReportAction)?.IOUTransactionID) || CONST.DEFAULT_NUMBER_ID; |
There was a problem hiding this comment.
| const transactionID = (isMoneyRequestAction(parentReportAction) && getOriginalMessage(parentReportAction)?.IOUTransactionID) || CONST.DEFAULT_NUMBER_ID; | |
| const transactionID = isMoneyRequestAction(parentReportAction) ? getOriginalMessage(parentReportAction)?.IOUTransactionID : undefined; |
There was a problem hiding this comment.
We had issues using undefined for collection keys in the past. For example #54693 (comment). The solution is to fallback to DEFAULT_NUMBER_ID.
There was a problem hiding this comment.
Ah, I see. we should update the docs about default value.
Reviewer Checklist
Screenshots/Videos |
|
✋ 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/AndrewGable in version: 9.0.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.89-8 🚀
|






Explanation of Change
Fixed Issues
$ #53922
PROPOSAL: #53922 (comment)
Tests
Your PayPal receipt)Delete receiptappearsDelete receiptOffline tests
NA
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-01-20.at.19.04.17.mov
MacOS: Desktop