Compare commits

...

2 Commits

Author SHA1 Message Date
Willem Dantuma
8decff316b Fix menu outlet
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit
2020-01-08 14:43:44 +01:00
Willem Dantuma
f21648386b AW-823 implementcorrect editor navigation 2020-01-08 14:43:24 +01:00
2 changed files with 11 additions and 10 deletions

View File

@ -15,19 +15,21 @@ export abstract class AbstractSelectedItemComponent {
}
handleOnView(item: IItem) {
var itemType = this.itemTypeService.itemTypes[item.itemType];
if (itemType) {
if (itemType.viewer) {
let url = `/viewer/${itemType.viewer}/item/${item.code}`;
this.router.navigate([url]);
}
if (this.itemTypeService.hasViewer(item)) {
let viewer = this.itemTypeService.itemTypes[item.itemType];
let url = `/viewer/${viewer}/item/${item.code}`;
this.router.navigate([url]);
}
return false;
}
handleOnEdit(item: IItem) {
let url = `/editor/property/item/${item.code}`;
this.router.navigate([url]);
handleOnEdit(item: IItem) {
var editor = "property";
if(this.itemTypeService.hasEditor(item)) {
editor = this.itemTypeService.itemTypes[item.itemType].editor;
}
let url = `/editor/${editor}/item/${item.code}`
this.router.navigate([url]);
return false;
}

View File

@ -1,7 +1,6 @@
<div class="app fullscreen" (click)="handleClick($event)" [ngClass]="{'fullscreen' :(fullScreen|async)}">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<button type="button" class="btn btn-light" (click)="handleToggleMenu($event)"><i class="fa fa-bars" aria-hidden="true"></i></button>
<router-outlet class="logo" [routerLink]="['/']" name="logo"></router-outlet>
<router-outlet name="menu"></router-outlet>
</nav>
<div class="body">