Skip to content

Commit

Permalink
Merge pull request #53420 from nkdengineer/fix/53274
Browse files Browse the repository at this point in the history
Prevent going back to participant page when categorizing
  • Loading branch information
mountiny authored Dec 11, 2024
2 parents e08ba8f + 1f9d80d commit 665fa04
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/components/MoneyRequestConfirmationListFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,12 @@ function MoneyRequestConfirmationListFooter({
title={iouCategory}
description={translate('common.category')}
numberOfLinesTitle={2}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(action, iouType, transactionID, reportID, Navigation.getActiveRoute(), reportActionID))}
onPress={() =>
Navigation.navigate(
ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(action, iouType, transactionID, reportID, Navigation.getActiveRoute(), reportActionID),
CONST.NAVIGATION.ACTION_TYPE.PUSH,
)
}
style={[styles.moneyRequestMenuItem]}
titleStyle={styles.flex1}
disabled={didConfirm}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function IOURequestStepCategory({
IOU.setMoneyRequestCategory(transactionID, updatedCategory);

if (action === CONST.IOU.ACTION.CATEGORIZE) {
Navigation.closeAndNavigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(action, iouType, transactionID, report?.reportID ?? '-1'));
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(action, iouType, transactionID, report?.reportID ?? '-1'));
return;
}

Expand Down
3 changes: 1 addition & 2 deletions src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import * as IOUUtils from '@libs/IOUUtils';
import Log from '@libs/Log';
import Navigation from '@libs/Navigation/Navigation';
import * as OptionsListUtils from '@libs/OptionsListUtils';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import playSound, {SOUNDS} from '@libs/Sound';
import * as TransactionUtils from '@libs/TransactionUtils';
Expand Down Expand Up @@ -176,7 +175,7 @@ function IOURequestStepConfirmation({
const navigateBack = useCallback(() => {
// If the action is categorize and there's no policies other than personal one, we simply call goBack(), i.e: dismiss the whole flow together
// We don't need to subscribe to policy_ collection as we only need to check on the latest collection value
if (action === CONST.IOU.ACTION.CATEGORIZE && PolicyUtils.hasNoPolicyOtherThanPersonalType()) {
if (action === CONST.IOU.ACTION.CATEGORIZE) {
Navigation.goBack();
return;
}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/workspace/upgrade/UpgradeConfirmation.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import ConfirmationPage from '@components/ConfirmationPage';
import Text from '@components/Text';
import TextLink from '@components/TextLink';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
Expand All @@ -22,7 +21,7 @@ function UpgradeConfirmation({policyName, onConfirmUpgrade, isCategorizing}: Pro
heading={translate('workspace.upgrade.completed.headline')}
description={
isCategorizing ? (
<Text>{translate('workspace.upgrade.completed.categorizeMessage')}</Text>
translate('workspace.upgrade.completed.categorizeMessage')
) : (
<>
{translate('workspace.upgrade.completed.successMessage', {policyName})}{' '}
Expand Down

0 comments on commit 665fa04

Please sign in to comment.