From 006177355f397590dac4c1c88f0b2bc28a528c9c Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Thu, 30 May 2024 06:17:44 +0700 Subject: [PATCH] rename variable --- src/components/ReportActionItem/MoneyRequestView.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 7fccef43f7e5..21ed08e94ed7 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -319,15 +319,15 @@ function MoneyRequestView({ const shouldShowMapOrReceipt = showMapAsImage || hasReceipt; const shouldShowReceiptEmptyState = !hasReceipt && !isInvoice && (canEditReceipt || isAdmin || isApprover); - const receiptNoticeNames: OnyxTypes.ViolationName[] = [ + const receiptViolationNames: OnyxTypes.ViolationName[] = [ CONST.VIOLATIONS.RECEIPT_REQUIRED, CONST.VIOLATIONS.RECEIPT_NOT_SMART_SCANNED, CONST.VIOLATIONS.MODIFIED_DATE, CONST.VIOLATIONS.CASH_EXPENSE_WITH_NO_RECEIPT, CONST.VIOLATIONS.SMARTSCAN_FAILED, ]; - const receiptNoticeViolations = - transactionViolations?.filter((violation) => receiptNoticeNames.includes(violation.name)).map((v) => ViolationsUtils.getViolationTranslation(v, translate)) ?? []; + const receiptViolations = + transactionViolations?.filter((violation) => receiptViolationNames.includes(violation.name)).map((violation) => ViolationsUtils.getViolationTranslation(violation, translate)) ?? []; const shouldShowNotesViolations = !isReceiptBeingScanned && canUseViolations && ReportUtils.isPaidGroupPolicy(report); return ( @@ -336,7 +336,7 @@ function MoneyRequestView({ {!isInvoice && ( )} @@ -391,7 +391,7 @@ function MoneyRequestView({ /> )} {!shouldShowReceiptEmptyState && !shouldShowMapOrReceipt && } - {shouldShowNotesViolations && } + {shouldShowNotesViolations && }