Bug 38010: Fix programmatic navigation id attribute
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
fe9c817f23
commit
358d94ae0c
|
|
@ -109,7 +109,7 @@ export default {
|
|||
};
|
||||
},
|
||||
data() {
|
||||
const vendorId = this.vendorid ? this.vendorid : this.params.vendor_id;
|
||||
const vendorId = this.vendorid ? this.vendorid : this.params.id;
|
||||
return {
|
||||
vendorId,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<aside>
|
||||
<aside v-if="leftNavigation !== 'none'">
|
||||
<div class="sidebar_menu">
|
||||
<VendorMenu v-if="leftNavigation === 'VendorMenu'" />
|
||||
<AcquisitionsMenu
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ export default {
|
|||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
if (to.params.vendor_id) {
|
||||
vm.getVendor(to.params.vendor_id);
|
||||
if (to.params.id) {
|
||||
vm.getVendor(to.params.id);
|
||||
} else {
|
||||
vm.initialized = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default {
|
|||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
vm.getVendor(to.params.vendor_id);
|
||||
vm.getVendor(to.params.id);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const routes = [
|
|||
alternateLeftMenu: "AcquisitionsMenu",
|
||||
},
|
||||
{
|
||||
path: ":vendor_id",
|
||||
path: ":id",
|
||||
name: "VendorShow",
|
||||
component: markRaw(VendorShow),
|
||||
title: $__("Show vendor"),
|
||||
|
|
@ -44,12 +44,14 @@ export const routes = [
|
|||
name: "VendorFormAdd",
|
||||
component: markRaw(VendorFormAdd),
|
||||
title: $__("Add vendor"),
|
||||
alternateLeftMenu: "none",
|
||||
},
|
||||
{
|
||||
path: "edit/:vendor_id",
|
||||
path: "edit/:id",
|
||||
name: "VendorFormAddEdit",
|
||||
component: markRaw(VendorFormAdd),
|
||||
title: $__("Edit vendor"),
|
||||
alternateLeftMenu: "VendorMenu",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue