From bbc4e8050d4db1209f3f664ce93c185703e1ce21 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 21 Apr 2026 11:00:44 +0000 Subject: [PATCH] Bug 37762: (QA follow-up): Add filters to supply ILL table Also fix table_settings Signed-off-by: Jason Robb Signed-off-by: Lisette Scheer Signed-off-by: Lucas Gass --- admin/columns_settings.yml | 17 +++++ .../intranet-tmpl/prog/en/modules/ill/ill.tt | 2 +- .../vue/components/ILL/SupplyingResource.vue | 66 +++++-------------- 3 files changed, 34 insertions(+), 51 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index a438baa164..6bd3e83119 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1179,6 +1179,23 @@ modules: columnname: action cannot_be_toggled: 1 cannot_be_modified: 1 + ill-supply: + ill-supply: + columns: + - + columnname: iso18626_request_id + - + columnname: iso18626_requesting_agency_id + - + columnname: status + - + columnname: service_type + - + columnname: pending_requesting_agency_action + - + columnname: created_on + - + columnname: updated_on members: fines: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill.tt index 404af85d12..bfe8ac90e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill.tt @@ -28,7 +28,7 @@ [% INCLUDE 'datatables.inc' %] [% INCLUDE 'js-date-format.inc' %] [% Asset.js("js/vue/dist/ill.js") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/SupplyingResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/SupplyingResource.vue index 09db7308e5..615a30f81f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/SupplyingResource.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/SupplyingResource.vue @@ -1070,63 +1070,29 @@ export default { const tableOptions = { url: () => tableUrl(), options: { embed: "requesting_agency,messages" }, - //table_settings: supplying_ill_table_settings, #FIXME: This causes error from datatables.js -> out of this scope - table_settings: { - columns: [ + table_settings: supplying_ill_table_settings, + add_filters: true, + filters_options: { + status: statuses.value + .map(status => ({ + _id: status.id, + _str: $__(status.id), + })) + .sort((a, b) => a._str.localeCompare(b._str)), + service_type: [ { - columnname: "iso18626_request_id", - cannot_be_modified: 0, - is_hidden: 0, - cannot_be_toggled: 0, + _id: "Copy", + _str: $__("Copy"), }, { - columnname: "supplyingAgencyId", - is_hidden: 0, - cannot_be_modified: 0, - cannot_be_toggled: 0, + _id: "CopyOrLoan", + _str: $__("CopyOrLoan"), }, { - is_hidden: 0, - cannot_be_toggled: 0, - cannot_be_modified: 0, - columnname: "requesting_agency", - render: function (data, type, row, meta) { - return ( - '' + - escape_str(row.id_prefix) + - escape_str(data) + - "" - ); - }, - }, - { - is_hidden: 0, - cannot_be_toggled: 0, - cannot_be_modified: 0, - columnname: "status", - }, - { - is_hidden: 0, - cannot_be_modified: 0, - cannot_be_toggled: 0, - columnname: "updated_on", //TODO: Check if these table_settings is being used at all? - }, - { - is_hidden: 0, - cannot_be_toggled: 0, - cannot_be_modified: 0, - columnname: "requestingAgencyRequestId", + _id: "Loan", + _str: $__("Loan"), }, ], - default_display_length: null, - table: "iso18626_requests", - module: "ill", - default_save_state: 1, - page: "ill", - default_save_state_search: 0, }, actions: { 0: ["show"],