Bug 33737: Fix patron bookings table display issues

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2023-08-18 11:21:37 +01:00 committed by Katrin Fischer
parent cee9da8efc
commit a8bf78d32e
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 6 additions and 8 deletions

View file

@ -228,7 +228,7 @@
[% WRAPPER tab_panel tabname="bookings" %]
[% IF ( bookings_count ) %]
<table id="bookings-table" style="width: 100% !Important;"></table>
<table id="bookings_table" style="width: 100% !Important;"></table>
[% ELSE %]
<p>Patron has nothing booked.</p>
[% END %]

View file

@ -784,7 +784,7 @@
if ( !bookings_table ) {
var today = new Date();
var bookings_table_url = "/api/v1/bookings";
bookings_table = $('#bookings-table').kohaTable({
bookings_table = $('#bookings_table').kohaTable({
"ajax": {
"url": bookings_table_url
},
@ -796,9 +796,7 @@
"columns": [{
"data": "booking_id",
"title": "Booking ID",
"visible": false,
"searchable": false,
"orderable": false
"visible": false
},
{
"data": "biblio.title",
@ -829,7 +827,7 @@
"searchable": true,
"orderable": true,
"render": function(data, type, row, meta) {
return $datetime(row.start_date);
return $date(row.start_date);
}
},
{
@ -838,7 +836,7 @@
"searchable": true,
"orderable": true,
"render": function(data, type, row, meta) {
return $datetime(row.end_date);
return $date(row.end_date);
}
},
{
@ -851,7 +849,7 @@
return result;
}
}]
}, [], 1, { patron_id: "[% patron.borrowernumber | html %]", end_date: { ">=": today.toISOString() } });
}, [], 0, { patron_id: "[% patron.borrowernumber | html %]", end_date: { ">=": today.toISOString() } });
};
});
// Bookings