Skip to content

Commit

Permalink
Merge pull request #51644 from callstack-internal/VickyStash/bugfix/5…
Browse files Browse the repository at this point in the history
…1345-hide-approve-pending-card-transaction

Hide approve button for pending card transaction
  • Loading branch information
AndrewGable authored Nov 6, 2024
2 parents 62aed8d + 9cc65b1 commit 6d4c6bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea

const shouldShowPayButton = canIOUBePaid || onlyShowPayElsewhere;

const shouldShowApproveButton = useMemo(() => IOU.canApproveIOU(moneyRequestReport, policy), [moneyRequestReport, policy]);
const shouldShowApproveButton = useMemo(() => IOU.canApproveIOU(moneyRequestReport, policy) && !hasOnlyPendingTransactions, [moneyRequestReport, policy, hasOnlyPendingTransactions]);

const shouldDisableApproveButton = shouldShowApproveButton && !ReportUtils.isAllowedToApproveExpenseReport(moneyRequestReport);

Expand Down

0 comments on commit 6d4c6bd

Please sign in to comment.