FarmMapsLib/projects/common/src/fm/components/app-menu/app-menu.component.ts

38 lines
841 B
TypeScript
Raw Normal View History

2021-04-12 13:52:42 +00:00
import { Component, OnInit, Input } from '@angular/core';
2020-12-09 20:45:38 +00:00
import { IUser } from '../../models/user';
import {Store} from '@ngrx/store';
import * as appReducers from '../../reducers/app-common.reducer';
import * as appActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-app-menu',
templateUrl: './app-menu.component.html',
styleUrls: ['./app-menu.component.scss']
})
2021-04-12 13:52:42 +00:00
export class AppMenuComponent implements OnInit {
2020-12-09 20:45:38 +00:00
@Input() user:IUser;
@Input() showMenu:boolean;
2023-03-06 13:04:14 +00:00
public noContent = true;
2020-12-09 20:45:38 +00:00
2021-04-12 13:52:42 +00:00
constructor(private store: Store<appReducers.State>) { }
2020-12-09 20:45:38 +00:00
ngOnInit(): void {
}
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleAppMenu());
}
2021-04-12 13:52:42 +00:00
activateRoute() {
this.noContent=false;
}
deActivateRoute() {
this.noContent=true;
}
2020-12-09 20:45:38 +00:00
}