From e25c2dc71f00a7ed0a17347f7b062191f6ebaf99 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 7 Nov 2024 15:23:07 +0000 Subject: [PATCH] Bug 38010: Add receive shipments action to table --- .../js/vue/components/Vendors/VendorList.vue | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) 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 318fd1fd03e..8034454e51a 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 @@ -16,6 +16,7 @@ @edit="doEdit" @delete="doDelete" @select="doSelect" + @receive="doReceive" >
@@ -44,6 +45,9 @@ export default { const table = ref() + const permissionsStore = inject("permissionsStore") + const { isUserPermitted } = permissionsStore + return { vendors, get_lib_from_av, @@ -52,6 +56,7 @@ export default { setConfirmationDialog, setMessage, escape_str, + isUserPermitted, } }, data() { @@ -89,6 +94,17 @@ export default { row.subscriptions_count === 0), }, }, + { + receive: { + text: this.$__("Receive shipments"), + icon: "fa fa-inbox", + should_display: row => + row.active && + this.isUserPermitted( + "CAN_user_acquisition_order_receive" + ), + }, + }, ], }, }, @@ -121,6 +137,10 @@ export default { params: { vendor_id: id }, }) }, + doReceive({ id }, dt, event) { + event.preventDefault() + window.open(`/cgi-bin/koha/acqui/parcels.pl?booksellerid=${id}`) + }, doEdit({ id }, dt, event) { this.$router.push({ name: "VendorFormAddEdit", -- 2.39.3 (Apple Git-146)