From 9f37be559f0ee1d99924f11e69c2840560fe7b70 Mon Sep 17 00:00:00 2001 From: Roji Philip Date: Mon, 15 Jan 2024 00:45:49 +0530 Subject: [PATCH] hide preview subtitle for none --- src/components/ReportActionItem/ReportPreview.js | 2 +- src/libs/TransactionUtils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 44bdef932a8c..0ce166e61d49 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -308,7 +308,7 @@ function ReportPreview(props) { )} - {!isScanning && (numberOfRequests > 1 || hasReceipts) && ( + {!isScanning && (numberOfRequests > 1 || (hasReceipts && numberOfRequests === 1 && formattedMerchant)) && ( {previewSubtitle || moneyRequestComment} diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index b8ebb36d5aa8..ba856a2b1afb 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -148,10 +148,10 @@ function isMerchantMissing(transaction: Transaction) { } /** - * Check if the merchant is a partial one `(none)` or `Unknown merchant` + * Check if the merchant is partial i.e. `(none)` */ function isPartialMerchant(merchant: string): boolean { - return merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || merchant === CONST.TRANSACTION.UNKNOWN_MERCHANT; + return merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; } function isAmountMissing(transaction: Transaction) {