@@ -31,6 +31,7 @@ import {getAllCardsForWorkspace, getCardFeedIcon, getCompanyFeeds, getPlaidInsti
3131import { convertToDisplayString } from '@libs/CurrencyUtils' ;
3232import type { PlatformStackScreenProps } from '@libs/Navigation/PlatformStackNavigation/types' ;
3333import { getDisplayNameOrDefault , getPhoneNumber } from '@libs/PersonalDetailsUtils' ;
34+ import { isControlPolicy } from '@libs/PolicyUtils' ;
3435import shouldRenderTransferOwnerButton from '@libs/shouldRenderTransferOwnerButton' ;
3536import { convertPolicyEmployeesToApprovalWorkflows , updateWorkflowDataOnApproverRemoval } from '@libs/WorkflowUtils' ;
3637import Navigation from '@navigation/Navigation' ;
@@ -360,22 +361,26 @@ function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceM
360361 shouldShowRightIcon
361362 onPress = { openRoleSelectionModal }
362363 />
363- < OfflineWithFeedback pendingAction = { member ?. pendingFields ?. employeeUserID } >
364- < MenuItemWithTopDescription
365- description = { translate ( 'workspace.common.customField1' ) }
366- title = { member ?. employeeUserID }
367- shouldShowRightIcon
368- onPress = { ( ) => Navigation . navigate ( ROUTES . WORKSPACE_CUSTOM_FIELDS . getRoute ( policyID , accountID , 'customField1' ) ) }
369- />
370- </ OfflineWithFeedback >
371- < OfflineWithFeedback pendingAction = { member ?. pendingFields ?. employeePayrollID } >
372- < MenuItemWithTopDescription
373- description = { translate ( 'workspace.common.customField2' ) }
374- title = { member ?. employeePayrollID }
375- shouldShowRightIcon
376- onPress = { ( ) => Navigation . navigate ( ROUTES . WORKSPACE_CUSTOM_FIELDS . getRoute ( policyID , accountID , 'customField2' ) ) }
377- />
378- </ OfflineWithFeedback >
364+ { isControlPolicy ( policy ) && (
365+ < >
366+ < OfflineWithFeedback pendingAction = { member ?. pendingFields ?. employeeUserID } >
367+ < MenuItemWithTopDescription
368+ description = { translate ( 'workspace.common.customField1' ) }
369+ title = { member ?. employeeUserID }
370+ shouldShowRightIcon
371+ onPress = { ( ) => Navigation . navigate ( ROUTES . WORKSPACE_CUSTOM_FIELDS . getRoute ( policyID , accountID , 'customField1' ) ) }
372+ />
373+ </ OfflineWithFeedback >
374+ < OfflineWithFeedback pendingAction = { member ?. pendingFields ?. employeePayrollID } >
375+ < MenuItemWithTopDescription
376+ description = { translate ( 'workspace.common.customField2' ) }
377+ title = { member ?. employeePayrollID }
378+ shouldShowRightIcon
379+ onPress = { ( ) => Navigation . navigate ( ROUTES . WORKSPACE_CUSTOM_FIELDS . getRoute ( policyID , accountID , 'customField2' ) ) }
380+ />
381+ </ OfflineWithFeedback >
382+ </ >
383+ ) }
379384 < MenuItem
380385 style = { styles . mb5 }
381386 title = { translate ( 'common.profile' ) }
0 commit comments