Skip to content

Commit 0061773

Browse files
committed
rename variable
1 parent 9c42539 commit 0061773

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/ReportActionItem/MoneyRequestView.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,15 @@ function MoneyRequestView({
319319

320320
const shouldShowMapOrReceipt = showMapAsImage || hasReceipt;
321321
const shouldShowReceiptEmptyState = !hasReceipt && !isInvoice && (canEditReceipt || isAdmin || isApprover);
322-
const receiptNoticeNames: OnyxTypes.ViolationName[] = [
322+
const receiptViolationNames: OnyxTypes.ViolationName[] = [
323323
CONST.VIOLATIONS.RECEIPT_REQUIRED,
324324
CONST.VIOLATIONS.RECEIPT_NOT_SMART_SCANNED,
325325
CONST.VIOLATIONS.MODIFIED_DATE,
326326
CONST.VIOLATIONS.CASH_EXPENSE_WITH_NO_RECEIPT,
327327
CONST.VIOLATIONS.SMARTSCAN_FAILED,
328328
];
329-
const receiptNoticeViolations =
330-
transactionViolations?.filter((violation) => receiptNoticeNames.includes(violation.name)).map((v) => ViolationsUtils.getViolationTranslation(v, translate)) ?? [];
329+
const receiptViolations =
330+
transactionViolations?.filter((violation) => receiptViolationNames.includes(violation.name)).map((violation) => ViolationsUtils.getViolationTranslation(violation, translate)) ?? [];
331331
const shouldShowNotesViolations = !isReceiptBeingScanned && canUseViolations && ReportUtils.isPaidGroupPolicy(report);
332332

333333
return (
@@ -336,7 +336,7 @@ function MoneyRequestView({
336336
<View style={shouldShowAnimatedBackground && [StyleUtils.getReportWelcomeTopMarginStyle(isSmallScreenWidth, true)]}>
337337
{!isInvoice && (
338338
<ReceiptAuditHeader
339-
notes={receiptNoticeViolations}
339+
notes={receiptViolations}
340340
shouldShowAuditMessage={Boolean(shouldShowNotesViolations && didRceiptScanSucceed)}
341341
/>
342342
)}
@@ -391,7 +391,7 @@ function MoneyRequestView({
391391
/>
392392
)}
393393
{!shouldShowReceiptEmptyState && !shouldShowMapOrReceipt && <View style={{marginVertical: 6}} />}
394-
{shouldShowNotesViolations && <ReceiptAuditMessages notes={receiptNoticeViolations} />}
394+
{shouldShowNotesViolations && <ReceiptAuditMessages notes={receiptViolations} />}
395395
<OfflineWithFeedback pendingAction={getPendingFieldAction('amount')}>
396396
<MenuItemWithTopDescription
397397
title={amountTitle}

0 commit comments

Comments
 (0)