From 97423d8125f6f2e7ff2c6c786fd6ef6367053c61 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 25 Sep 2024 15:09:28 +0000 Subject: [PATCH] Bug 38010: Remove drawCallback from contracts table --- .../components/Vendors/VendorContracts.vue | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorContracts.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorContracts.vue index 3bece17a122..43adfba7cca 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorContracts.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorContracts.vue @@ -23,6 +23,7 @@ export default { return { isUserPermitted, table_id, + escape_str, } }, methods: { @@ -51,7 +52,7 @@ export default { data: "contractname", searchable: false, orderable: false, - render(data, type, row, meta) { + render: function (data, type, row, meta) { return ( `` + escape_str(row.contractname) + @@ -77,30 +78,24 @@ export default { searchable: false, orderable: false, }, - ...(isUserPermitted( - "CAN_user_acquisition_contracts_manage" - ) - ? [ - { - title: __("Actions"), - data: "contractnumber", - searchable: false, - orderable: false, - render(data, type, row, meta) { - return ( - `` + - " " + - __("Edit") + - "" + - `` + - " " + - __("Delete") + - "" - ) - }, - }, - ] - : []), + { + title: __("Actions"), + data: "contractnumber", + searchable: false, + orderable: false, + render: function (data, type, row, meta) { + return ( + `` + + " " + + __("Edit") + + "" + + `` + + " " + + __("Delete") + + "" + ) + }, + }, ], }) ) -- 2.39.3 (Apple Git-146)