AW-823 implementcorrect editor navigation
This commit is contained in:
parent
ab99f6722c
commit
f21648386b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user