Fix trigger
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit

This commit is contained in:
Willem Dantuma 2021-04-12 15:52:42 +02:00
parent a6d3b208b0
commit 1380d7169a
6 changed files with 36 additions and 40 deletions

View File

@ -2,7 +2,7 @@
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [ngClass]="{'hidden':!user || noContent}">
<span i18n-title title="Apps"><i class="fas fa-th" aria-hidden="true"></i></span>
<div class="menu hidden" [ngClass]="{'hidden':!showMenu}">
<router-outlet name="app-menu"></router-outlet>
<router-outlet name="app-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()"></router-outlet>
</div>
</div>
</div>

View File

@ -1,6 +1,4 @@
import { Component, OnInit, Input,AfterViewInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Component, OnInit, Input } from '@angular/core';
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
@ -12,28 +10,28 @@ import * as appActions from '../../actions/app-common.actions';
templateUrl: './app-menu.component.html',
styleUrls: ['./app-menu.component.scss']
})
export class AppMenuComponent implements OnInit,AfterViewInit {
export class AppMenuComponent implements OnInit {
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent: boolean = true;
constructor(private store: Store<appReducers.State>, private route: ActivatedRoute) { }
constructor(private store: Store<appReducers.State>) { }
ngOnInit(): void {
}
ngAfterViewInit() {
this.route.children.forEach((entry) => {
if(entry.outlet=="app-menu") {
this.noContent=false;
}
});
}
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleAppMenu());
}
activateRoute() {
this.noContent=false;
}
deActivateRoute() {
this.noContent=true;
}
}

View File

@ -2,7 +2,7 @@
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [ngClass]="{'hidden':!user || noContent}">
<span i18n-title title="Help"><i class="fas fa-question" aria-hidden="true"></i></span>
<div class="menu hidden" [ngClass]="{'hidden':!showMenu}">
<router-outlet name="help-menu"></router-outlet>
<router-outlet name="help-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()></router-outlet>
</div>
</div>
</div>

View File

@ -1,6 +1,5 @@
import { Input } from '@angular/core';
import { Component, OnInit,AfterViewInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
@ -12,27 +11,27 @@ import * as appActions from '../../actions/app-common.actions';
templateUrl: './help-menu.component.html',
styleUrls: ['./help-menu.component.scss']
})
export class HelpMenuComponent implements OnInit, AfterViewInit {
export class HelpMenuComponent implements OnInit {
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent: boolean = true;
constructor(private store: Store<appReducers.State>, private route: ActivatedRoute) { }
constructor(private store: Store<appReducers.State>) { }
ngOnInit(): void {
}
ngAfterViewInit() {
this.route.children.forEach((entry) => {
if(entry.outlet=="help-menu") {
this.noContent=false;
}
});
}
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleHelpMenu());
}
activateRoute() {
this.noContent=false;
}
deActivateRoute() {
this.noContent=true;
}
}

View File

@ -3,7 +3,7 @@
<span class="unread badge bg-info notification rounded-pill hidden" [ngClass]="{'hidden':unread==0}">{{unread}}</span>
<span i18n-title title="Notifications"><i class="fas fa-bell" [ngClass]="{'fa-bell-on':unread!=0}" aria-hidden="true"></i></span>
<div class="menu hidden" [ngClass]="{'hidden':!showMenu}">
<router-outlet name="notification-menu"></router-outlet>
<router-outlet name="notification-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()></router-outlet>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
import { Component, OnInit, Input,AfterViewInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Component, OnInit, Input } from '@angular/core';
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
@ -11,29 +10,29 @@ import * as appActions from '../../actions/app-common.actions';
templateUrl: './notification-menu.component.html',
styleUrls: ['./notification-menu.component.scss']
})
export class NotificationMenuComponent implements OnInit,AfterViewInit {
export class NotificationMenuComponent implements OnInit {
@Input() unread:number;
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent: boolean = true;
constructor(private store: Store<appReducers.State>, private route: ActivatedRoute) { }
constructor(private store: Store<appReducers.State>) { }
ngOnInit(): void {
}
ngAfterViewInit() {
this.route.children.forEach((entry) => {
if(entry.outlet=="notification-menu") {
this.noContent=false;
}
});
}
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleNotificationMenu());
}
activateRoute() {
this.noContent=false;
}
deActivateRoute() {
this.noContent=true;
}
}