Skip to content
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

Reset request flow when logout #55384

Merged
merged 11 commits into from
Feb 11, 2025
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {isMovingTransactionFromTrackExpense as isMovingTransactionFromTrackExpen
import Log from '@libs/Log';
import Navigation from '@libs/Navigation/Navigation';
import {getParticipantsOption, getReportOption} from '@libs/OptionsListUtils';
import {getBankAccountRoute} from '@libs/ReportUtils';
import {generateReportID, getBankAccountRoute} from '@libs/ReportUtils';
import playSound, {SOUNDS} from '@libs/Sound';
import {getDefaultTaxCode, getRateID, getRequestType, getValidWaypoints} from '@libs/TransactionUtils';
import type {GpsPoint} from '@userActions/IOU';
Expand All @@ -39,6 +39,7 @@ import {
setMoneyRequestCategory,
splitBill,
splitBillAndOpenReport,
startMoneyRequest,
startSplitBill,
submitPerDiemExpense as submitPerDiemExpenseIOUActions,
trackExpense as trackExpenseIOUActions,
Expand Down Expand Up @@ -170,6 +171,19 @@ function IOURequestStepConfirmation({
setMoneyRequestBillable(transactionID, defaultBillable);
}, [transactionID, defaultBillable]);

useEffect(() => {
if (transaction?.transactionID) {
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make it such that even if transaction.transactionID exists we check if the basic transaction properties exists, other wise if user again go back `create/submit/confirmation/1/ second time he'll see this which is not so relevant and its exactly what we want to fix

Screenshot 2025-02-06 at 1 39 34 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishpaul777 Could you please clarify your issue? How are you reproducing it, and what is the expected outcome? It seems like you're following a different test process, but you haven’t specified that, making it difficult for me to reproduce the issue. This is causing delays in completing this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as test steps in Pr description, once you got redirected to start of flow close it, and paste the copied url again it will link to empty confirmation page

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishpaul777 Fixed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not fixed on ios/android, here I deeplink to create/submit/confirmation/1/<Reportid> it don't not redirect me to start of flow

Screen.Recording.2025-02-07.at.3.25.01.AM.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishpaul777 I can't reproduce that on IOS

Screen.Recording.2025-02-07.at.20.54.15.mov

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can still reproduce this issue same steps as in my initial comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishpaul777 Could you try again using a new account and record your screen, including all the steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried many time but still can't reproduce your bug

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i could not reproduce this anymore

startMoneyRequest(
CONST.IOU.TYPE.CREATE,
// When starting to create an expense from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used
// for all of the routes in the creation flow.
generateReportID(),
);
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- we don't want this effect to run again
}, []);

useEffect(() => {
if (!transaction?.category) {
return;
Expand Down
Loading