From 59577ff7fd8deda116642a8cfb681bc76ed20319 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 3 Nov 2023 16:51:11 +0000 Subject: [PATCH] Bug 35251: Update checkout count when refreshing issue table 1. Have some checkouts 2. Go to the issue-table and select some of those checkouts and check them in. 3. Look at the tab, Checkouts(X) 4. This is not updated and now shows an incorrect number of checkouts. 4. APPLY PATCH, clear browser cache/ 5. Try again, now when the table reloads the 'Checkouts(X)' tab should be correctly updated. Signed-off-by: David Nind --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc | 2 +- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc index ba4fd3ee26..8b4659064b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc @@ -4,7 +4,7 @@ [% WRAPPER tabs id= "finesholdsissues" %] [% WRAPPER tabs_nav %] [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] - Checkouts ([% issuecount || 0 | html %]) + Checkouts ([% issuecount || 0 | html %]) [% END %] [% IF relatives_issues_count %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index 7fb8e89d73..b9db3f384f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -316,6 +316,8 @@ $(document).ready(function() { $('.checkin[value="'+checked+'"]').prop('checked' , true ); }); } + var checkout_count = table.page.info().recordsTotal; + $('.checkout_count').text(checkout_count); }); } -- 2.30.2