Bug 33736: Add item location and filter by library to bookings to collect report
This patch adds a new 'Location' field to the bookings to collect report. We display with the current item location or an onloan status with the due date. We also add filtering for status != 'waiting' to the base query to rule out items marked as ready for collection already (however, we don't yet have a way of marking such a status so this won't have any effect yet). Sponsored-by: PTFS Europe Ltd Signed-off-by: Esther Melander <esther@bywatersolutions.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
b910ccb647
commit
f5d0dceb82
|
|
@ -45,6 +45,8 @@
|
|||
enum:
|
||||
- biblio
|
||||
- item
|
||||
- item+strings
|
||||
- item.checkout
|
||||
- patron
|
||||
- pickup_library
|
||||
collectionFormat: csv
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@
|
|||
let library = $("#library").find(":selected").val();
|
||||
return library;
|
||||
},
|
||||
status: { '!=': 'waiting' },
|
||||
};
|
||||
|
||||
var bookings_table_url = '/api/v1/bookings?';
|
||||
|
|
@ -138,7 +139,8 @@
|
|||
},
|
||||
"embed": [
|
||||
"biblio",
|
||||
"item",
|
||||
"item+strings",
|
||||
"item.checkout",
|
||||
"patron",
|
||||
"pickup_library"
|
||||
],
|
||||
|
|
@ -192,6 +194,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "",
|
||||
"title": "Location",
|
||||
"searchable": false,
|
||||
"orderable": true,
|
||||
"render": function(data,type,row,meta) {
|
||||
if ( row.item ) {
|
||||
if ( row.item.checked_out_date ) {
|
||||
return __("On loan, due: ") . $date(row.item.checked_out_date);
|
||||
} else {
|
||||
return row.item._strings.location.str;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "patron.firstname:patron.surname",
|
||||
"title": "Patron",
|
||||
|
|
|
|||
Loading…
Reference in New Issue