diff --git a/src/app/core/shell/toolbar/toolbar.component.html b/src/app/core/shell/toolbar/toolbar.component.html index da623a272..369e5918a 100644 --- a/src/app/core/shell/toolbar/toolbar.component.html +++ b/src/app/core/shell/toolbar/toolbar.component.html @@ -34,25 +34,46 @@ [matMenuTriggerFor]="institutionMenu" #institutionMenuTrigger="matMenuTrigger" tabindex="0" + *mifosxHasPermission="'READ_INSTITUTION'" > {{ 'labels.menus.Institution' | translate }} - + {{ 'labels.menus.Accounting' | translate }} - + {{ 'labels.menus.Reports' | translate }} - + {{ 'labels.menus.Admin' | translate }} - + {{ 'labels.menus.Configuration Wizard' | translate }} diff --git a/src/app/core/shell/toolbar/toolbar.component.ts b/src/app/core/shell/toolbar/toolbar.component.ts index d36ccd9f9..b599651a7 100644 --- a/src/app/core/shell/toolbar/toolbar.component.ts +++ b/src/app/core/shell/toolbar/toolbar.component.ts @@ -157,6 +157,9 @@ export class ToolbarComponent implements OnInit, AfterViewInit, AfterContentChec * @param backdrop Boolean. */ showPopover(template: TemplateRef, target: ElementRef | HTMLElement): void { + if (!target) { + return; + } setTimeout(() => this.popoverService.open(template, target, 'bottom', true, {}), 200); } diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html index a69c24a23..0dd825264 100644 --- a/src/app/navigation/navigation.component.html +++ b/src/app/navigation/navigation.component.html @@ -4,7 +4,7 @@ @if (!(officeData === undefined || officeData === null)) { - + {{ 'labels.inputs.Office' | translate }} @for (office of officeData; track office) { @@ -17,7 +17,7 @@ } @if (!(employeeData === undefined || employeeData === null)) { - + {{ employeeData.length ? 'Officer' : 'No Associated Officers' }} @for (employee of employeeData; track employee) { @@ -30,7 +30,7 @@ } @if (!(centerData === undefined || centerData === null)) { - + {{ centerData.length ? 'Center' : 'No Associated Centers' }} @for (center of centerData; track center) { @@ -43,7 +43,7 @@ } @if (!(groupData === undefined || groupData === null)) { - + {{ groupData.length ? 'Group' : 'No Associated Groups' }} @for (group of groupData; track group) { @@ -56,7 +56,7 @@ } @if (!(clientData === undefined || clientData === null)) { - + {{ clientData.length ? 'Client' : 'No Associated Clients' }} @for (client of clientData; track client) {