diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index c3ec5ddb5322..de53f5cae4c1 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -236,6 +236,11 @@ function MoneyRequestConfirmationList({ const [lastSelectedDistanceRates] = useOnyx(ONYXKEYS.NVP_LAST_SELECTED_DISTANCE_RATES); const [currencyList] = useOnyx(ONYXKEYS.CURRENCY_LIST); const [betas] = useOnyx(ONYXKEYS.BETAS); + + const isTestReceipt = useMemo(() => { + return transaction?.receipt?.isTestReceipt ?? false; + }, [transaction?.receipt?.isTestReceipt]); + const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip} = useProductTrainingContext( CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.SCAN_TEST_CONFIRMATION, Permissions.canUseManagerMcTest(betas) && selectedParticipantsProp.some((participant) => isSelectedManagerMcTest(participant.login)), @@ -732,8 +737,8 @@ function MoneyRequestConfirmationList({ const formattedSelectedParticipants = selectedParticipants.map((participant) => ({ ...participant, isSelected: false, - isInteractive: !!isCreateExpenseFlow, - shouldShowRightIcon: isCreateExpenseFlow, + isInteractive: isCreateExpenseFlow && !isTestReceipt, + shouldShowRightIcon: isCreateExpenseFlow && !isTestReceipt, })); options.push({ title: translate('common.to'), @@ -743,7 +748,7 @@ function MoneyRequestConfirmationList({ } return options; - }, [isTypeSplit, translate, payeePersonalDetails, getSplitSectionHeader, splitParticipants, selectedParticipants, isCreateExpenseFlow]); + }, [isTypeSplit, translate, payeePersonalDetails, getSplitSectionHeader, splitParticipants, selectedParticipants, isCreateExpenseFlow, isTestReceipt]); useEffect(() => { if (!isDistanceRequest || (isMovingTransactionFromTrackExpense && !isPolicyExpenseChat) || !transactionID) { diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx index ba6d29dced19..0de7c86f84ab 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx @@ -303,7 +303,7 @@ function IOURequestStepConfirmation({ return; } - if (transaction?.isFromGlobalCreate) { + if (transaction?.isFromGlobalCreate && !transaction.receipt?.isTestReceipt) { // If the participants weren't automatically added to the transaction, then we should go back to the IOURequestStepParticipants. if (!transaction?.participantsAutoAssigned && participantsAutoAssignedFromRoute !== 'true') { // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing @@ -322,14 +322,15 @@ function IOURequestStepConfirmation({ }, [ action, isPerDiemRequest, - transaction?.participantsAutoAssigned, transaction?.isFromGlobalCreate, + transaction?.receipt?.isTestReceipt, + transaction?.participantsAutoAssigned, transaction?.reportID, - participantsAutoAssignedFromRoute, requestType, iouType, transactionID, reportID, + participantsAutoAssignedFromRoute, ]); const navigateToAddReceipt = useCallback(() => {