Bug 36373 - Show existing bookings in datepicker
Summary: Show existing bookings in datepicker
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 36374
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-20 15:03 UTC by Martin Renvoize
Modified: 2024-03-26 19:33 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 36373: Show existing bookings in the datepicker (4.28 KB, patch)
2024-03-20 17:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36373: Show existing bookings in the datepicker (4.33 KB, patch)
2024-03-26 18:19 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2024-03-20 15:03:49 UTC
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.
Comment 1 Martin Renvoize 2024-03-20 17:10:32 UTC
Created attachment 163572 [details] [review]
Bug 36373: Show existing bookings in the datepicker

This patch exposes existing bookings as info dots in the flatpickr
Comment 2 Martin Renvoize 2024-03-20 17:11:48 UTC
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)
Comment 3 Kristi 2024-03-25 17:00:04 UTC
Is this still in progress, or is it ready for a sign off attempt?
Comment 4 Esther Melander 2024-03-26 18:18:29 UTC
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.
Comment 5 ByWater Sandboxes 2024-03-26 18:19:29 UTC
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>
Comment 6 Esther Melander 2024-03-26 18:22:05 UTC
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.
Comment 7 Martin Renvoize 2024-03-26 19:33:10 UTC
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,