From 025ce80496561e0a0df9870324b6b1385be5b8b7 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sat, 24 Aug 2024 11:41:43 +0530 Subject: [PATCH 1/2] fix: Dupe detection - Merchant field shows (none) instead of blank when (none) is selected. Signed-off-by: krishna2323 --- src/components/ReportActionItem/MoneyRequestView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 4a76f33de346..d853e5ff3d84 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -257,6 +257,8 @@ function MoneyRequestView({ } return TransactionUtils.getDescription(updatedTransaction ?? null); }, [updatedTransaction]); + const isEmptyUpdatedMerchant = updatedTransaction?.modifiedMerchant === '' || updatedTransaction?.modifiedMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; + const updatedMerchantTitle = isEmptyUpdatedMerchant ? '' : updatedTransaction?.modifiedMerchant; const saveBillable = useCallback( (newBillable: boolean) => { @@ -556,7 +558,7 @@ function MoneyRequestView({ Date: Sun, 8 Sep 2024 18:35:48 +0530 Subject: [PATCH 2/2] minor update. Signed-off-by: krishna2323 --- src/components/ReportActionItem/MoneyRequestView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 07d0332d874e..1ade3c662071 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -258,7 +258,7 @@ function MoneyRequestView({ return TransactionUtils.getDescription(updatedTransaction ?? null); }, [updatedTransaction]); const isEmptyUpdatedMerchant = updatedTransaction?.modifiedMerchant === '' || updatedTransaction?.modifiedMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; - const updatedMerchantTitle = isEmptyUpdatedMerchant ? '' : updatedTransaction?.modifiedMerchant; + const updatedMerchantTitle = isEmptyUpdatedMerchant ? '' : updatedTransaction?.modifiedMerchant ?? merchantTitle; const saveBillable = useCallback( (newBillable: boolean) => { @@ -564,7 +564,7 @@ function MoneyRequestView({