-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix time expense confirm page back button navigation when submitting from report details RHP #79673
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -435,6 +435,11 @@ function IOURequestStepConfirmation({ | |
| return; | ||
| } | ||
| if (isTimeRequest) { | ||
| if (isMovingTransactionFromTrackExpense) { | ||
| return Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, initialTransactionID, transaction?.reportID ?? reportID, undefined, action), { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mhawryluk I think the problem is caused by this block:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're right. I removed this block and updated the |
||
| compareParams: false, | ||
| }); | ||
| } | ||
| return Navigation.goBack(ROUTES.MONEY_REQUEST_CREATE_TAB_TIME.getRoute(action, iouType, initialTransactionID, 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.
When submitting a tracked time expense that skips the participants step (e.g. preferred-policy auto‑assignment), the draft transaction can still have
reportIDset toUNREPORTED_REPORT_ID('0'), because the auto‑assignment path only sets participants. Withtransaction?.reportID ?? reportID, the back button will pop to a participants route built with reportID0instead of the confirmation route’s reportID, which resets the selected workspace/participants and shows the wrong report. Consider explicitly falling back when the transaction reportID is unreported (or just use the routereportID).Useful? React with 👍 / 👎.