From 41f1ca141428d62c0cd72d7ee868e1dd41da4e94 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 8 Nov 2024 13:08:20 +0000 Subject: [PATCH] Bug 38010: Reset basket view --- .../prog/en/includes/vendor-menu.inc | 2 +- .../js/vue/components/Islands/VendorMenu.vue | 7 +- .../vue/components/Vendors/VendorBaskets.vue | 263 ------------------ .../js/vue/components/Vendors/VendorList.vue | 4 +- .../js/vue/components/Vendors/VendorShow.vue | 70 ++--- .../prog/js/vue/routes/acquisitions.js | 7 - 6 files changed, 27 insertions(+), 326 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorBaskets.vue diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc index 5dfb9a75083..631692721e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc @@ -1,7 +1,7 @@ [% IF ( booksellerid ) %] - - - - - diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue index 8034454e51a..3fe26c8d8db 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue @@ -238,9 +238,9 @@ export default { orderable: false, render(data, type, row, meta) { return row.baskets.length - ? '' + + '" class="show">' + escape_str( `${row.baskets.length} basket(s)` ) + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue index 967329897c7..17707d0e7c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue @@ -47,36 +47,27 @@

{{ vendor.name }}

- - + +
+ +
@@ -91,7 +82,6 @@ import VendorInterfaces from "./VendorInterfaces.vue" import VendorContacts from "./VendorContacts.vue" import VendorSubscriptions from "./VendorSubscriptions.vue" import VendorContracts from "./VendorContracts.vue" -import VendorBaskets from "./VendorBaskets.vue" import DropdownButtons from "../DropdownButtons.vue" export default { @@ -107,20 +97,11 @@ export default { return { vendor: null, initialized: false, - basketView: false, - basketCount: null, } }, beforeRouteEnter(to, from, next) { next(vm => { - if (to.path.includes("basket")) { - vm.basketView = true - vm.getVendor(to.params.vendor_id).then(() => - vm.getBasketCount(to.params.vendor_id) - ) - } else { - vm.getVendor(to.params.vendor_id) - } + vm.getVendor(to.params.vendor_id) }) }, methods: { @@ -134,16 +115,6 @@ export default { error => {} ) }, - async getBasketCount(booksellerid) { - const client = APIClient.acquisition - await client.baskets.count({ booksellerid }).then( - count => { - this.basketCount = count - this.initialized = true - }, - error => {} - ) - }, }, components: { Toolbar, @@ -155,7 +126,6 @@ export default { VendorContacts, VendorSubscriptions, VendorContracts, - VendorBaskets, }, name: "VendorShow", } diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js index d146b247798..ccc2987fa41 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/acquisitions.js @@ -52,13 +52,6 @@ export const routes = [ component: markRaw(VendorFormAdd), title: $__("Edit vendor"), }, - { - path: ":vendor_id/baskets", - name: "VendorShowBaskets", - component: markRaw(VendorShow), - title: $__("Baskets"), - alternateLeftMenu: "VendorMenu", - }, ], }, ], -- 2.39.3 (Apple Git-146)