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. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
32311b9ac0
commit
804fd912d4
|
|
@ -64,6 +64,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>";
|
||||
|
|
@ -332,7 +334,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") {
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
Loading…
Reference in New Issue