We should, fairly trivially, be able to display existing bookings on the bookings datepicker. This would make it a little simpler for staff to pick an item for the user at booking time.
Created attachment 163572 [details] [review] Bug 36373: Show existing bookings in the datepicker This patch exposes existing bookings as info dots in the flatpickr
Just a quick proof of concept here... Nice to have, but could have performance implications and would need some tidying up before it's ready for prime time (like, I'd like different items in different colors and the dots to have a hover function that would yield item detail)
Is this still in progress, or is it ready for a sign off attempt?
My test plan: 1. Search the catalog and find an item and make it bookable 2. Place a booking on that item (select the same barcode) for three different patrons. See the available booking dates change with each additional booking for the same item. Repeat this, but 1. Select a bibliographic record with multiple items. Make each item bookable. 2. Place a booking, but select the option for "any item" for three different patrons. Have one of the bookings overlap another. See the available booking dates change with each additional booking. The dates with a dot indicate a copy has been booked. A date with more than one dot indicates more than one copy has been booked. Look at the bookings tab for the bibliographic record. See the different bookings with the patrons names and dates and the assigned item.
Created attachment 163954 [details] [review] Bug 36373: Show existing bookings in the datepicker This patch exposes existing bookings as info dots in the flatpickr Signed-off-by: Esther <esther@bywatersolutions.com>
This seems to work fine. It would be nice to have a hover function for the dots. Some libraries have many copies, such as for a book club, and the dots may not work as well - may cause a very cluttered date picker. I did not test the limits, but something to consider. For now, it works as intended.
Haha, that's great. This was really just a bit of a proof of concept I pulled out of the lead-in/trail-out work I've been doing for one of the other bookings bugs. I decided I was going down a wrong path there but liked this piece enough to pull it out for safe keeping here. Thanks for writing a test plan and the feedback Esther. You've identified most of the points I was worried about as it happens. It won't scale well as it is UI wise but I haven't come up with an alternative as yet so I'm open to suggestions. I was contemplating different colours for different items, dots Vs lines, hints in hover or numeric labels for numbers if items booked per day. All good for thought, I'll continue here once I've got the tie other bookings bugs I have in progress submitted as they have a more pressing deadline at the minute. Thanks again,
Created attachment 166585 [details] [review] Bug 36373: Show existing bookings in the datepicker This patch exposes existing bookings as info dots in the flatpickr Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The . is a bit subtle, I think a tooltip on hover would be nice, right now you just get the "forbidden" sign.
Pushed for 24.05! Well done everyone, thank you!
Depends on Bug 36374 not in 23.11.x