@@ -98,8 +98,10 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, policyMembers, r
98
98
const hasGeneralSettingsError = ! isEmptyObject ( policy ?. errorFields ?. generalSettings ?? { } ) || ! isEmptyObject ( policy ?. errorFields ?. avatar ?? { } ) ;
99
99
100
100
const shouldShowProtectedItems = PolicyUtils . isPolicyAdmin ( policy ) ;
101
+ const isPaidGroupPolicy = PolicyUtils . isPaidGroupPolicy ( policy ) ;
102
+ const isFreeGroupPolicy = PolicyUtils . isFreeGroupPolicy ( policy ) ;
101
103
102
- const protectedMenuItems : WorkspaceMenuItem [ ] = [
104
+ const protectedFreePolicyMenuItems : WorkspaceMenuItem [ ] = [
103
105
{
104
106
translationKey : 'workspace.common.card' ,
105
107
icon : Expensicons . ExpensifyCard ,
@@ -148,6 +150,16 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, policyMembers, r
148
150
} ,
149
151
] ;
150
152
153
+ const protectedCollectPolicyMenuItems : WorkspaceMenuItem [ ] = [
154
+ {
155
+ translationKey : 'workspace.common.members' ,
156
+ icon : Expensicons . Users ,
157
+ action : singleExecution ( waitForNavigate ( ( ) => Navigation . navigate ( ROUTES . WORKSPACE_MEMBERS . getRoute ( policyID ) ) ) ) ,
158
+ brickRoadIndicator : hasMembersError ? CONST . BRICK_ROAD_INDICATOR_STATUS . ERROR : undefined ,
159
+ routeName : SCREENS . WORKSPACE . MEMBERS ,
160
+ } ,
161
+ ] ;
162
+
151
163
const menuItems : WorkspaceMenuItem [ ] = [
152
164
{
153
165
translationKey : 'workspace.common.profile' ,
@@ -156,7 +168,8 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, policyMembers, r
156
168
brickRoadIndicator : hasGeneralSettingsError ? CONST . BRICK_ROAD_INDICATOR_STATUS . ERROR : undefined ,
157
169
routeName : SCREENS . WORKSPACE . PROFILE ,
158
170
} ,
159
- ...( shouldShowProtectedItems ? protectedMenuItems : [ ] ) ,
171
+ ...( isPaidGroupPolicy && shouldShowProtectedItems ? protectedCollectPolicyMenuItems : [ ] ) ,
172
+ ...( isFreeGroupPolicy && shouldShowProtectedItems ? protectedFreePolicyMenuItems : [ ] ) ,
160
173
] ;
161
174
162
175
const prevPolicy = usePrevious ( policy ) ;
0 commit comments