From 0a9a13c88c1a8ff61dafac558d68dd2918829678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Wed, 7 Feb 2024 13:07:06 -0600 Subject: [PATCH] Add isApproved flag from parentReport --- src/components/ReportActionItem/MoneyRequestView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 3a3aef6cabc..16f6d004624 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -114,6 +114,7 @@ function MoneyRequestView({ const formattedOriginalAmount = transactionOriginalAmount && transactionOriginalCurrency && CurrencyUtils.convertToDisplayString(transactionOriginalAmount, transactionOriginalCurrency); const isCardTransaction = TransactionUtils.isCardTransaction(transaction); const cardProgramName = isCardTransaction && transactionCardID !== undefined ? CardUtils.getCardDescription(transactionCardID) : ''; + const isApproved = ReportUtils.isReportApproved(moneyRequestReport); // Flags for allowing or disallowing editing a money request const isSettled = ReportUtils.isSettled(moneyRequestReport?.reportID); @@ -176,7 +177,7 @@ function MoneyRequestView({ if (!isDistanceRequest) { amountDescription += ` • ${translate('iou.cash')}`; } - if (ReportUtils.isReportApproved(report)) { + if (isApproved) { amountDescription += ` • ${translate('iou.approved')}`; } else if (isCancelled) { amountDescription += ` • ${translate('iou.canceled')}`;