File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { ValueOf } from 'type-fest' ;
22import { usePaymentAnimationsContext } from '@components/PaymentAnimationsContext' ;
33import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID' ;
4+ import { isPaidGroupPolicy } from '@libs/PolicyUtils' ;
45import { getReportPrimaryAction } from '@libs/ReportPrimaryActionUtils' ;
6+ import { isExpenseReport as isExpenseReportUtils } from '@libs/ReportUtils' ;
57import { isTransactionPendingDelete } from '@libs/TransactionUtils' ;
68import CONST from '@src/CONST' ;
79import ONYXKEYS from '@src/ONYXKEYS' ;
@@ -30,6 +32,10 @@ function useReportPrimaryAction(reportID: string | undefined): ValueOf<typeof CO
3032
3133 const isChatReportArchived = useReportIsArchived ( chatReport ?. reportID ) ;
3234
35+ if ( isExpenseReportUtils ( moneyRequestReport ) && ! isPaidGroupPolicy ( policy ) ) {
36+ return '' ;
37+ }
38+
3339 if ( isPaidAnimationRunning || isApprovedAnimationRunning ) {
3440 return CONST . REPORT . PRIMARY_ACTIONS . PAY ;
3541 }
You can’t perform that action at this time.
0 commit comments