From f2e254b103e7ec2d19a319c7724bb830b7ea3235 Mon Sep 17 00:00:00 2001 From: Eric Garcia Date: Wed, 17 Jul 2024 16:42:31 +0000 Subject: [PATCH] Bug 37273: Added ID column to ERM Agreements and Licenses Tables To test 1. Apply patch, yarn build, restart_all 2. System preferences -> ERMModule -> Enable 3. E-resource management -> Agreements -> "+New Agreement" 4. Notice ID is removed from name and put in it's own column 5. Repeat with licenses table --- admin/columns_settings.yml | 4 ++++ .../js/vue/components/ERM/AgreementsList.vue | 17 ++++++++++++++++- .../prog/js/vue/components/ERM/LicensesList.vue | 17 ++++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 154b66ae17..8d79218972 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -784,6 +784,8 @@ modules: agreements: agreements: columns: + - + columnname: id - columnname: name - @@ -805,6 +807,8 @@ modules: licenses: licenses: columns: + - + columnname: id - columnname: name - diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue index 50305dc21a..d34080e5db 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue @@ -250,6 +250,21 @@ export default { let escape_str = this.escape_str return [ + { + title: __("ID"), + data: "me.agreement_id", + searchable: true, + orderable: true, + render: function (data, type, row, meta) { + return ( + '' + + escape_str(`(#${row.agreement_id})`) + + "" + ) + }, + }, { title: __("Name"), data: "me.name:me.agreement_id", @@ -260,7 +275,7 @@ export default { '' + - escape_str(`${row.name} (#${row.agreement_id})`) + + escape_str(row.name) + "" ) }, diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue index 93cd1dba6e..d4a4d35181 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue @@ -143,6 +143,21 @@ export default { let get_lib_from_av = this.get_lib_from_av return [ + { + title: __("ID"), + data: "me.license_id", + searchable: true, + orderable: true, + render: function (data, type, row, meta) { + return ( + '' + + escape_str(`(#${row.license_id})`) + + "" + ) + }, + }, { title: __("Name"), data: "me.name:me.license_id", @@ -153,7 +168,7 @@ export default { '' + - escape_str(`${row.name} (#${row.license_id})`) + + escape_str(row.name) + "" ) }, -- 2.30.2