import { Permission } from 'app/base/shared/model/session' ; export class PermissionWithState { permission : Permission ; has : boolean ; constructor ( permission , has ) { this . permission = permission ; this . has = has ; } } export class PermissionGroup { menuCode : string ; menuName : string ; permissions : Array < PermissionWithState > = [ ] ; constructor ( menuCode , menuName , permissions ) { this . menuCode = menuCode ; this . menuName = menuName ; this . permissions = permissions ; } public appendPermission ( permission ) { if ( ! this . permissions ) { this . permissions = [ ] ; } this . permissions . push ( permission ) ; } }