Bugzilla – Attachment 180282 Details for
Bug 38159
Add count to Today's checkouts/Previous checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38159: Add count to todays/previous checkouts
Bug-38159-Add-count-to-todaysprevious-checkouts.patch (text/plain), 2.29 KB, created by
Lucas Gass (lukeg)
on 2025-04-02 09:57:57 UTC
(
hide
)
Description:
Bug 38159: Add count to todays/previous checkouts
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-04-02 09:57:57 UTC
Size:
2.29 KB
patch
obsolete
>From 466b7308d34267015299fac01d8c0fc252eda7c0 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 2 Apr 2025 09:56:54 +0000 >Subject: [PATCH] Bug 38159: Add count to todays/previous checkouts > >To test: >1. APPLY Patch >2. Make some checkouts. >3. Change some of the checkouts to have an older issuedate. >4. When you open the checkouts tables you should see something like Today's checkouts (2) and Previous checkouts (1). >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 26 ++++++++++++++++++-- > 1 file changed, 24 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index f11f755964a..556483cfe78 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -657,13 +657,35 @@ function LoadIssuesTable() { > dataSrc: "issued_today", > startRender: function (rows, group) { > if (group) { >- return __("Today's checkouts"); >+ return ( >+ "<span>" + >+ __("Today's checkouts") + >+ " (<span class='today_count'></span>)</span>" >+ ); > } else { >- return __("Previous checkouts"); >+ return ( >+ "<span>" + >+ __("Previous checkouts") + >+ " (<span class='previous_count'></span>)</span>" >+ ); > } > }, > }, > initComplete: function (oSettings, json) { >+ let todaysIssuesCount = 0; >+ let previousIssuesCount = 0; >+ >+ json.aaData.forEach(function (issue) { >+ if (issue.issued_today) { >+ todaysIssuesCount++; >+ } else { >+ previousIssuesCount++; >+ } >+ }); >+ >+ $(".previous_count").text(previousIssuesCount); >+ $(".today_count").text(todaysIssuesCount); >+ > CheckRenewCheckinBoxes(); > > // Build a summary of checkouts grouped by itemtype >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38159
:
172704
| 180282