From 8ad0fc4012603adfadae8384f9f4051cbeef31e2 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sat, 19 Aug 2023 01:13:11 +0100 Subject: [PATCH] Disable changing date and merchant when creating split bills --- src/components/MoneyRequestConfirmationList.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index 59da93aba935..832be75c1317 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -126,6 +126,7 @@ function MoneyRequestConfirmationList(props) { // A flag and a toggler for showing the rest of the form fields const [showAllFields, toggleShowAllFields] = useReducer((state) => !state, false); + const isTypeRequest = props.iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST; /** * Returns the participants with amount @@ -407,20 +408,20 @@ function MoneyRequestConfirmationList(props) { {showAllFields && ( <> Navigation.navigate(ROUTES.getMoneyRequestCreatedRoute(props.iouType, props.reportID))} - disabled={didConfirm || props.isReadOnly} + disabled={didConfirm || props.isReadOnly || !isTypeRequest} /> Navigation.navigate(ROUTES.getMoneyRequestMerchantRoute(props.iouType, props.reportID))} - disabled={didConfirm || props.isReadOnly} + disabled={didConfirm || props.isReadOnly || !isTypeRequest} /> )}