-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Can't view receipt from Split Expense details view #42399
fix: Can't view receipt from Split Expense details view #42399
Conversation
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
@Krishna2323 Let me know when the PR is ready for a review. Thanks! |
Will add recording in few hours. |
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
@mollfpr, you can review the code, I couldn't add recordings yesterday as I was facing version issues in Xcode. However, I have added recording for |
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
All recordings have been added. |
@@ -160,6 +161,9 @@ type MoneyRequestConfirmationListProps = MoneyRequestConfirmationListOnyxProps & | |||
/** Whether we're editing a split expense */ | |||
isEditingSplitBill?: boolean; | |||
|
|||
/** Whether we're shwowing a created split expense */ | |||
isSplitBillDetailsPage?: boolean; |
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.
I think we can make the naming more useable here, for example, shouldReceiptPressable
.
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.
What do you think about canOpenReceipt/canDIsplayReceipt
?
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.
canDIsplayReceipt
sounds good to me.
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.
updated to shouldDisplayReceipt
.
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
src/pages/TransactionReceiptPage.tsx
Outdated
@@ -50,7 +50,8 @@ function TransactionReceipt({transaction, report, reportMetadata = {isLoadingIni | |||
const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(report); | |||
|
|||
// eslint-disable-next-line rulesdir/no-negated-variables | |||
const shouldShowNotFoundPage = isTrackExpenseReport ? !transaction : (moneyRequestReportID ?? '') !== transaction?.reportID; | |||
const shouldShowNotFoundPage = isTrackExpenseReport || transaction?.reportID === CONST.REPORT.SPLIT_REPORTID ? !transaction : (moneyRequestReportID ?? '') !== transaction?.reportID; | |||
// const shouldShowNotFoundPage = isTrackExpenseReport ? !transaction : (moneyRequestReportID ?? '') !== transaction?.reportID; |
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.
Is this change needed?
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.
We need to modify the shouldShowNotFoundPage because the transaction?.reportID for split transaction is always -2.
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.
I mena there's a comment in the next line.
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.
ohh sorry, I missed that, updated now.
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
Reviewer Checklist
Screenshots/VideosAndroid: Native42399.Android.mp4Android: mWeb Chrome42399.mWeb-Chrome.mp4iOS: Native42399.iOS.moviOS: mWeb Safari42399.mWeb-Safari.movMacOS: Chrome / Safari42399.Web.mp4MacOS: Desktop42399.Desktop.mp4 |
@Krishna2323 Could you resolve the conflict? Thanks! |
Conflicts resolved. |
✋ 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/luacmartins in version: 1.4.81-11 🚀
|
Details
Fixed Issues
$ #41249
PROPOSAL: #41249 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4