Bugzilla – Attachment 172704 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), 1.98 KB, created by
Lucas Gass (lukeg)
on 2024-10-11 20:02:57 UTC
(
hide
)
Description:
Bug 38159: Add count to todays/previous checkouts
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-10-11 20:02:57 UTC
Size:
1.98 KB
patch
obsolete
>From a8c9374b6747c644687910bc3167c5702e6ec06c Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 11 Oct 2024 20:00:35 +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 | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index a27fd722cfb..792ec7dfa9d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -431,13 +431,28 @@ 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.2
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