Bugzilla – Attachment 166143 Details for
Bug 35931
Pre-select items with due date today in the renew column on details page and on checkout page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35931: More preselected items in the renew column on patron checkouts
Bug-35931-More-preselected-items-in-the-renew-column.patch (text/plain), 3.35 KB, created by
Katariina Pohto
on 2024-05-03 14:42:02 UTC
(
hide
)
Description:
Bug 35931: More preselected items in the renew column on patron checkouts
Filename:
MIME Type:
Creator:
Katariina Pohto
Created:
2024-05-03 14:42:02 UTC
Size:
3.35 KB
patch
obsolete
>From e0ac6382f018fb53f8a03046b37796d1840c00a1 Mon Sep 17 00:00:00 2001 >From: Katariina Pohto <trainee@koha-suomi.fi> >Date: Fri, 3 May 2024 13:30:02 +0300 >Subject: [PATCH] Bug 35931: More preselected items in the renew column on > patron checkouts > >When viewing patron checkouts table from details or circulation page, overdue checkouts >are preselected for renewals and the overdue dates are bolded and red. This patch will enable >also preselecting checkouts that are due on the current day. The due dates for these checkouts >will be bolded but not red. > >Test plan: >1) See/create a patron with several checkouts: overdue, due today and due later. >2) Note that only the overdue checkouts have a checkmark on Renew column when loading the table. >3) Apply patch. >4) Load the checkouts table again. Note that now also the checkout due today has a preselected renewal > checkmark and the due date has been bolded. >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 4 +++- > svc/checkouts | 2 ++ > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index c5b474e027..a7b13ef461 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -65,6 +65,8 @@ function LoadIssuesTable() { > let date_due_formatted = $datetime(oObj.date_due, { as_due_date: true, no_tz_adjust: true }); > var due = oObj.date_due_overdue > ? "<span class='overdue'>" + date_due_formatted + "</span>" >+ : oObj.date_due_today >+ ? "<span class='strong'>" + date_due_formatted + "</span>" > : date_due_formatted; > > due = "<span id='date_due_" + oObj.itemnumber + "' class='date_due'>" + due + "</span>"; >@@ -333,7 +335,7 @@ function LoadIssuesTable() { > content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>"; > content += "<span class='" + span_class + "' style='" + span_style + "'>" > + "<input type='checkbox' "; >- if ( oObj.date_due_overdue && can_renew ) { >+ if ( can_renew && ( oObj.date_due_overdue || oObj.date_due_today )) { > content += "checked='checked' "; > } > if (oObj.can_renew_error == "on_reserve") { >diff --git a/svc/checkouts b/svc/checkouts >index 4c2ce32609..dd8d1d0f82 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -71,6 +71,7 @@ my $sql = ' > issues.issuedate, > issues.date_due, > issues.date_due < now() as date_due_overdue, >+ date(issues.date_due) = date(now()) as date_due_today, > issues.timestamp, > issues.auto_renew, > >@@ -272,6 +273,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > issuedate => $c->{issuedate}, > date_due => $c->{date_due}, > date_due_overdue => $c->{date_due_overdue} ? JSON::true : JSON::false, >+ date_due_today => $c->{date_due_today} ? JSON::true : JSON::false, > timestamp => $c->{timestamp}, > auto_renew => $c->{auto_renew}, > onsite_checkout => $c->{onsite_checkout}, >-- >2.34.1 >
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 35931
:
166143
|
166782
|
170087