From 9f9d02788da1f7d6e613a8966cbacebc77729622 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 17 Jul 2023 19:33:31 +0000 Subject: [PATCH] Bug 26258: Circulation tabs inconsistent with counters This patch makes changes to the markup, style, and behaviour of counters which are displayed on the patron's account tabs: Checkouts, Holds, etc. Tabs which contain a count which might change based on a user's actions will keep up to date, e.g. changing claims status, enrolling in clubs, etc. To test, apply the patch and enable features if necessary: recalls, article requests, claims, clubs, and patron lists. Test both from the checkout page and the patron detail page: Recalls: - If necessary, check out some items to patrons so that there are titles which can be recalled. - Log in to the OPAC and place one or more recalls. - Return to the staff interface and view the "Recalls" tab on the patron's account. - Click Actions -> Cancel for one of the recalls. The recall should be marked "Cancelled" and the count on the tab should update. Return claims: - If necessary, check out some items to a patron. Click the "Claim returned" button on a few of the patron's checkouts. - As you add claims, the "Claims" tab should update the count of claims. *** NOTE: This changes the display of claims in the tab so that the count of unresolved claims appears first: "Unresolved / Resolved". I think it makes more sense for the first number to be the one which shows the number of "active" issues. - Open the Claims tab. Click Actions->Resolve on one or more claims, confirming that the resolved claim is hidden and the tab numbers update. - Test setting the ClaimReturnedWarningThreshold system preference to various values: e.g. empty, 1, 5. - If the pref is empty, OR if the pref is set to a number higher than the number of patron claims, the count of claims should be styled with the "info" blue background and the count of resolved claims is not shown. *** NOTE: Hiding the resolved claims seems logical if there is not a concern about the total number of claims. - If the number of all claims exceeds the value of the preference, the tab should show a count of "Unresolved claims / Resolved claims" with the yellow warning style. Restrictions: - Adding a restriction to the account should cause a counter with a red background to appear on the tab. Clubs: - If necessary, create at least one club template and then multiple clubs. - From the "Clubs" tab on the patron's account, try enrolling and cancelling enrollments to confirm that the count on the tab updates correctly. *** NOTE: I have removed the count of available clubs because I think it's not relevant to this interface. We don't do it with patron lists, so this makes it a little more consistent.. Patron lists: - If necessary, create two ore more patron lists. - From the "Patron lists" tab, try adding and removing the patron from lists. The tab counter should update correctly. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind --- .../prog/css/src/staff-global.scss | 43 ++ .../prog/en/includes/patron-detail-tabs.inc | 77 +-- .../prog/en/includes/str/members-menu.inc | 2 + .../prog/en/modules/clubs/patron-clubs-tab.tt | 1 + .../prog/en/modules/clubs/patron-enroll.tt | 17 +- .../modules/patron_lists/patron-lists-tab.tt | 54 +-- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 438 ++++++++++-------- koha-tmpl/intranet-tmpl/prog/js/recalls.js | 2 + 8 files changed, 363 insertions(+), 271 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 121030e70f..f4e26fe4ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4941,3 +4941,46 @@ div .suggestion_note { } } } + +.nav.nav-tabs > li > a { + align-items: center; + display: flex; + gap: 5px; + + span[class*=" label-"] { + color: #000; + font-size: 85%; + font-weight: bold; + + &.label-info { + background-color: #9BD6E8; + } + + &.label-danger { + background-color: #FF7873; + } + + &:has( span:empty + span:empty ), /* If the element contains two empty spans */ + &:has( span:only-child:empty ) { /* If the element contains only one span and it is empty */ + background-color: transparent; + padding: 0; + } + + &:has( span + span:empty ) { /* If the element has a non-empty span followed by an empty one, reset style */ + background-color: #9BD6E8; + padding: .2em .6em .3em; + } + } +} + +.count-active { /* Add separator between two counts in a tab */ + & + .count-inactive { + &:empty::before { + content: ""; + } + + &::before { + content: " / "; + } + } +} 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 b8ad2eb3b7..cf0ebf12d9 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,88 +4,113 @@ [% WRAPPER tabs id= "finesholdsissues" %] [% WRAPPER tabs_nav %] [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] - Checkouts ([% issuecount || 0 | html %]) + Checkouts + [% IF ( issuecount ) %] + [% issuecount || 0 | html %] + [% END %] [% END %] [% IF relatives_issues_count %] [% WRAPPER tab_item tabname= "relatives-issues" %] - Relatives' checkouts ([% relatives_issues_count | html %]) + Relatives' checkouts + [% IF ( relatives_issues_count ) %] + [% relatives_issues_count | html %] + [% END %] [% END %] [% END %] [% IF ( fines ) %] [% WRAPPER tab_item tabname= "finesandcharges" %] - Charges ([% fines | $Price %]) + Charges + [% IF ( fines ) %] + [% fines | $Price %] + [% END %] [% END %] [% END %] [% IF ( guarantees_fines ) %] [% WRAPPER tab_item tabname= "guarantees_finesandcharges" %] - Guarantees' charges ([% guarantees_fines | $Price %]) + Guarantees' charges + [% IF ( guarantees_fines ) %] + [% guarantees_fines | $Price %] + [% END %] [% END %] [% END %] [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] [% WRAPPER tab_item tabname= "holds" %] - Holds ([% holds_count || 0 | html %]) + Holds + [% IF ( holds_count ) %] + [% holds_count | html %] + [% END %] [% END %] [% END %] [% IF Koha.Preference('UseRecalls') %] [% WRAPPER tab_item tabname= "recalls" %] - Recalls ([% recalls.count || 0 | html %]) + Recalls + [% IF ( recalls.count ) %] + [% recalls.count | html %] + [% END %] [% END %] [% END %] [% IF Koha.Preference('ArticleRequests') %] [% SET article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current') %] [% WRAPPER tab_item tabname= "article-requests" %] - Article requests ([% article_requests.count || 0 | html %]) + Article requests + [% IF ( article_requests.count ) %] + [% article_requests.count | html %] + [% END %] [% END %] [% END %] [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] [% WRAPPER tab_item tabname= "return-claims" %] Claims - [% IF ( patron.return_claims.count ) %] - ([% IF patron.return_claims.resolved.count == 0 %] - [% patron.return_claims.resolved.count | html %] - [% ELSE %] - [% patron.return_claims.resolved.count | html %] - [% END %] - [% IF patron.return_claims.unresolved.count == 0 %] - [% patron.return_claims.unresolved.count | html %] - [% ELSE %] - [% patron.return_claims.unresolved.count | html %] - [% END %]) + [% SET warning_threshold = Koha.Preference('ClaimReturnedWarningThreshold') %] + [% IF warning_threshold != '' && ( patron.return_claims.count > warning_threshold ) %] + + [% patron.return_claims.unresolved.count | html %] + [% patron.return_claims.resolved.count | html %] + [% ELSE %] - [% no_claims = 0 %] - ([% no_claims | html %] - [% no_claims | html %]) - [% END # /IF patron.return_claims.count %] + + [% patron.return_claims.unresolved.count || "" | html %] + [% patron.return_claims.resolved.count || "" | html %] + + [% END %] [% END # /WRAPPER tab_item return-claims %] [% END %] [% WRAPPER tab_item tabname= "reldebarments" %] - Restrictions ([% patron.restrictions.count || 0 | html %]) + Restrictions + [% IF ( patron.restrictions.count ) %] + [% patron.restrictions.count | html %] + [% END %] [% END %] [% SET enrollments = patron.get_club_enrollments %] [% SET enrollable = patron.get_enrollable_clubs(0) %] [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] [% WRAPPER tab_item tabname= "clubs" %] - Clubs ([% enrollments.count | html %]/[% enrollable.count | html %]) + Clubs + + [% enrollments.count || "" | html %] + [% END %] [% END %] [% IF CAN_user_tools_manage_patron_lists || patron_lists_count %] [% WRAPPER tab_item tabname="pat_lists" %] - Patron lists ([% patron_lists_count | html %]) + Patron lists + + [% patron_lists_count || "" | html %] + [% END %] [% END %] [% END # /WRAPPER tabs_nav %] - [% WRAPPER tab_panels %] [% WRAPPER tab_panel tabname="checkouts" bt_active= 1 %] [% INCLUDE "checkouts-table.inc" %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc index 530e9bfb89..f32d8e7526 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc @@ -16,9 +16,11 @@ var dateformat = "[% Koha.Preference('dateformat') | html %]"; var borrowernumber; + var cardnumber; var number_of_adult_categories = 0; [% IF patron %] borrowernumber = "[% patron.borrowernumber | html %]"; + cardnumber = "[% patron.cardnumber | html %]"; [% IF patron.is_child %] [% SET adult_categories = Categories.scalar.all(category_type => 'A') %] [% SET number_of_adult_categories = adult_categories.count %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt index 855683ea26..a0a33dfe7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt @@ -92,6 +92,7 @@ function cancelEnrollment( id ) { if ( success.success ) { $('#clubs_panel').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]', function() { $("body").css("cursor", "default"); + refreshTabCount( $("#clubs-count-enrolled"), $("#table_clubenrollments tbody tr").length ); }); } else { alert(_("Unable to cancel enrollment!")); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt index 8db62bdf25..8b2f457a59 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt @@ -53,7 +53,7 @@ [% END %] [% END %]
  • - Finish enrollment + Finish enrollment Cancel
  • @@ -62,9 +62,17 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index c5b474e027..a10b516463 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -465,17 +465,235 @@ function LoadIssuesTable() { } } -var loadIssuesTableDelayTimeoutId; -var barcodefield = $("#barcode"); +function refreshReturnClaimsTable(){ + const table = $('#return-claims-table'); + if ($.fn.dataTable.isDataTable(table)) { + table.DataTable().ajax.reload(); + } else { + loadReturnClaimsTable(); + } +} + +function loadReturnClaimsTable() { + if ( ! returnClaimsTable ) { + returnClaimsTable = $("#return-claims-table").dataTable({ + "autoWidth": false, + "dom": "rt", + "order": [], + "columnDefs": [ + { "orderable": false, "searchable": false, "targets": ['NoSort'] }, + { "type": "anti-the", "targets": ["anti-the"] }, + ], + "columns": [ + { + "data": "id", + "visible": false, + }, + { + "data": function (oObj) { + if (oObj.resolution) { + return "is_resolved"; + } else { + return "is_unresolved"; + } + }, + "visible": false, + }, + { + "data": function ( oObj ) { + let title = '' + + oObj.title + + ( oObj.subtitle ? " " + oObj.subtitle : "" ) + + ( oObj.enumchron || "" ) + + ''; + if ( oObj.author ) { + title += ' by ' + oObj.author; + } + title += ' ' + + (oObj.barcode ? oObj.barcode.escapeHtml() : "") + + ''; + + return title; + } + }, + { + "className": "return-claim-notes-td", + "data": function ( oObj ) { + let notes = ''; + if ( oObj.notes ) { + notes += oObj.notes; + } + notes += ''; + notes += ''; + return notes; + } + }, + { + "data": "created_on", + "visible": false, + }, + { + "orderData": 4, + "data": function ( oObj ) { + if ( oObj.created_on ) { + return $date(oObj.created_on, { no_tz_adjust: true });; + } else { + return ""; + } + } + }, + { + "data": "updated_on", + "visible": false, + }, + { + "orderData": 6, + "data": function ( oObj ) { + if ( oObj.updated_on ) { + return $date(oObj.updated_on, { no_tz_adjust: true }); + } else { + return ""; + } + } + }, + { + "data": function ( oObj ) { + if ( ! oObj.resolution ) return ""; + + let desc = '' + oObj.resolution_data.lib + ' ('; + if (oObj.resolved_by_data) desc += '' + ( oObj.resolved_by_data.firstname || "" ) + " " + ( oObj.resolved_by_data.surname || "" ) + ''; + desc += ', ' + oObj.resolved_on + ')'; + return desc; + } + }, + { + "data": function ( oObj ) { + let delete_html = oObj.resolved_on + ? '
  • ' + __("Delete") + '
  • ' + : ""; + let resolve_html = ! oObj.resolution + ? '
  • ' + __("Resolve") + '
  • ' + : ""; + + return '
    ' + + ' ' + + ' ' + + '
    '; + } + }, + ], + "paging": false, + "processing": true, + "serverSide": false, + "sAjaxSource": '/cgi-bin/koha/svc/return_claims', + "fnServerData": function ( sSource, aoData, fnCallback ) { + aoData.push( { "name": "borrowernumber", "value": borrowernumber } ); + + $.getJSON( sSource, aoData, function (json) { + let resolved = Number( json.resolved ) || 0; + let unresolved = Number( json.unresolved ) || 0; + let warningThreshold = $("#return-claims-count-unresolved").data("warning"); + + refreshTabCount( $('#return-claims-count-unresolved'), unresolved ); + + if( warningThreshold !== '' && ( ( resolved + unresolved ) > Number( warningThreshold ) ) ){ + refreshTabCount( $('#return-claims-count-resolved'), resolved ); + $("#return-claims-count").attr("class", "label label-warning"); + } else { + $("#return-claims-count").attr("class", "label label-info"); + } + fnCallback(json) + } ); + }, + "search": { "search": "is_unresolved" }, + "footerCallback": function (row, data, start, end, display) { + var api = this.api(); + // Total over all pages + var colData = api.column(1).data(); + var is_unresolved = 0; + var is_resolved = 0; + colData.each(function( index, value ){ + if( index == "is_unresolved" ){ is_unresolved++; } + if (index == "is_resolved") { is_resolved++; } + }); + // Update footer + $("#return-claims-controls").html( showClaimFilter( is_unresolved, is_resolved ) ) + } + }); + } +} -$('#issues-table-load-now-button').click(function(){ - if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); - LoadIssuesTable(); - barcodefield.focus(); +function showClaimFilter( is_unresolved, is_resolved ){ + var showAll, showUnresolved; + var total = Number( is_unresolved ) + Number( is_resolved ); + if( total > 0 ){ + showAll = __nx("Show 1 claim", "Show all {count} claims", total, { count: total }); + } else { + showAll = ""; + } + if( is_unresolved > 0 ){ + showUnresolved = __nx("Show 1 unresolved claim", "Show {count} unresolved claims", is_unresolved, { count: is_unresolved }) + } else { + showUnresolved = ""; + } + $("#show_all_claims").html( showAll ); + $("#show_unresolved_claims").html( showUnresolved ); +} + +function addToList() { + if( CAN_user_tools_manage_patron_lists ){ + var list_id = $("#add_to_patron_list_id_select").val(); + $('#pat_lists_panel').text(_("Loading...")); + $("body").css("cursor", "progress"); + $('#pat_lists_panel').load('/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=' + borrowernumber + '&patron_list_id=' + list_id + '&patrons_to_add=' + cardnumber, function() { + refreshTabCount( $("#patron-lists-count"), $("#table_inlists tbody tr").length ); + $("body").css("cursor", "default"); + }); + } + return false; +} + +function removeFromList( list_id, patron_list_patron_id ) { + if( CAN_user_tools_manage_patron_lists ){ + $('#pat_lists_panel').text(_("Loading...")); + $("body").css("cursor", "progress"); + $('#pat_lists_panel').load('/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=' + borrowernumber + '&patron_list_id=' + list_id + '&patrons_to_remove=' + patron_list_patron_id, function() { + refreshTabCount( $("#patron-lists-count"), $("#table_inlists tbody tr").length ); + $("body").css("cursor", "default"); + }); + } return false; -}); +} + +function refreshTabCount( container, num ){ + if( num > 0 ){ + container.text( num ); + } else { + container.text( "" ); + } +} + +var loadIssuesTableDelayTimeoutId; +var barcodefield = $("#barcode"); +var returnClaimsTable; $(document).ready(function() { + $('#issues-table-load-now-button').click(function(){ + if ( loadIssuesTableDelayTimeoutId ) clearTimeout(loadIssuesTableDelayTimeoutId); + LoadIssuesTable(); + barcodefield.focus(); + return false; + }); var onHoldDueDateSet = false; @@ -995,205 +1213,10 @@ $(document).ready(function() { }); // Don't load return claims table unless its tab is shown - var returnClaimsTable; $("#return-claims-tab").on('shown.bs.tab', function() { refreshReturnClaimsTable(); }); - function refreshReturnClaimsTable(){ - const table = $('#return-claims-table'); - if ($.fn.dataTable.isDataTable(table)) { - table.DataTable().ajax.reload(); - } else { - loadReturnClaimsTable(); - } - } - function loadReturnClaimsTable() { - if ( ! returnClaimsTable ) { - returnClaimsTable = $("#return-claims-table").dataTable({ - "autoWidth": false, - "dom": "rt", - "order": [], - "columnDefs": [ - { "orderable": false, "searchable": false, "targets": ['NoSort'] }, - { "type": "anti-the", "targets": ["anti-the"] }, - ], - "columns": [ - { - "data": "id", - "visible": false, - }, - { - "data": function (oObj) { - if (oObj.resolution) { - return "is_resolved"; - } else { - return "is_unresolved"; - } - }, - "visible": false, - }, - { - "data": function ( oObj ) { - let title = '' - + oObj.title - + ( oObj.subtitle ? " " + oObj.subtitle : "" ) - + ( oObj.enumchron || "" ) - + ''; - if ( oObj.author ) { - title += ' by ' + oObj.author; - } - title += ' ' - + (oObj.barcode ? oObj.barcode.escapeHtml() : "") - + ''; - - return title; - } - }, - { - "className": "return-claim-notes-td", - "data": function ( oObj ) { - let notes = ''; - if ( oObj.notes ) { - notes += oObj.notes; - } - notes += ''; - notes += ''; - return notes; - } - }, - { - "data": "created_on", - "visible": false, - }, - { - "orderData": 4, - "data": function ( oObj ) { - if ( oObj.created_on ) { - return $date(oObj.created_on, { no_tz_adjust: true });; - } else { - return ""; - } - } - }, - { - "data": "updated_on", - "visible": false, - }, - { - "orderData": 6, - "data": function ( oObj ) { - if ( oObj.updated_on ) { - return $date(oObj.updated_on, { no_tz_adjust: true }); - } else { - return ""; - } - } - }, - { - "data": function ( oObj ) { - if ( ! oObj.resolution ) return ""; - - let desc = '' + oObj.resolution_data.lib + ' ('; - if (oObj.resolved_by_data) desc += '' + ( oObj.resolved_by_data.firstname || "" ) + " " + ( oObj.resolved_by_data.surname || "" ) + ''; - desc += ', ' + oObj.resolved_on + ')'; - return desc; - } - }, - { - "data": function ( oObj ) { - let delete_html = oObj.resolved_on - ? '
  • ' + __("Delete") + '
  • ' - : ""; - let resolve_html = ! oObj.resolution - ? '
  • ' + __("Resolve") + '
  • ' - : ""; - - return '
    ' - + ' ' - + ' ' - + '
    '; - } - }, - ], - "paging": false, - "processing": true, - "serverSide": false, - "sAjaxSource": '/cgi-bin/koha/svc/return_claims', - "fnServerData": function ( sSource, aoData, fnCallback ) { - aoData.push( { "name": "borrowernumber", "value": borrowernumber } ); - - $.getJSON( sSource, aoData, function (json) { - let resolved = json.resolved; - let unresolved = json.unresolved; - - if ( resolved > 0 ) { - $('#return-claims-count-resolved').text(resolved) - .removeClass('label-default') - .addClass('label-success'); - } else { - $('#return-claims-count-resolved').text(resolved) - .removeClass('label-success') - .addClass('label-default'); - } - if ( unresolved > 0 ) { - $('#return-claims-count-unresolved').text(unresolved) - .removeClass('label-default') - .addClass('label-warning'); - } else { - $('#return-claims-count-unresolved').text(unresolved) - .removeClass('label-warning') - .addClass('label-default'); - } - - fnCallback(json) - } ); - }, - "search": { "search": "is_unresolved" }, - "footerCallback": function (row, data, start, end, display) { - var api = this.api(); - // Total over all pages - var colData = api.column(1).data(); - var is_unresolved = 0; - var is_resolved = 0; - colData.each(function( index, value ){ - if( index == "is_unresolved" ){ is_unresolved++; } - if (index == "is_resolved") { is_resolved++; } - }); - // Update footer - $("#return-claims-controls").html( showClaimFilter( is_unresolved, is_resolved ) ) - } - }); - } - } - - function showClaimFilter( is_unresolved, is_resolved ){ - var showAll, showUnresolved; - var total = Number( is_unresolved ) + Number( is_resolved ); - if( total > 0 ){ - showAll = __nx("Show 1 claim", "Show all {count} claims", total, { count: total }); - } else { - showAll = ""; - } - if( is_unresolved > 0 ){ - showUnresolved = __nx("Show 1 unresolved claim", "Show {count} unresolved claims", is_unresolved, { count: is_unresolved }) - } else { - showUnresolved = ""; - } - $("#show_all_claims").html( showAll ); - $("#show_unresolved_claims").html( showUnresolved ); - } - $('body').on('click', '.return-claim-tools-editnotes', function() { let id = $(this).data('return-claim-id'); $('#return-claim-notes-static-' + id).parent().dblclick(); @@ -1276,4 +1299,15 @@ $(document).ready(function() { $("#return-claims-table").DataTable().search("is_unresolved").draw(); }); + $("body").on("click", "#add_patron_to_list", function(e){ + e.preventDefault(); + addToList(); + }); + + $("#table_listnopatron, #table_inlists").dataTable($.extend(true, {}, dataTablesDefaults, { + "columnDefs": [ + { 'sortable': false, "bSearchable": false, 'targets': [ 'NoSort' ] } + ], + "sPaginationType": "full" + })); }); diff --git a/koha-tmpl/intranet-tmpl/prog/js/recalls.js b/koha-tmpl/intranet-tmpl/prog/js/recalls.js index 9ab3494f1b..db33a12257 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/recalls.js +++ b/koha-tmpl/intranet-tmpl/prog/js/recalls.js @@ -12,6 +12,8 @@ $(document).ready(function() { message = __("The recall may have already been cancelled. Please refresh the page."); } else { message = __("Cancelled"); + let recallsCount = $("#recalls-count"); + refreshTabCount( recallsCount, ( Number( recallsCount.text() ) - 1 ) ); } td_node.html(message); }, -- 2.39.2