AW-1435 Add links to package manager and widget manager
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
329564d8f6
commit
0157812357
@ -5,6 +5,12 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="username">{{user.name}}</div>
|
<div class="username">{{user.name}}</div>
|
||||||
|
<div *fm-hasclaim="'http://claims.akkerweb.nl/tester'">
|
||||||
|
<a href="#" (click)="startPackageManager($event)" i18n><i class="fa fa-suitcase" aria-hidden="true"></i> Package Manager</a>
|
||||||
|
</div>
|
||||||
|
<div *fm-hasclaim="'http://claims.akkerweb.nl/tester'">
|
||||||
|
<a href="#" (click)="startWidgetManager($event)" i18n><i class="fa fa-plug" aria-hidden="true"></i> Widget Manager</a>
|
||||||
|
</div>
|
||||||
<div><a href="#" (click)="logout($event)" i18n>logout</a></div>
|
<div><a href="#" (click)="logout($event)" i18n>logout</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,6 +4,7 @@ import { IUser } from '../../models/user';
|
|||||||
import {Store} from '@ngrx/store';
|
import {Store} from '@ngrx/store';
|
||||||
import * as appReducers from '../../reducers/app-common.reducer';
|
import * as appReducers from '../../reducers/app-common.reducer';
|
||||||
import * as appActions from '../../actions/app-common.actions';
|
import * as appActions from '../../actions/app-common.actions';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-user-menu',
|
selector: 'fm-user-menu',
|
||||||
@ -15,7 +16,7 @@ export class UserMenuComponent implements OnInit {
|
|||||||
@Input() user:IUser;
|
@Input() user:IUser;
|
||||||
@Input() showMenu:boolean;
|
@Input() showMenu:boolean;
|
||||||
|
|
||||||
constructor(private oauthService:OAuthService, private store: Store<appReducers.State>) { }
|
constructor(private oauthService:OAuthService, private store: Store<appReducers.State>, private router$: Router) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
@ -29,9 +30,18 @@ export class UserMenuComponent implements OnInit {
|
|||||||
this.store.dispatch(new appActions.Logout());
|
this.store.dispatch(new appActions.Logout());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
toggle(event:MouseEvent) {
|
toggle(event:MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.store.dispatch(new appActions.ToggleAccountMenu());
|
this.store.dispatch(new appActions.ToggleAccountMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startPackageManager(event:MouseEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
this.router$.navigate(['/editor/package-manager']);
|
||||||
|
}
|
||||||
|
|
||||||
|
startWidgetManager(event:MouseEvent) {
|
||||||
|
event.preventDefault();
|
||||||
|
this.router$.navigate(['/editor/widget-manager']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user