Commit 9cead15b authored by Alex ORLUC's avatar Alex ORLUC

FIX #12003 TIME 0:15 fix menu 1.5

parent 4be1a9da
......@@ -3,7 +3,7 @@
<mat-sidenav #snav [mode]="appService.getViewMode() ? 'over' : 'side'"
[fixedInViewport]="appService.getViewMode()" fixedTopGap="56"
[opened]="appService.getViewMode() ? false : true">
<menu-shortcut></menu-shortcut>
<menu-shortcut #appShortcut></menu-shortcut>
<menu-nav></menu-nav>
</mat-sidenav>
<mat-sidenav-content>
......@@ -114,7 +114,7 @@
</mat-tab>
<mat-tab label="{{lang.indexation}}" *ngIf="!creationMode">
<ng-template matTabContent>
<app-indexing-administration [groupId]="group.id"></app-indexing-administration>
<app-indexing-administration [groupId]="group.id" (resfreshShortcut)="resfreshShortcut()"></app-indexing-administration>
</ng-template>
</mat-tab>
<mat-tab label="{{lang.relatedUsers}}" *ngIf="!creationMode">
......
......@@ -12,6 +12,7 @@ import { AppService } from '../../../service/app.service';
import { PrivilegeService } from '../../../service/privileges.service';
import { tap, catchError, exhaustMap } from 'rxjs/operators';
import { of } from 'rxjs';
import { MenuShortcutComponent } from '../../menu/menu-shortcut.component';
declare function $j(selector: any): any;
......@@ -45,6 +46,7 @@ export class GroupAdministrationComponent implements OnInit {
@ViewChild('sortBaskets', { static: true }) sortBaskets: MatSort;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator;
@ViewChild('sortUsers', { static: true }) sortUsers: MatSort;
@ViewChild('appShortcut', { static: false }) appShortcut: MenuShortcutComponent;
applyFilter(filterValue: string) {
filterValue = filterValue.trim();
......@@ -205,6 +207,13 @@ export class GroupAdministrationComponent implements OnInit {
}
resfreshShortcut() {
this.headerService.resfreshCurrentUser();
setTimeout(() => {
this.appShortcut.loadShortcuts();
}, 200);
}
getCurrentPrivListDiff(serviceId: string) {
if (this.group.privileges.indexOf(serviceId) > -1) {
return true;
......
import { Component, OnInit, Input } from '@angular/core';
import { Component, OnInit, Input, ViewChild, Output, EventEmitter } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { LANG } from '../../../translate.component';
import { NotificationService } from '../../../notification.service';
......@@ -9,6 +9,7 @@ import { MatDialogRef, MatDialog } from '@angular/material/dialog';
import { ConfirmComponent } from '../../../../plugins/modal/confirm.component';
import { HeaderService } from '../../../../service/header.service';
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
import { MenuShortcutComponent } from '../../../menu/menu-shortcut.component';
declare function $j(selector: any): any;
......@@ -26,6 +27,7 @@ export class IndexingAdministrationComponent implements OnInit {
loading: boolean = true;
@Input('groupId') groupId: number;
@Output('resfreshShortcut') resfreshShortcut = new EventEmitter<string>();
keywordEntities: any[] = [];
actionList: any[] = [];
......@@ -321,7 +323,7 @@ export class IndexingAdministrationComponent implements OnInit {
this.http.put('../../rest/groups/' + this.groupId + '/indexing', { canIndex: canIndex }).pipe(
tap(() => {
this.indexingInfo.canIndex = canIndex;
//this.headerService.refreshShortcuts();
this.resfreshShortcut.emit();
}),
tap(() => {
if (this.indexingInfo.canIndex) {
......
......@@ -42,7 +42,7 @@ export class AppComponent {
iconReg.addSvgIcon('maarchLogo', sanitizer.bypassSecurityTrustResourceUrl('static.php?filename=logo_white.svg')).addSvgIcon('maarchLogoOnly', sanitizer.bypassSecurityTrustResourceUrl('img/logo_only_white.svg'));
iconReg.addSvgIcon('maarchLogoFull', sanitizer.bypassSecurityTrustResourceUrl('static.php?filename=logo.svg')).addSvgIcon('maarchLogoOnlyDefault', sanitizer.bypassSecurityTrustResourceUrl('img/logo.svg'));
this.headerService.loadHeader();
//this.headerService.loadHeader();
/*REMOVE AFTER FULL MAARCH V2*/
$j('my-app').css({"display":"block"});
......
......@@ -6,7 +6,7 @@
<h1 class="admin-toolbar-title">{{headerService.headerMessage}}</h1><span class="admin-toolbar-title-small">{{headerService.subHeaderMessage}}</span>
<span style="flex: 1 1 auto;"></span>
<search-home></search-home>
<button mat-button [matMenuTriggerFor]="applications" *ngIf="!appService.getViewMode()" style="min-width:0px;width:65px;height: 40px;margin-left: 10px" matTooltip="{{lang.menu}}">
<button mat-button [matMenuTriggerFor]="applications" (click)="getMenus()" *ngIf="!appService.getViewMode()" style="min-width:0px;width:65px;height: 40px;margin-left: 10px" matTooltip="{{lang.menu}}">
<mat-icon mat-list-icon class="fa fa-th" style="font-size:20px;color:white;height:auto;"></mat-icon>
</button>
<mat-menu #applications="matMenu" class="headerMaarchShortcut">
......
......@@ -47,10 +47,10 @@ export class MainHeaderComponent implements OnInit {
};
}
ngOnInit(): void {
setTimeout(() => {
this.menus = this.privilegeService.getCurrentUserMenus();
}, 200);
ngOnInit(): void { }
getMenus() {
this.menus = this.privilegeService.getCurrentUserMenus();
}
setTitle(title: string) {
......
......@@ -498,7 +498,7 @@ export class PrivilegeService {
"id": "indexing",
"label": this.lang.recordMail,
"comment": this.lang.recordMail,
"route": "/indexing",
"route": "/indexing/"+indexingGroups[0].id,
"style": "fa fa-file-medical",
"unit": "application",
"angular": true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment