Skip to content

Commit

Permalink
use allViolations
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Jan 7, 2025
1 parent 77107ff commit 8e69675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/SearchUIUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function getAction(data: OnyxTypes.SearchResults['data'], key: string): SearchTr

// We check for isAllowedToApproveExpenseReport because if the policy has preventSelfApprovals enabled, we disable the Submit action and in that case we want to show the View action instead
const transactionIDList = allReportTransactions.map((reportTransaction) => reportTransaction.transactionID);
if (IOU.canSubmitReport(report, policy, transactionIDList) && isAllowedToApproveExpenseReport) {
if (IOU.canSubmitReport(report, policy, transactionIDList, allViolations) && isAllowedToApproveExpenseReport) {
return CONST.SEARCH.ACTION_TYPES.SUBMIT;
}

Expand Down

0 comments on commit 8e69675

Please sign in to comment.