From ac77271650d11b85b05803ca85a96ce8cb3fb3d1 Mon Sep 17 00:00:00 2001 From: Anusha Date: Mon, 3 Jun 2024 20:05:05 +0500 Subject: [PATCH 1/2] show cash when it's a card transaction --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 3331572ab625..9e2dae3ece36 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -105,7 +105,7 @@ function MoneyRequestPreviewContent({ const isFullySettled = isSettled && !isSettlementOrApprovalPartial; const isFullyApproved = ReportUtils.isReportApproved(iouReport) && !isSettlementOrApprovalPartial; const shouldShowRBR = hasNoticeTypeViolations || hasViolations || hasFieldErrors || (!isFullySettled && !isFullyApproved && isOnHold); - + const showCashOrCard = isCardTransaction ? translate('iou.card') : translate('iou.cash'); /* Show the merchant for IOUs and expenses only if: - the merchant is not empty, is custom, or is not related to scanning smartscan; @@ -141,7 +141,7 @@ function MoneyRequestPreviewContent({ }; const getPreviewHeaderText = (): string => { - let message = translate('iou.cash'); + let message = showCashOrCard; if (isDistanceRequest) { message = translate('common.distance'); @@ -372,7 +372,7 @@ function MoneyRequestPreviewContent({ onPressOut={() => ControlSelection.unblock()} onLongPress={showContextMenu} shouldUseHapticsOnLongPress - accessibilityLabel={isBillSplit ? translate('iou.split') : translate('iou.cash')} + accessibilityLabel={isBillSplit ? translate('iou.split') : showCashOrCard} accessibilityHint={CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency)} style={[ styles.moneyRequestPreviewBox, From d75b9e905d3da111afc5e6beb3f53312710c9db6 Mon Sep 17 00:00:00 2001 From: Anusha Date: Thu, 13 Jun 2024 14:21:59 +0500 Subject: [PATCH 2/2] run prettier --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 2306f6a696f2..ccf1c61ac7b2 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -109,7 +109,6 @@ function MoneyRequestPreviewContent({ const showCashOrCard = isCardTransaction ? translate('iou.card') : translate('iou.cash'); const shouldShowHoldMessage = !(isSettled && !isSettlementOrApprovalPartial) && isOnHold; - /* Show the merchant for IOUs and expenses only if: - the merchant is not empty, is custom, or is not related to scanning smartscan;