@@ -10,7 +10,7 @@ export class SecondaryMenuHelper {
1010 static getSecondaryMenu = ( path : string , data : any ) => {
1111 let result : { menuItems : MenuItem [ ] ; label : string } = { menuItems : [ ] , label : "" } ;
1212
13- if ( path . startsWith ( "/people" ) || path . startsWith ( "/groups" ) || path . startsWith ( "/attendance" ) ) result = this . getPeopleMenu ( path , data . search ) ;
13+ if ( path . startsWith ( "/people" ) || path . startsWith ( "/groups" ) || path . startsWith ( "/attendance" ) ) result = this . getPeopleMenu ( path , data . search , data ?. isMinistryMember ) ;
1414 else if ( path . startsWith ( "/mobile" ) ) result = this . getMobileMenu ( path ) ;
1515 else if ( path . startsWith ( "/settings" ) || path . startsWith ( "/admin" ) || path . startsWith ( "/forms" ) ) result = this . getSettingsMenu ( path , data ) ;
1616 else if ( path . startsWith ( "/serving" ) ) result = this . getServingMenu ( path , data ) ;
@@ -22,11 +22,11 @@ export class SecondaryMenuHelper {
2222 return result ;
2323 } ;
2424
25- static getPeopleMenu = ( path : string , search ?: string ) => {
25+ static getPeopleMenu = ( path : string , search ?: string , isMinistryMember ?: boolean ) => {
2626 const menuItems : MenuItem [ ] = [ ] ;
2727 let label : string = "" ;
2828 menuItems . push ( { url : "/groups" , label : Locale . label ( "components.wrapper.groups" ) , icon : "groups" } ) ;
29- if ( UserHelper . checkAccess ( Permissions . membershipApi . plans . edit ) || data ?. isMinistryMember ) menuItems . push ( { url : "/serving" , label : Locale . label ( "components.wrapper.teams" ) , icon : "people" } ) ;
29+ if ( UserHelper . checkAccess ( Permissions . membershipApi . plans . edit ) || isMinistryMember ) menuItems . push ( { url : "/serving" , label : Locale . label ( "components.wrapper.teams" ) , icon : "people" } ) ;
3030 menuItems . push ( { url : "/people" , label : Locale . label ( "components.wrapper.ppl" ) , icon : "person" } ) ;
3131 if ( UserHelper . checkAccess ( Permissions . attendanceApi . attendance . viewSummary ) ) menuItems . push ( { url : "/attendance" , label : Locale . label ( "components.wrapper.att" ) , icon : "calendar_month" } ) ;
3232
0 commit comments