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

38 lines
879 B
TypeScript
Raw Normal View History

2021-02-16 15:49:23 +00:00
import { Input } from '@angular/core';
2021-04-12 13:52:42 +00:00
import { Component, OnInit } from '@angular/core';
2021-02-16 15:49:23 +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-help-menu',
templateUrl: './help-menu.component.html',
styleUrls: ['./help-menu.component.scss']
})
2021-04-12 13:52:42 +00:00
export class HelpMenuComponent implements OnInit {
2021-02-16 15:49:23 +00:00
@Input() user:IUser;
@Input() showMenu:boolean;
2023-03-06 13:04:14 +00:00
public noContent = true;
2021-02-16 15:49:23 +00:00
2021-04-12 13:52:42 +00:00
constructor(private store: Store<appReducers.State>) { }
2021-02-16 15:49:23 +00:00
ngOnInit(): void {
}
toggle(event:MouseEvent) {
event.stopPropagation();
2021-02-16 16:07:40 +00:00
this.store.dispatch(new appActions.ToggleHelpMenu());
2021-02-16 15:49:23 +00:00
}
2021-04-12 13:52:42 +00:00
activateRoute() {
this.noContent=false;
}
deActivateRoute() {
this.noContent=true;
}
2021-02-16 15:49:23 +00:00
}