From e08667606a9c77cb66c1bdb7589d4be12b35cdf4 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 21 May 2025 09:22:19 +0100 Subject: [PATCH] Bug 39951: Fix column filter offsets Test plan: 1) Enable ERM module 2) Create an agreement and a license with a vendor 3) The table filters will be out of sync - Agreements - only the vendor filter is incorrect, it sits above the name column instead of the vendor column - Licenses - all dropdown filter options will be left shifted by one 4) Apply patch 5) yarn js:build 6) Hard refresh the browser 7) All the filters should now be above the correct columns Signed-off-by: Roman Dolny Signed-off-by: Jonathan Druart --- .../prog/js/vue/components/ERM/AgreementsList.vue | 2 +- .../prog/js/vue/components/ERM/LicensesList.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 8e0989f35d0..cfbeacdaa2a 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 @@ -121,7 +121,7 @@ export default { table_settings: this.agreement_table_settings, add_filters: true, filters_options: { - 1: () => + 2: () => this.vendors.map(e => { e["_id"] = e["id"]; e["_str"] = e["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 7e5409856df..4a30e83bdfa 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 @@ -75,14 +75,14 @@ export default { table_settings: this.license_table_settings, add_filters: true, filters_options: { - 1: () => + 2: () => this.vendors.map(e => { e["_id"] = e["id"]; e["_str"] = e["name"]; return e; }), - 3: () => this.map_av_dt_filter("av_license_types"), - 4: () => this.map_av_dt_filter("av_license_statuses"), + 4: () => this.map_av_dt_filter("av_license_types"), + 5: () => this.map_av_dt_filter("av_license_statuses"), }, actions: { 0: ["show"], -- 2.34.1