Bug 29002: Fix patron display for new bookings in timeline
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
9b9e9614d2
commit
adcaee8b6d
1 changed files with 10 additions and 2 deletions
|
@ -406,13 +406,17 @@ $("#placeBookingForm").on('submit', function(e) {
|
|||
bookings_table.api().ajax.reload();
|
||||
}
|
||||
if (typeof timeline !== 'undefined' && timeline !== null) {
|
||||
let selected_patron = $("#booking_patron_id").select2('data')[0];
|
||||
timeline.itemsData.add({
|
||||
id: data.booking_id,
|
||||
booking: data.booking_id,
|
||||
patron: data.patron_id,
|
||||
start: dayjs(data.start_date).toDate(),
|
||||
end: dayjs(data.end_date).toDate(),
|
||||
content: 'Booking: ' + data.booking_id,
|
||||
content: $patron_to_html(selected_patron, {
|
||||
display_cardnumber: true,
|
||||
url: false
|
||||
}),
|
||||
editable: { remove: true, updateTime: true },
|
||||
type: 'range',
|
||||
group: data.item_id ? data.item_id : 0
|
||||
|
@ -452,13 +456,17 @@ $("#placeBookingForm").on('submit', function(e) {
|
|||
bookings_table.api().ajax.reload();
|
||||
}
|
||||
if (typeof timeline !== 'undefined' && timeline !== null) {
|
||||
let selected_patron = $("#booking_patron_id").select2('data')[0];
|
||||
timeline.itemsData.update({
|
||||
id: data.booking_id,
|
||||
booking: data.booking_id,
|
||||
patron: data.patron_id,
|
||||
start: dayjs(data.start_date).toDate(),
|
||||
end: dayjs(data.end_date).toDate(),
|
||||
content: 'Booking: ' + data.booking_id,
|
||||
content: $patron_to_html(selected_patron, {
|
||||
display_cardnumber: true,
|
||||
url: false
|
||||
}),
|
||||
editable: { remove: true, updateTime: true },
|
||||
type: 'range',
|
||||
group: data.item_id ? data.item_id : 0
|
||||
|
|
Loading…
Reference in a new issue