Skip to content

Commit

Permalink
Add isApproved flag from parentReport
Browse files Browse the repository at this point in the history
  • Loading branch information
marcochavezf committed Feb 7, 2024
1 parent 7f4cdce commit 0a9a13c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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')}`;
Expand Down

0 comments on commit 0a9a13c

Please sign in to comment.