Skip to content

Commit 4df3260

Browse files
committed
fix: remove hotfix, change report autoassignement
1 parent e418c8e commit 4df3260

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
@@ -323,15 +323,8 @@ function IOURequestStepConfirmation({
323323
if (transaction?.isFromGlobalCreate && !transaction.receipt?.isTestReceipt) {
324324
// If the participants weren't automatically added to the transaction, then we should go back to the IOURequestStepParticipants.
325325
if (!transaction?.participantsAutoAssigned && participantsAutoAssignedFromRoute !== 'true') {
326-
// TODO: temporary fix for multi-files dnd; check if other flow can use reportID instead of transaction?.reportID
327-
const shouldUseNewScanFlow = iouType === CONST.IOU.TYPE.TRACK || iouType === CONST.IOU.TYPE.SUBMIT;
328-
const backToReportID =
329-
shouldUseNewScanFlow && !transaction?.participants?.at(0)?.isPolicyExpenseChat
330-
? reportID
331-
: // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
332-
transaction?.reportID || reportID;
333-
const iouTypeForRoute = shouldUseNewScanFlow ? CONST.IOU.TYPE.CREATE : iouType;
334-
Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouTypeForRoute, initialTransactionID, backToReportID, undefined, action), {
326+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
327+
Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, initialTransactionID, transaction?.reportID || reportID, undefined, action), {
335328
compareParams: false,
336329
});
337330
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)