@@ -2,10 +2,11 @@ import {useIsFocused} from '@react-navigation/native';
22import { Str } from 'expensify-common' ;
33import type { ImageContentFit } from 'expo-image' ;
44import type { ForwardedRef } from 'react' ;
5- import React , { forwardRef , useCallback , useEffect , useImperativeHandle , useMemo , useRef , useState } from 'react' ;
5+ import React , { forwardRef , useCallback , useContext , useEffect , useImperativeHandle , useMemo , useRef , useState } from 'react' ;
66import { InteractionManager , View } from 'react-native' ;
77import type { OnyxCollection , OnyxEntry } from 'react-native-onyx' ;
88import ConfirmModal from '@components/ConfirmModal' ;
9+ import { DelegateNoAccessContext } from '@components/DelegateNoAccessModalProvider' ;
910import FloatingActionButton from '@components/FloatingActionButton' ;
1011import * as Expensicons from '@components/Icon/Expensicons' ;
1112import type { PopoverMenuItem } from '@components/PopoverMenu' ;
@@ -110,6 +111,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
110111 const [ quickActionPolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ quickActionReport ?. policyID } ` , { canBeMissing : true } ) ;
111112 const [ allPolicies ] = useOnyx ( ONYXKEYS . COLLECTION . POLICY , { selector : ( c ) => mapOnyxCollectionItems ( c , policySelector ) , canBeMissing : true } ) ;
112113 const currentUserPersonalDetails = useCurrentUserPersonalDetails ( ) ;
114+ const { isDelegateAccessRestricted, showDelegateNoAccessModal} = useContext ( DelegateNoAccessContext ) ;
113115
114116 const [ isCreateMenuActive , setIsCreateMenuActive ] = useState ( false ) ;
115117 const [ modalVisible , setModalVisible ] = useState ( false ) ;
@@ -330,6 +332,10 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
330332 }
331333 const onSelected = ( ) => {
332334 interceptAnonymousUser ( ( ) => {
335+ if ( quickAction ?. action === CONST . QUICK_ACTIONS . SEND_MONEY && isDelegateAccessRestricted ) {
336+ showDelegateNoAccessModal ( ) ;
337+ return ;
338+ }
333339 navigateToQuickAction ( isValidReport , quickAction , currentUserPersonalDetails , quickActionPolicy ?. id , selectOption ) ;
334340 } ) ;
335341 } ;
@@ -387,6 +393,8 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
387393 isValidReport ,
388394 selectOption ,
389395 shouldUseNarrowLayout ,
396+ isDelegateAccessRestricted ,
397+ showDelegateNoAccessModal ,
390398 ] ) ;
391399
392400 const isTravelEnabled = useMemo ( ( ) => {
0 commit comments