From 9107c0dd5ad44deba9472c1e572ed8228df2063d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 3 Oct 2024 10:50:57 +0200 Subject: [PATCH] Bug 33484: Add table settings to pending orders Signed-off-by: Pedro Amorim Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- admin/columns_settings.yml | 36 +++++++++++++++++++ .../prog/en/modules/acqui/parcel.tt | 5 ++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 59fe8cd22b..5b441fbb1e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -114,6 +114,42 @@ modules: - columnname: isbn + parcel: + pending_orders: + columns: + - + columnname: checkbox + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: basket + - + columnname: basket_group + - + columnname: order_line + - + columnname: summary + - + columnname: view + - + columnname: replacement_price + - + columnname: quantity + - + columnname: unit_cost + - + columnname: order_cost + - + columnname: fund + - + columnname: actions_1 + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: actions_2 + cannot_be_toggled: 1 + cannot_be_modified: 1 + basket: orders: default_display_length: 20 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index e9f4f5fc7a..ee605f66d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE KohaDates %] +[% USE TablesSettings %] [% USE Price %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] @@ -669,7 +670,9 @@ "orderable": false }); - var pending_orders_table = $("#pending_orders").kohaTable(options, {}, 1, { "basket.vendor_id": [% booksellerid | html %] }); + let table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'parcel', 'pending_orders', 'json' ) | $raw %]; + + var pending_orders_table = $("#pending_orders").kohaTable(options, table_settings, 1, { "basket.vendor_id": [% booksellerid | html %] }); var api = pending_orders_table.api(); api.on('draw', function () { -- 2.39.5