From b17dfcb3d08863cefa8b1049327ff076da272711 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Tue, 13 Feb 2024 14:21:21 +0400 Subject: [PATCH 01/10] Fix displaying edited amount in IOU preview --- .../ReportActionItem/MoneyRequestPreview.tsx | 41 ++++++++++++------- src/libs/TransactionUtils.ts | 4 +- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.tsx b/src/components/ReportActionItem/MoneyRequestPreview.tsx index e89193108d24..3e96d47f4391 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview.tsx @@ -159,6 +159,8 @@ function MoneyRequestPreview({ const isCardTransaction = TransactionUtils.isCardTransaction(transaction); const isSettled = ReportUtils.isSettled(iouReport?.reportID); const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; + const isMissingDetails = TransactionUtils.hasMissingSmartscanFields(transaction); + const shouldShowAmount = isScanning || !TransactionUtils.isAmountMissing(transaction); /* Show the merchant for IOUs and expenses only if: @@ -232,10 +234,6 @@ function MoneyRequestPreview({ return translate('iou.routePending'); } - if (!isSettled && TransactionUtils.hasMissingSmartscanFields(transaction)) { - return Localize.translateLocal('iou.receiptMissingDetails'); - } - return CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency); }; @@ -289,16 +287,19 @@ function MoneyRequestPreview({ - - {displayAmount} - + {shouldShowAmount && ( + + {displayAmount} + + )} {ReportUtils.isSettled(iouReport?.reportID) && !isBillSplit && ( )} + {isMissingDetails && ( + + + + {Localize.translateLocal('iou.receiptMissingDetails')} + + + + )} )} diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index 454b85cc3152..d7505b6887e5 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -151,8 +151,8 @@ function isPartialMerchant(merchant: string): boolean { return merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; } -function isAmountMissing(transaction: Transaction) { - return transaction.amount === 0 && (!transaction.modifiedAmount || transaction.modifiedAmount === 0); +function isAmountMissing(transaction: OnyxEntry) { + return transaction?.amount === 0 && (!transaction.modifiedAmount || transaction.modifiedAmount === 0); } function isCreatedMissing(transaction: Transaction) { From 3de127727db1827f62fe482c76916c0402429bcf Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Wed, 14 Feb 2024 15:18:45 +0400 Subject: [PATCH 02/10] Addressed to reviewer comments --- src/components/ReportActionItem/MoneyRequestPreview.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.tsx b/src/components/ReportActionItem/MoneyRequestPreview.tsx index 3e96d47f4391..34951b0bc92a 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview.tsx @@ -159,7 +159,6 @@ function MoneyRequestPreview({ const isCardTransaction = TransactionUtils.isCardTransaction(transaction); const isSettled = ReportUtils.isSettled(iouReport?.reportID); const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; - const isMissingDetails = TransactionUtils.hasMissingSmartscanFields(transaction); const shouldShowAmount = isScanning || !TransactionUtils.isAmountMissing(transaction); /* @@ -340,7 +339,7 @@ function MoneyRequestPreview({ )} - {isMissingDetails && ( + {hasFieldErrors && ( Date: Wed, 14 Feb 2024 16:15:30 +0400 Subject: [PATCH 03/10] Addressed to reviewer comments --- .../ReportActionItem/MoneyRequestPreview.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.tsx b/src/components/ReportActionItem/MoneyRequestPreview.tsx index f282710d6ad1..6c1b0a1ee633 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview.tsx @@ -320,6 +320,18 @@ function MoneyRequestPreview({ )} + {hasFieldErrors && ( + + + + {Localize.translateLocal('iou.receiptMissingDetails')} + + + + )} {!isCurrentUserManager && shouldShowPendingConversionMessage && ( @@ -339,18 +351,6 @@ function MoneyRequestPreview({ )} - {hasFieldErrors && ( - - - - {Localize.translateLocal('iou.receiptMissingDetails')} - - - - )} )} From ff13a3f86143a5ae155a1e945753dadcc92668a3 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Tue, 27 Feb 2024 18:31:14 +0400 Subject: [PATCH 04/10] Show different messages for each field --- .../MoneyRequestPreviewContent.tsx | 61 ++++++++----------- src/languages/en.ts | 2 + src/languages/es.ts | 2 + src/libs/TransactionUtils.ts | 6 +- 4 files changed, 34 insertions(+), 37 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 3d0234b250fe..23024336bcf0 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -24,7 +24,6 @@ import ControlSelection from '@libs/ControlSelection'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as IOUUtils from '@libs/IOUUtils'; -import * as Localize from '@libs/Localize'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReceiptUtils from '@libs/ReceiptUtils'; import * as ReportActionsUtils from '@libs/ReportActionsUtils'; @@ -94,22 +93,22 @@ function MoneyRequestPreviewContent({ const isCardTransaction = TransactionUtils.isCardTransaction(transaction); const isSettled = ReportUtils.isSettled(iouReport?.reportID); const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; - const shouldShowAmount = isScanning || !TransactionUtils.isAmountMissing(transaction); + const showMissingMerchant = !isSettled && hasFieldErrors && TransactionUtils.isMerchantMissing(transaction); + const isRoutePending = isFetchingWaypointsFromServer && !requestAmount; /* Show the merchant for IOUs and expenses only if: - the merchant is not empty, is custom, or is not related to scanning smartscan; - the request is not a distance request with a pending route and amount = 0 - in this case, the merchant says: "Route pending...", which is already shown in the amount field; + - the merchant field is required, but it is missing */ const shouldShowMerchant = - !!requestMerchant && - requestMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && - requestMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT && - !(isFetchingWaypointsFromServer && !requestAmount); + ((!!requestMerchant && requestMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && requestMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT) || showMissingMerchant) && + !isRoutePending; const shouldShowDescription = !!description && !shouldShowMerchant && !isScanning; - let merchantOrDescription = requestMerchant; + let merchantOrDescription = showMissingMerchant ? translate('iou.missingMerchant') : requestMerchant; if (!shouldShowMerchant) { merchantOrDescription = description || ''; } @@ -152,7 +151,11 @@ function MoneyRequestPreviewContent({ } let message = translate('iou.cash'); - if (hasViolations && transaction) { + if (shouldShowRBR && transaction) { + if (hasFieldErrors) { + return `${message} • ${translate('violations.reviewRequired')}`; + } + const violations = TransactionUtils.getTransactionViolations(transaction.transactionID, transactionViolations); if (violations?.[0]) { const violationMessage = ViolationsUtils.getViolationTranslation(violations[0], translate); @@ -174,10 +177,14 @@ function MoneyRequestPreviewContent({ return translate('iou.receiptScanning'); } - if (isFetchingWaypointsFromServer && !requestAmount) { + if (isRoutePending) { return translate('iou.routePending'); } + if (!isSettled && hasFieldErrors && TransactionUtils.isAmountMissing(transaction)) { + return translate('iou.missingAmount'); + } + return CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency); }; @@ -236,19 +243,16 @@ function MoneyRequestPreviewContent({ - {shouldShowAmount && ( - - {displayAmount} - - )} + + {displayAmount} + {ReportUtils.isSettled(iouReport?.reportID) && !isBillSplit && ( )} - {hasFieldErrors && ( - - - - {Localize.translateLocal('iou.receiptMissingDetails')} - - - - )} + {!isCurrentUserManager && shouldShowPendingConversionMessage && ( diff --git a/src/languages/en.ts b/src/languages/en.ts index 4d7041d4a791..d1b11984c833 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -600,6 +600,8 @@ export default { routePending: 'Route pending...', receiptScanning: 'Scan in progress…', receiptMissingDetails: 'Receipt missing details', + missingAmount: 'Missing amount', + missingMerchant: 'Missing merchant', receiptStatusTitle: 'Scanning…', receiptStatusText: "Only you can see this receipt when it's scanning. Check back later or enter the details now.", receiptScanningFailed: 'Receipt scanning failed. Enter the details manually.', diff --git a/src/languages/es.ts b/src/languages/es.ts index c9ff087d0de7..352bd3135752 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -593,6 +593,8 @@ export default { routePending: 'Ruta pendiente...', receiptScanning: 'Escaneo en curso…', receiptMissingDetails: 'Recibo con campos vacíos', + missingAmount: 'Falta importe', + missingMerchant: 'Falta comerciante', receiptStatusTitle: 'Escaneando…', receiptStatusText: 'Solo tú puedes ver este recibo cuando se está escaneando. Vuelve más tarde o introduce los detalles ahora.', receiptScanningFailed: 'El escaneo de recibo ha fallado. Introduce los detalles manualmente.', diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index cb983d08a005..c28fe7c0bcb7 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -139,11 +139,11 @@ function hasReceipt(transaction: Transaction | undefined | null): boolean { return !!transaction?.receipt?.state || hasEReceipt(transaction); } -function isMerchantMissing(transaction: Transaction) { - if (transaction.modifiedMerchant && transaction.modifiedMerchant !== '') { +function isMerchantMissing(transaction: OnyxEntry) { + if (transaction?.modifiedMerchant && transaction.modifiedMerchant !== '') { return transaction.modifiedMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; } - const isMerchantEmpty = transaction.merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || transaction.merchant === ''; + const isMerchantEmpty = transaction?.merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || transaction?.merchant === ''; return isMerchantEmpty; } From 35b351263d455c512c1847dc5029060e4c314874 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Thu, 29 Feb 2024 12:47:42 +0400 Subject: [PATCH 05/10] Addressed to comment --- .../MoneyRequestPreviewContent.tsx | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index bf6471331471..ede701c44314 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -94,22 +94,21 @@ function MoneyRequestPreviewContent({ const isSettled = ReportUtils.isSettled(iouReport?.reportID); const isOnHold = TransactionUtils.isOnHold(transaction); const isDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; - const showMissingMerchant = !isSettled && hasFieldErrors && TransactionUtils.isMerchantMissing(transaction); - const isRoutePending = isFetchingWaypointsFromServer && !requestAmount; /* Show the merchant for IOUs and expenses only if: - the merchant is not empty, is custom, or is not related to scanning smartscan; - the request is not a distance request with a pending route and amount = 0 - in this case, the merchant says: "Route pending...", which is already shown in the amount field; - - the merchant field is required, but it is missing */ const shouldShowMerchant = - ((!!requestMerchant && requestMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && requestMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT) || showMissingMerchant) && - !isRoutePending; + !!requestMerchant && + requestMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && + requestMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT && + !(isFetchingWaypointsFromServer && !requestAmount); const shouldShowDescription = !!description && !shouldShowMerchant && !isScanning; - let merchantOrDescription = showMissingMerchant ? translate('iou.missingMerchant') : requestMerchant; + let merchantOrDescription = requestMerchant; if (!shouldShowMerchant) { merchantOrDescription = description || ''; } @@ -154,7 +153,18 @@ function MoneyRequestPreviewContent({ let message = translate('iou.cash'); if (shouldShowRBR && transaction) { if (hasFieldErrors) { - return `${message} • ${translate('violations.reviewRequired')}`; + const isMerchantMissing = TransactionUtils.isMerchantMissing(transaction); + const isAmountMissing = TransactionUtils.isAmountMissing(transaction); + + if (isAmountMissing && isMerchantMissing) { + message += ` • ${translate('violations.reviewRequired')}`; + } else if (isAmountMissing) { + message += ` • ${translate('iou.missingAmount')}`; + } else { + message += ` • ${translate('iou.missingMerchant')}`; + } + + return message; } const violations = TransactionUtils.getTransactionViolations(transaction.transactionID, transactionViolations); @@ -180,14 +190,10 @@ function MoneyRequestPreviewContent({ return translate('iou.receiptScanning'); } - if (isRoutePending) { + if (isFetchingWaypointsFromServer && !requestAmount) { return translate('iou.routePending'); } - if (!isSettled && hasFieldErrors && TransactionUtils.isAmountMissing(transaction)) { - return translate('iou.missingAmount'); - } - return CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency); }; @@ -277,7 +283,6 @@ function MoneyRequestPreviewContent({ )} - {!isCurrentUserManager && shouldShowPendingConversionMessage && ( From a7b6d6a9501df1e144831fae2fd0c9ca4ca7eaf5 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Mon, 4 Mar 2024 22:06:54 +0400 Subject: [PATCH 06/10] Always Display 'Review required' if there is a violations error --- .../MoneyRequestPreviewContent.tsx | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 58c9965af4fa..0a40c6463325 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -152,27 +152,25 @@ function MoneyRequestPreviewContent({ let message = translate('iou.cash'); if (shouldShowRBR && transaction) { - if (hasFieldErrors) { - const isMerchantMissing = TransactionUtils.isMerchantMissing(transaction); - const isAmountMissing = TransactionUtils.isAmountMissing(transaction); - - if (isAmountMissing && isMerchantMissing) { - message += ` • ${translate('violations.reviewRequired')}`; - } else if (isAmountMissing) { - message += ` • ${translate('iou.missingAmount')}`; - } else { - message += ` • ${translate('iou.missingMerchant')}`; - } - - return message; - } - const violations = TransactionUtils.getTransactionViolations(transaction.transactionID, transactionViolations); if (violations?.[0]) { const violationMessage = ViolationsUtils.getViolationTranslation(violations[0], translate); const isTooLong = violations.filter((v) => v.type === 'violation').length > 1 || violationMessage.length > 15; - message += ` • ${isTooLong ? translate('violations.reviewRequired') : violationMessage}`; + + return `${message} • ${isTooLong ? translate('violations.reviewRequired') : violationMessage}`; } + + const isMerchantMissing = TransactionUtils.isMerchantMissing(transaction); + const isAmountMissing = TransactionUtils.isAmountMissing(transaction); + + if (isAmountMissing && isMerchantMissing) { + message += ` • ${translate('violations.reviewRequired')}`; + } else if (isAmountMissing) { + message += ` • ${translate('iou.missingAmount')}`; + } else { + message += ` • ${translate('iou.missingMerchant')}`; + } + } else if (ReportUtils.isPaidGroupPolicyExpenseReport(iouReport) && ReportUtils.isReportApproved(iouReport) && !ReportUtils.isSettled(iouReport?.reportID)) { message += ` • ${translate('iou.approved')}`; } else if (iouReport?.isWaitingOnBankAccount) { From fddaebb5207c51e6bc39f9475e7acc8a175bdb16 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Mon, 4 Mar 2024 22:10:38 +0400 Subject: [PATCH 07/10] remove extra lines --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 0a40c6463325..7882c06bd93b 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -162,7 +162,6 @@ function MoneyRequestPreviewContent({ const isMerchantMissing = TransactionUtils.isMerchantMissing(transaction); const isAmountMissing = TransactionUtils.isAmountMissing(transaction); - if (isAmountMissing && isMerchantMissing) { message += ` • ${translate('violations.reviewRequired')}`; } else if (isAmountMissing) { @@ -170,7 +169,6 @@ function MoneyRequestPreviewContent({ } else { message += ` • ${translate('iou.missingMerchant')}`; } - } else if (ReportUtils.isPaidGroupPolicyExpenseReport(iouReport) && ReportUtils.isReportApproved(iouReport) && !ReportUtils.isSettled(iouReport?.reportID)) { message += ` • ${translate('iou.approved')}`; } else if (iouReport?.isWaitingOnBankAccount) { From ec77c7cc57a8a3c02df74ab1f54029664f5d3637 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Tue, 5 Mar 2024 22:56:44 +0400 Subject: [PATCH 08/10] Addressed to reviewer comments --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 7882c06bd93b..aa2da2b66af7 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -155,9 +155,11 @@ function MoneyRequestPreviewContent({ const violations = TransactionUtils.getTransactionViolations(transaction.transactionID, transactionViolations); if (violations?.[0]) { const violationMessage = ViolationsUtils.getViolationTranslation(violations[0], translate); - const isTooLong = violations.filter((v) => v.type === 'violation').length > 1 || violationMessage.length > 15; + const violationsCount = violations.filter((v) => v.type === 'violation').length; + const isTooLong = violationsCount > 1 || violationMessage.length > 15; + const hasViolationAndFieldErrors = violationsCount === 1 && hasFieldErrors; - return `${message} • ${isTooLong ? translate('violations.reviewRequired') : violationMessage}`; + return `${message} • ${isTooLong || hasViolationAndFieldErrors ? translate('violations.reviewRequired') : violationMessage}`; } const isMerchantMissing = TransactionUtils.isMerchantMissing(transaction); From 2daf9dcf8c01abc3413dc6e1d5aec31ae8f73064 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Wed, 6 Mar 2024 16:23:21 +0400 Subject: [PATCH 09/10] Addressed to reviewer comments --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index aa2da2b66af7..223f2e77bd9d 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -157,7 +157,7 @@ function MoneyRequestPreviewContent({ const violationMessage = ViolationsUtils.getViolationTranslation(violations[0], translate); const violationsCount = violations.filter((v) => v.type === 'violation').length; const isTooLong = violationsCount > 1 || violationMessage.length > 15; - const hasViolationAndFieldErrors = violationsCount === 1 && hasFieldErrors; + const hasViolationsAndFieldErrors = violationsCount > 0 && hasFieldErrors; return `${message} • ${isTooLong || hasViolationAndFieldErrors ? translate('violations.reviewRequired') : violationMessage}`; } From 64259b39fc6f59d6933c0e23ee24f84840a8d844 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Wed, 6 Mar 2024 16:43:28 +0400 Subject: [PATCH 10/10] Addressed to reviewer comments --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 223f2e77bd9d..0171a5603bb5 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -159,7 +159,7 @@ function MoneyRequestPreviewContent({ const isTooLong = violationsCount > 1 || violationMessage.length > 15; const hasViolationsAndFieldErrors = violationsCount > 0 && hasFieldErrors; - return `${message} • ${isTooLong || hasViolationAndFieldErrors ? translate('violations.reviewRequired') : violationMessage}`; + return `${message} • ${isTooLong || hasViolationsAndFieldErrors ? translate('violations.reviewRequired') : violationMessage}`; } const isMerchantMissing = TransactionUtils.isMerchantMissing(transaction);