Skip to content

Commit 78be1f1

Browse files
authored
Merge pull request Expensify#68661 from callstack-internal/fix/67634-remove-iou-flow-navigation-hotfix
fix: remove hotfix, change report autoassignement
2 parents 815ff90 + 4df3260 commit 78be1f1

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/pages/iou/request/step/IOURequestStepConfirmation.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,8 @@ function IOURequestStepConfirmation({
330330
if (transaction?.isFromGlobalCreate && !transaction.receipt?.isTestReceipt) {
331331
// If the participants weren't automatically added to the transaction, then we should go back to the IOURequestStepParticipants.
332332
if (!transaction?.participantsAutoAssigned && participantsAutoAssignedFromRoute !== 'true') {
333-
// TODO: temporary fix for multi-files dnd; check if other flow can use reportID instead of transaction?.reportID
334-
const shouldUseNewScanFlow = iouType === CONST.IOU.TYPE.TRACK || iouType === CONST.IOU.TYPE.SUBMIT;
335-
const backToReportID =
336-
shouldUseNewScanFlow && !transaction?.participants?.at(0)?.isPolicyExpenseChat
337-
? reportID
338-
: // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
339-
transaction?.reportID || reportID;
340-
const iouTypeForRoute = shouldUseNewScanFlow ? CONST.IOU.TYPE.CREATE : iouType;
341-
Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouTypeForRoute, initialTransactionID, backToReportID, undefined, action), {
333+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
334+
Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, initialTransactionID, transaction?.reportID || reportID, undefined, action), {
342335
compareParams: false,
343336
});
344337
return;

src/pages/iou/request/step/IOURequestStepParticipants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function IOURequestStepParticipants({
175175
transactions.forEach((transaction) => {
176176
setCustomUnitRateID(transaction.transactionID, rateID);
177177
const shouldSetParticipantAutoAssignment = iouType === CONST.IOU.TYPE.CREATE;
178-
setMoneyRequestParticipantsFromReport(transaction.transactionID, selfDMReport, shouldSetParticipantAutoAssignment ? isActivePolicyRequest : true);
178+
setMoneyRequestParticipantsFromReport(transaction.transactionID, selfDMReport, shouldSetParticipantAutoAssignment ? isActivePolicyRequest : false);
179179
setTransactionReport(transaction.transactionID, {reportID: selfDMReportID}, true);
180180
});
181181
const iouConfirmationPageRoute = ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(action, CONST.IOU.TYPE.TRACK, initialTransactionID, selfDMReportID);

0 commit comments

Comments
 (0)