Bug 29002: Fix async bookings load issues
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 3 Oct 2023 07:07:10 +0000 (08:07 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 3 Nov 2023 15:04:22 +0000 (12:04 -0300)
commite018f86de325acbd8ebc89a8e2b956a0261895ce
tree7fb7c6ef059ea5e98f45acdd4531118abb6546bb
parent927967d9240f3d73423f1c08a7fa5d86da1bcc47
Bug 29002: Fix async bookings load issues

This patch updates the modal booking form to only fire the ajax request
upon first modal opening and then moves the data related setup into a
function that can be trigger either upon promise resolution or
immediately if the data already exists at the time the modal is opened.

We also update some instances of datetime processing to use dayjs
endOf('day') function as it appears to work more reliably with timezone
maths that our prior work that used direct mathematical manipulations.

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>
koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt
koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js