Skip to content

Commit

Permalink
Merge pull request #36063 from Expensify/marco-fixApprovedDescription
Browse files Browse the repository at this point in the history
Show the "Approved" description in request details page
  • Loading branch information
puneetlath authored Feb 9, 2024
2 parents 3758e37 + 0a9a13c commit 22d3663
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 @@ -110,6 +110,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 @@ -173,7 +174,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 22d3663

Please sign in to comment.