[Bug 41129] New: Migrate place_booking.js to a Vue island.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Bug ID: 41129 Summary: Migrate place_booking.js to a Vue island. Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: paul.derscheid@lmscloud.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Since the bookings functionality requires a significant amount of reactivity due to many interdependent inputs to achieve a good UX, this bug is intended to deprecate place_booking.js in favor of a Vue island that makes this much easier. The goal here is to have a Vue based component that is used for the Staff Interface as well as the OPAC to avoid duplication and diverging implementations and also makes it easier to keep track of problems that then don't need to be fixed in two places. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Circulation| |Bookings function| | Depends on| |29002 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 [Bug 29002] Add ability to book items ahead of time -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Large patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #1 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 188546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188546&action=edit Bug 41129: [DO NOT PUSH] Add BookingModal.vue, remove place_booking.{inc,js} - Migration to Vue - Pinia store integration - Flatpickr calendar integration with constraint highlighting - Multi-step booking form with validation - Availability checking - API adapter pattern (prep for full APIClient migration) Technical notes: The booking adapters currently use fetch() directly but have been structured to facilitate migration to APIClient pattern. Full APIClient migration requires: - BiblioAPIClient for bookable items/pickup locations - CheckoutAPIClient for checkout queries - CirculationRulesAPIClient for rules endpoint - PatronAPIClient.search() method enhancement This work should be completed as a team effort to ensure consistency across the codebase. Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Browser Console: 49. Throughout all tests, verify no JavaScript errors in console 50. Verify no warnings about deprecated code Build Process: 51. Run yarn js:build{,:prod} 52. Verify build completes without errors 53. Verify dist files are generated correctly Additional Regression Testing: 54. Test with various system preferences configurations 55. Test with multiple bookable items per biblio 56. Test with various circulation rules configurations 57. Test with different patron categories 58. Test booking constraints at item level vs itemtype level -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #2 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Side note: there's some blocks lingering that mimic bootstrap functionality that was missing in 22.11 (where this was ported back to main from). I will remove that next. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 188551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188551&action=edit Bug 41129: Use Bootstrap 5 Modal API for booking modal - Use Bootstrap Modal API for show/hide/dispose lifecycle - Replace custom modal classes with Bootstrap native classes - Remove custom backdrop CSS - Remove modal-scroll.mjs polyfill - Unify two watchers on props.open into single watcher - Add focus management to prevent aria-hidden warnings -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Andrew Auld <andrew.auld@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew.auld@openfifth.co.uk | |, | |jacob.omara@openfifth.co.uk | |, | |matt.blenkinsop@openfifth.c | |o.uk, | |pedro.amorim@openfifth.co.u | |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 189348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189348&action=edit Bug 41129: Remove logger call -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 189350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189350&action=edit Bug 41129: Add cypress tests To test: - Run `yarn cypress run --spec t/cypress/integration/Bookings/BookingModal_spec.ts` -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|29002 |40134 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 [Bug 29002] Add ability to book items ahead of time https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40134 [Bug 40134] Fix and optimise 'Any item' functionality of bookings -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- I have a series of fixes, enhancements and most importantly cypress tests submitted in a line down from bug 40134. I intend to rebase the patches here against those to ensure we catch all the cases I fixed there.. many of my pieces are bugfixes so I believe they should go first. Once I've rebased, I'll check the results against the Cypress tests and work on bringing this up to date for, hopefully, an early push in 26.05 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35937 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35937 [Bug 35937] Add hourly support to bookings -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37618 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37618 [Bug 37618] Select patron's, then item's home library by default for pickup location when creating bookings -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37363 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37363 [Bug 37363] Booking dates should respect closed days -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- *** Bug 37151 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- *** Bug 37153 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37151 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37151 [Bug 37151] Add detail on hover for bookings event dots -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37153 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37153 [Bug 37153] Event dots should appear side-by-side rather than stack vertically for bookings picker -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|40134 |37707 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37707 [Bug 37707] Lead/Trail times should work in combination https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40134 [Bug 40134] Fix and optimise 'Any item' functionality of bookings -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188546|0 |1 is obsolete| | Attachment #188551|0 |1 is obsolete| | Attachment #189348|0 |1 is obsolete| | Attachment #189350|0 |1 is obsolete| | --- Comment #9 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193909&action=edit Bug 41129: Introduce Vue booking modal and Bootstrap 5 modal wiring Replace the jQuery/TT-based place_booking modal with a Vue 3 SFC component mounted via the island architecture pattern. - Add BookingModal.vue with multi-step form (patron, details, period) - Add Pinia store (stores/bookings.js) for shared booking state - Add flatpickr calendar with constraint highlighting, marker dots, hover feedback bar, and availability computation - Add API adapter layer (lib/adapters/api/) using fetch(), structured for future APIClient migration - Add interval tree and sweep-line processor for efficient overlap detection and unavailability computation - Add composables for availability, validation, capacity guard, constraint highlighting, rules fetching, and flatpickr lifecycle - Use Bootstrap 5 Modal API (show/hide/dispose) for modal lifecycle - Add island.inc, button-place.inc, button-edit.inc entry points - Wire into cat-toolbar.inc, detail.tt, bookings/list.tt, and all catalogue detail views - Add KohaAlert.vue, dayjs.mjs, and apiErrors.js shared utilities - Add rspack.config.js entry for booking-modal-island bundle Technical notes: The booking adapters use fetch() directly but are structured to facilitate migration to the APIClient pattern. Full migration requires BiblioAPIClient, CheckoutAPIClient, CirculationRulesAPI- Client, and PatronAPIClient.search() enhancements — best done as a coordinated effort across the codebase. Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #10 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193910 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193910&action=edit Bug 41129: Add initial Cypress coverage for booking modal - Test modal open/close lifecycle from biblio detail page - Test patron search typeahead and selection - Test item type and pickup location dropdowns - Test flatpickr date range selection and validation - Test booking creation via API with success/error paths - Test edit booking flow with pre-filled form state -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #11 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193911&action=edit Bug 41129: Sync bookings with refactored base and API/embed compatibility Replace the Bookings module with the refactored architecture and adapt API specs for upstream compatibility. Module restructuring: - Split calendar.mjs into focused modules under lib/adapters/calendar/ (events, highlighting, locale, markers, prevention, visibility) - Add BookingDate class (immutable, timezone-aware date wrapper) - Add availability/ sub-modules (date-change, disabled-dates, period-validators, rules, unavailable-map) - Add useFormDefaults composable for pickup and item type defaults - Add conflict-resolution, constraints, highlighting, markers modules - Add hover-feedback module for calendar feedback bar - Convert BookingModal.vue to <script setup lang="ts"> - Manage error state in Pinia store Behavior additions: - Add 3-way payload construction for "any item" bookings - Add editable property to timeline booking items - Show transient success message after booking save - Apply server timezone conversion for timeline dates API/embed compatibility: - Add GET /libraries/{id}/holidays endpoint (Libraries.pm, swagger) - Allow "library" embed on GET /patrons/{id} (patrons.yaml) Test updates: - Move specs to Circulation/ directory, split into Basic, DatePicker, and Timezone specs - Add Vue Select test helpers (vue-select.js) - Validate flatpickr state via instance API instead of DOM classes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #12 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193912&action=edit Bug 41129: Fix booking modal runtime and test regressions Runtime: - Add missing use C4::Context in Libraries.pm - Use safe DOM construction instead of innerHTML in external-dependents.mjs (booking count update, success message) - Remove reference to undefined BookingDateRangeConstraint syspref - Stub OPAC fetchHolidays (public endpoint does not exist) - Pass UI visibility flags to useBookingValidation as reactive parameter instead of reading from store Type/test corrections: - Remove duplicate ItemType type declaration in bookings.d.ts - Remove overly broad uncaught:exception handler from e2e.js - Stabilise DatePicker spec against flatpickr navigation races - Correct fencepost in max booking period calculation -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #13 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193913 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193913&action=edit Bug 41129: Remove dead code and consolidate styles and tests Dead code: - Remove uncalled SweepLineProcessor methods (~155 lines) - Remove unused constants, exports, and wrapper functions - Remove unused Cypress flatpickr helper commands - Remove erroneous Vue compiler macro import in BookingTooltip CSS: - Unify two :root blocks and two <style> blocks in BookingModal.vue - Centralise marker dot color variants in BookingModal.vue; remove duplicates from BookingPeriodStep and BookingTooltip - Replace hardcoded #28a745 with --booking-constraint-marker variable Tests: - Consolidate booking modal specs into bookingsModalBasic_spec.ts - Scope _feedbackHideTimer per createOnDayCreate instance - Replace debug console.log with console.warn in list.tt - Document catch blocks in staff-interface.js -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193909|0 |1 is obsolete| | Attachment #193910|0 |1 is obsolete| | Attachment #193911|0 |1 is obsolete| | Attachment #193912|0 |1 is obsolete| | Attachment #193913|0 |1 is obsolete| | --- Comment #14 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193925&action=edit Bug 41129: Introduce Vue booking modal and Bootstrap 5 modal wiring Replace the jQuery/TT-based place_booking modal with a Vue 3 SFC component mounted via the island architecture pattern. Core components: - Add BookingModal.vue (<script setup lang="ts">) with multi-step form (patron, details, period) - Add Pinia store (stores/bookings.js) for shared booking state - Add flatpickr calendar with constraint highlighting, marker dots, hover feedback bar, and availability computation - Use Bootstrap 5 Modal API (show/hide/dispose) for modal lifecycle - Add island.inc, button-place.inc, button-edit.inc entry points - Wire into cat-toolbar.inc, detail.tt, bookings/list.tt, and all catalogue detail views - Add KohaAlert.vue, dayjs.mjs, and apiErrors.js shared utilities - Add rspack.config.js entry for booking-modal-island bundle Module architecture: - Add API adapter layer (lib/adapters/api/) using fetch(), structured for future APIClient migration - Split calendar adapter into focused modules under lib/adapters/calendar/ (events, highlighting, locale, markers, prevention, visibility) - Add BookingDate class (immutable, timezone-aware date wrapper) - Add availability/ sub-modules (date-change, disabled-dates, period-validators, rules, unavailable-map) - Add interval tree and sweep-line processor for efficient overlap detection and unavailability computation - Add composables for availability, validation, capacity guard, constraint highlighting, rules fetching, flatpickr lifecycle, and form defaults - Add conflict-resolution, constraints, highlighting, markers modules - Add hover-feedback module for calendar feedback bar - Manage error state in Pinia store Behavior: - Add 3-way payload construction for "any item" bookings - Add editable property to timeline booking items - Show transient success message after booking save - Apply server timezone conversion for timeline dates API/embed compatibility: - Add GET /libraries/{id}/holidays endpoint (Libraries.pm, swagger) - Allow "library" embed on GET /patrons/{id} (patrons.yaml) Cypress coverage: - Test modal open/close lifecycle from biblio detail page - Test patron search typeahead and selection - Test item type and pickup location dropdowns - Test flatpickr date range selection and validation - Test booking creation via API with success/error paths - Test edit booking flow with pre-filled form state - Add Vue Select test helpers (vue-select.js) - Validate flatpickr state via instance API instead of DOM classes Technical notes: The booking adapters use fetch() directly but are structured to facilitate migration to the APIClient pattern. Full migration requires BiblioAPIClient, CheckoutAPIClient, CirculationRulesAPI- Client, and PatronAPIClient.search() enhancements — best done as a coordinated effort across the codebase. Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #15 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193926&action=edit Bug 41129: Harden runtime paths and test reliability Runtime: - Add missing use C4::Context in Libraries.pm - Use safe DOM construction instead of innerHTML in external-dependents.mjs (booking count update, success message) - Guard against undefined BookingDateRangeConstraint syspref - Stub OPAC fetchHolidays (public endpoint does not exist) - Pass UI visibility flags to useBookingValidation as reactive parameter instead of reading from store - Simplify island.inc template and add missing TT output filters - Remove unused ItemType type definition from bookings.d.ts Tests: - Correct fencepost in max booking period calculation - Guard DatePicker spec against flatpickr navigation races - Validate via flatpickr instance state instead of DOM classes - Remove broad error suppression from e2e.js support file Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #16 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193927&action=edit Bug 41129: Clean up unused code and consolidate styles Code: - Remove uncalled SweepLineProcessor methods (~155 lines) - Remove unused constants, exports, and wrapper functions - Remove unused unavailableByDateRef from useAvailability - Simplify fixTargetEndDateAvailability wrapper in highlighting CSS: - Unify two :root blocks and two <style> blocks in BookingModal.vue - Centralise marker dot color variants in BookingModal.vue; remove duplicates from BookingPeriodStep and BookingTooltip - Replace hardcoded #28a745 with --booking-constraint-marker variable Tests: - Add test cases for modal state reset, zero-day circulation rule warning, and error handling (409 conflict, 500 server error) - Remove unused flatpickr helper commands and assertion functions Misc: - Scope _feedbackHideTimer per createOnDayCreate instance - Document catch blocks in staff-interface.js - Upgrade debug console.log to console.warn in list.tt Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193928 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193928&action=edit Bug 41129: Allow calendar readiness in "any item" default state - Remove item type and item ID requirement from formPrefilterValid and canProceedToStep3; the "any item" default is valid when bookable items exist - Remove unused store refs and UI flags from useBookingValidation Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #18 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 193929 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193929&action=edit Bug 41129: Fix booking modal reopen race and add regression test Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |paul.derscheid@lmscloud.de |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Comma delimited| |Büchereizentrale list of Sponsors| |Schleswig-Holstein | |<https://www.bz-sh.de/> Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193925|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193926|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193927|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193928|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193929|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #19 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 195807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195807&action=edit Bug 41129: Introduce Vue booking modal and Bootstrap 5 modal wiring Replace the jQuery/TT-based place_booking modal with a Vue 3 SFC component mounted via the island architecture pattern. Core components: - Add BookingModal.vue (<script setup lang="ts">) with multi-step form (patron, details, period) - Add Pinia store (stores/bookings.js) for shared booking state - Add flatpickr calendar with constraint highlighting, marker dots, hover feedback bar, and availability computation - Use Bootstrap 5 Modal API (show/hide/dispose) for modal lifecycle - Add island.inc, button-place.inc, button-edit.inc entry points - Wire into cat-toolbar.inc, detail.tt, bookings/list.tt, and all catalogue detail views - Add KohaAlert.vue, dayjs.mjs, and apiErrors.js shared utilities - Add rspack.config.js entry for booking-modal-island bundle Module architecture: - Add API adapter layer (lib/adapters/api/) using fetch(), structured for future APIClient migration - Split calendar adapter into focused modules under lib/adapters/calendar/ (events, highlighting, locale, markers, prevention, visibility) - Add BookingDate class (immutable, timezone-aware date wrapper) - Add availability/ sub-modules (date-change, disabled-dates, period-validators, rules, unavailable-map) - Add interval tree and sweep-line processor for efficient overlap detection and unavailability computation - Add composables for availability, validation, capacity guard, constraint highlighting, rules fetching, flatpickr lifecycle, and form defaults - Add conflict-resolution, constraints, highlighting, markers modules - Add hover-feedback module for calendar feedback bar - Manage error state in Pinia store Behavior: - Add 3-way payload construction for "any item" bookings - Add editable property to timeline booking items - Show transient success message after booking save - Apply server timezone conversion for timeline dates API/embed compatibility: - Add GET /libraries/{id}/holidays endpoint (Libraries.pm, swagger) - Allow "library" embed on GET /patrons/{id} (patrons.yaml) Cypress coverage: - Test modal open/close lifecycle from biblio detail page - Test patron search typeahead and selection - Test item type and pickup location dropdowns - Test flatpickr date range selection and validation - Test booking creation via API with success/error paths - Test edit booking flow with pre-filled form state - Add Vue Select test helpers (vue-select.js) - Validate flatpickr state via instance API instead of DOM classes Technical notes: The booking adapters use fetch() directly but are structured to facilitate migration to the APIClient pattern. Full migration requires BiblioAPIClient, CheckoutAPIClient, CirculationRulesAPI- Client, and PatronAPIClient.search() enhancements — best done as a coordinated effort across the codebase. Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #20 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 195808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195808&action=edit Bug 41129: Harden runtime paths and test reliability Runtime: - Add missing use C4::Context in Libraries.pm - Use safe DOM construction instead of innerHTML in external-dependents.mjs (booking count update, success message) - Guard against undefined BookingDateRangeConstraint syspref - Stub OPAC fetchHolidays (public endpoint does not exist) - Pass UI visibility flags to useBookingValidation as reactive parameter instead of reading from store - Simplify island.inc template and add missing TT output filters - Remove unused ItemType type definition from bookings.d.ts Tests: - Correct fencepost in max booking period calculation - Guard DatePicker spec against flatpickr navigation races - Validate via flatpickr instance state instead of DOM classes - Remove broad error suppression from e2e.js support file Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #21 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 195809 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195809&action=edit Bug 41129: Clean up unused code and consolidate styles Code: - Remove uncalled SweepLineProcessor methods (~155 lines) - Remove unused constants, exports, and wrapper functions - Remove unused unavailableByDateRef from useAvailability - Simplify fixTargetEndDateAvailability wrapper in highlighting CSS: - Unify two :root blocks and two <style> blocks in BookingModal.vue - Centralise marker dot color variants in BookingModal.vue; remove duplicates from BookingPeriodStep and BookingTooltip - Replace hardcoded #28a745 with --booking-constraint-marker variable Tests: - Add test cases for modal state reset, zero-day circulation rule warning, and error handling (409 conflict, 500 server error) - Remove unused flatpickr helper commands and assertion functions Misc: - Scope _feedbackHideTimer per createOnDayCreate instance - Document catch blocks in staff-interface.js - Upgrade debug console.log to console.warn in list.tt Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #22 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 195810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195810&action=edit Bug 41129: Allow calendar readiness in "any item" default state - Remove item type and item ID requirement from formPrefilterValid and canProceedToStep3; the "any item" default is valid when bookable items exist - Remove unused store refs and UI flags from useBookingValidation Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #23 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 195811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195811&action=edit Bug 41129: Fix booking modal reopen race and add regression test Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/> Depends on| |42206, 42207 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42206 [Bug 42206] Add REST endpoint GET /libraries/{id}/holidays https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42207 [Bug 42207] Allow library embed on GET /patrons/{patron_id} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/>, | |Büchereizentrale | |Schleswig-Holstein | |<https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195807|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195808|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195809|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195810|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195811|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #24 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196436&action=edit Bug 41129: Introduce Vue booking modal and Bootstrap 5 modal wiring Replace the jQuery/TT-based place_booking modal with a Vue 3 SFC component mounted via the island architecture pattern. Core components: - Add BookingModal.vue (<script setup lang="ts">) with multi-step form (patron, details, period) - Add Pinia store (stores/bookings.js) for shared booking state - Add flatpickr calendar with constraint highlighting, marker dots, hover feedback bar, and availability computation - Use Bootstrap 5 Modal API (show/hide/dispose) for modal lifecycle - Add island.inc, button-place.inc, button-edit.inc entry points - Wire into cat-toolbar.inc, detail.tt, bookings/list.tt, and all catalogue detail views - Add KohaAlert.vue, dayjs.mjs, and apiErrors.js shared utilities - Add rspack.config.js entry for booking-modal-island bundle Module architecture: - Add API adapter layer (lib/adapters/api/) using fetch(), structured for future APIClient migration - Split calendar adapter into focused modules under lib/adapters/calendar/ (events, highlighting, locale, markers, prevention, visibility) - Add BookingDate class (immutable, timezone-aware date wrapper) - Add availability/ sub-modules (date-change, disabled-dates, period-validators, rules, unavailable-map) - Add interval tree and sweep-line processor for efficient overlap detection and unavailability computation - Add composables for availability, validation, capacity guard, constraint highlighting, rules fetching, flatpickr lifecycle, and form defaults - Add conflict-resolution, constraints, highlighting, markers modules - Add hover-feedback module for calendar feedback bar - Manage error state in Pinia store Behavior: - Add 3-way payload construction for "any item" bookings - Add editable property to timeline booking items - Show transient success message after booking save - Apply server timezone conversion for timeline dates API/embed compatibility: - Add GET /libraries/{id}/holidays endpoint (Libraries.pm, swagger) - Allow "library" embed on GET /patrons/{id} (patrons.yaml) Cypress coverage: - Test modal open/close lifecycle from biblio detail page - Test patron search typeahead and selection - Test item type and pickup location dropdowns - Test flatpickr date range selection and validation - Test booking creation via API with success/error paths - Test edit booking flow with pre-filled form state - Add Vue Select test helpers (vue-select.js) - Validate flatpickr state via instance API instead of DOM classes Technical notes: The booking adapters use fetch() directly but are structured to facilitate migration to the APIClient pattern. Full migration requires BiblioAPIClient, CheckoutAPIClient, CirculationRulesAPI- Client, and PatronAPIClient.search() enhancements — best done as a coordinated effort across the codebase. Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #25 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196437&action=edit Bug 41129: Harden runtime paths and test reliability Runtime: - Add missing use C4::Context in Libraries.pm - Use safe DOM construction instead of innerHTML in external-dependents.mjs (booking count update, success message) - Guard against undefined BookingDateRangeConstraint syspref - Stub OPAC fetchHolidays (public endpoint does not exist) - Pass UI visibility flags to useBookingValidation as reactive parameter instead of reading from store - Simplify island.inc template and add missing TT output filters - Remove unused ItemType type definition from bookings.d.ts Tests: - Correct fencepost in max booking period calculation - Guard DatePicker spec against flatpickr navigation races - Validate via flatpickr instance state instead of DOM classes - Remove broad error suppression from e2e.js support file Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #26 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196438&action=edit Bug 41129: Clean up unused code and consolidate styles Code: - Remove uncalled SweepLineProcessor methods (~155 lines) - Remove unused constants, exports, and wrapper functions - Remove unused unavailableByDateRef from useAvailability - Simplify fixTargetEndDateAvailability wrapper in highlighting CSS: - Unify two :root blocks and two <style> blocks in BookingModal.vue - Centralise marker dot color variants in BookingModal.vue; remove duplicates from BookingPeriodStep and BookingTooltip - Replace hardcoded #28a745 with --booking-constraint-marker variable Tests: - Add test cases for modal state reset, zero-day circulation rule warning, and error handling (409 conflict, 500 server error) - Remove unused flatpickr helper commands and assertion functions Misc: - Scope _feedbackHideTimer per createOnDayCreate instance - Document catch blocks in staff-interface.js - Upgrade debug console.log to console.warn in list.tt Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #27 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196439 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196439&action=edit Bug 41129: Allow calendar readiness in "any item" default state - Remove item type and item ID requirement from formPrefilterValid and canProceedToStep3; the "any item" default is valid when bookable items exist - Remove unused store refs and UI flags from useBookingValidation Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #28 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196440 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196440&action=edit Bug 41129: Fix booking modal reopen race and add regression test Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #29 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Split out Bugs 42206 and 42207 out of the general bookings modal implementation and deduped. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196436|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196437|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196438|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196439|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196440|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #30 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196449&action=edit Bug 41129: Introduce Vue booking modal and Bootstrap 5 modal wiring Replace the jQuery/TT-based place_booking modal with a Vue 3 SFC component mounted via the island architecture pattern. Core components: - Add BookingModal.vue (<script setup lang="ts">) with multi-step form (patron, details, period) - Add Pinia store (stores/bookings.js) for shared booking state - Add flatpickr calendar with constraint highlighting, marker dots, hover feedback bar, and availability computation - Use Bootstrap 5 Modal API (show/hide/dispose) for modal lifecycle - Add island.inc, button-place.inc, button-edit.inc entry points - Wire into cat-toolbar.inc, detail.tt, bookings/list.tt, and all catalogue detail views - Add KohaAlert.vue, dayjs.mjs, and apiErrors.js shared utilities - Add rspack.config.js entry for booking-modal-island bundle Module architecture: - Add API adapter layer (lib/adapters/api/) using fetch(), structured for future APIClient migration - Split calendar adapter into focused modules under lib/adapters/calendar/ (events, highlighting, locale, markers, prevention, visibility) - Add BookingDate class (immutable, timezone-aware date wrapper) - Add availability/ sub-modules (date-change, disabled-dates, period-validators, rules, unavailable-map) - Add interval tree and sweep-line processor for efficient overlap detection and unavailability computation - Add composables for availability, validation, capacity guard, constraint highlighting, rules fetching, flatpickr lifecycle, and form defaults - Add conflict-resolution, constraints, highlighting, markers modules - Add hover-feedback module for calendar feedback bar - Manage error state in Pinia store Behavior: - Add 3-way payload construction for "any item" bookings - Add editable property to timeline booking items - Show transient success message after booking save - Apply server timezone conversion for timeline dates API/embed compatibility: - Add GET /libraries/{id}/holidays endpoint (Libraries.pm, swagger) - Allow "library" embed on GET /patrons/{id} (patrons.yaml) Cypress coverage: - Test modal open/close lifecycle from biblio detail page - Test patron search typeahead and selection - Test item type and pickup location dropdowns - Test flatpickr date range selection and validation - Test booking creation via API with success/error paths - Test edit booking flow with pre-filled form state - Add Vue Select test helpers (vue-select.js) - Validate flatpickr state via instance API instead of DOM classes Technical notes: The booking adapters use fetch() directly but are structured to facilitate migration to the APIClient pattern. Full migration requires BiblioAPIClient, CheckoutAPIClient, CirculationRulesAPI- Client, and PatronAPIClient.search() enhancements — best done as a coordinated effort across the codebase. Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #31 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196450&action=edit Bug 41129: Harden runtime paths and test reliability Runtime: - Add missing use C4::Context in Libraries.pm - Use safe DOM construction instead of innerHTML in external-dependents.mjs (booking count update, success message) - Guard against undefined BookingDateRangeConstraint syspref - Stub OPAC fetchHolidays (public endpoint does not exist) - Pass UI visibility flags to useBookingValidation as reactive parameter instead of reading from store - Simplify island.inc template and add missing TT output filters - Remove unused ItemType type definition from bookings.d.ts Tests: - Correct fencepost in max booking period calculation - Guard DatePicker spec against flatpickr navigation races - Validate via flatpickr instance state instead of DOM classes - Remove broad error suppression from e2e.js support file Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #32 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196451 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196451&action=edit Bug 41129: Clean up unused code and consolidate styles Code: - Remove uncalled SweepLineProcessor methods (~155 lines) - Remove unused constants, exports, and wrapper functions - Remove unused unavailableByDateRef from useAvailability - Simplify fixTargetEndDateAvailability wrapper in highlighting CSS: - Unify two :root blocks and two <style> blocks in BookingModal.vue - Centralise marker dot color variants in BookingModal.vue; remove duplicates from BookingPeriodStep and BookingTooltip - Replace hardcoded #28a745 with --booking-constraint-marker variable Tests: - Add test cases for modal state reset, zero-day circulation rule warning, and error handling (409 conflict, 500 server error) - Remove unused flatpickr helper commands and assertion functions Misc: - Scope _feedbackHideTimer per createOnDayCreate instance - Document catch blocks in staff-interface.js - Upgrade debug console.log to console.warn in list.tt Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #33 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196452 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196452&action=edit Bug 41129: Allow calendar readiness in "any item" default state - Remove item type and item ID requirement from formPrefilterValid and canProceedToStep3; the "any item" default is valid when bookable items exist - Remove unused store refs and UI flags from useBookingValidation Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #34 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196453 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196453&action=edit Bug 41129: Fix booking modal reopen race and add regression test Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #35 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196454 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196454&action=edit Bug 41129: (follow-up) Migrate staff booking adapter to API clients - Create BiblioAPIClient for biblio sub-resource endpoints (items, bookings, checkouts, pickup_locations) - Create BookingAPIClient for bookings CRUD (create, update) - Create LibraryAPIClient for library holidays endpoint - Create CirculationRulesAPIClient for circulation rules endpoint - Extend PatronAPIClient with headers support on get and new search method for paginated patron lookup - Register all new clients in both API client registries (lazy-loaded main and eager Vue) - Rewrite staff-interface.js adapter to use API clients instead of raw fetch() calls - Keep domain validation (bookingValidation) in adapter layer - OPAC adapter left as-is (uses public endpoints, mostly stubs) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #36 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196455&action=edit Bug 41129: (follow-up) Use inject() for store access in island - Switch BookingModal.vue from useBookingStore() direct import to inject("bookings") for store access - Aligns with the pattern used by other island components (VendorMenu, AcquisitionsMenu) which receive stores via app.provide() in the island hydration - Child components keep useBookingStore() as Pinia is installed on the app via app.use(pinia) in islands.ts Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #37 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196456&action=edit Bug 41129: (follow-up) Use insertSamplePatron task in Cypress tests - Replace raw SQL INSERT INTO borrowers with the standard insertSamplePatron Cypress task across all 3 booking specs - Remove manual DELETE FROM borrowers cleanup blocks - Let deleteSampleObjects handle patron cleanup in correct dependency order (patrons before libraries), fixing the FK constraint error on test teardown - Inline patron creation in long tests also migrated to insertSamplePatron with deleteSampleObjects cleanup Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #38 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196457&action=edit Bug 41129: (follow-up) Fix incorrect and redundant documentation - Fix module doc: interval tree uses AVL balancing, not red-black - Fix JSDoc: calculateAvailabilityData accepts arrays, not strings - Fix JSDoc: fetchPatron takes patronId, not search term - Fix JSDoc: useAvailability does not return unavailableByDateRef - Fix JSDoc: opac fetchPickupLocations missing @param for patronId - Fix JSDoc: strategies validateStartDateSelection returns boolean indicating blocked (true) or allowed (false) - Fix JSDoc: replace non-standard @exported tag with @public - Fix comment: BookingDate.isBetween plugin is not loaded - Fix comment: lead period applies to all bookings, not "first" - Fix comment: handleBookingDateChange is a pure validation function, not a Flatpickr event handler - Add missing JSDoc on CONSTRAINT_MODE_NORMAL constant - Add stub JSDoc on opac createBooking/updateBooking - Remove stale historical note from conflict-resolution module doc - Remove off-by-one counting comment that mixed conventions - Remove redundant inline comments that restate code Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #39 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196458&action=edit Bug 41129: (follow-up) Disable OPAC island build output - Set OPAC islands rspack entry to empty object to prevent bundle emission while preserving the config for future use - OPAC booking UI is not part of this patchset Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #40 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196946 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196946&action=edit Bug 41129: (follow-up) Adapt to holidays â closed_dates endpoint rename - Update LibraryAPIClient method and endpoint path from /holidays to /closed_dates - Update staff-interface adapter to call closed_dates() - Follows Bug 42206 follow-up which renamed the endpoint for consistency with existing sub-resource naming conventions Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #41 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196947&action=edit Bug 41129: (follow-up) Fix Cypress test cleanup and race conditions - Add booking type to deleteSampleObjects with correct deletion order to prevent FK constraint failures - Track bookings and extra patrons in testData so afterEach cleanup handles them even when tests fail early - Wait for patron API response before asserting vue-select pre-population to fix timing-dependent failures - Remove manual in-test cleanup that was unreachable on failure Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196449|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196450|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196451|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196452|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196453|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196454|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196455|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196456|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196457|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196458|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196946|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196947|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #42 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 199038 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199038&action=edit Bug 41129: Add API clients for booking-related endpoints - Add BiblioAPIClient for biblio sub-resources (items, bookings, checkouts, pickup_locations) - Add BookingAPIClient for bookings CRUD (create, update) - Add LibraryAPIClient for /libraries/{id}/closed_dates - Add CirculationRulesAPIClient for circulation rules lookup - Extend PatronAPIClient with a search() method for paginated patron lookup and accept optional headers on get() - Register the new clients in fetch/api-client.js (lazy) and vue/fetch/api-client.js (eager) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #43 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 199039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199039&action=edit Bug 41129: Add booking domain library and shared utilities - Add lib/booking/BookingDate.mjs (immutable, timezone-aware date wrapper) - Add lib/booking/availability/ (date-change, disabled-dates, index, period-validators, rules, unavailable-map) and the outer lib/booking/availability.mjs barrel - Add lib/booking/algorithms/ (interval-tree, sweep-line-processor) for efficient overlap detection and unavailability computation - Add lib/booking/ logic modules (conflict-resolution, constants, constraints, id-utils, logger, markers, strategies, validation, validation-messages) - Add lib/adapters/api/staff-interface.js and api/opac.js for the per-environment API surface, plus lib/adapters/{form, patron, globals, external-dependents}.mjs for the DOM/legacy shims - Add lib/ui/ helpers (hover-feedback, marker-labels, selection-message, steps) - Add types/ (bookings.d.ts, dayjs-plugins.d.ts, vue-shims.d.ts) and a Bookings-scoped tsconfig.json with allowJs / skipLibCheck and the @koha-vue path alias so vue-tsc reads JSDoc on the .mjs files directly - Add vue/utils/apiErrors.js, validationErrors.js, dayjs.mjs and functions.mjs (shared across the module) - Add Cypress component specs under t/cypress/component/lib/booking/ for createDisableFunction, findFirstBlockingDate, IntervalTree and buildIntervalTree, buildUnavailableByDateMap with addHolidayMarkers, the period validators (calculateMaxEndDate, lead/trail/range-overlap, getAvailableItemsForPeriod), and the rules helpers (calculateMaxBookingPeriod, deriveEffectiveRules, extractBookingConfiguration); pure-function tests with no Vue mount so an algorithmic regression points here directly instead of cascading through the picker DOM Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #44 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 199040 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199040&action=edit Bug 41129: Add BaseFlatpickr wrapper and booking calendar composable - Add BaseFlatpickr.vue, a domain-agnostic Vue 3 flatpickr wrapper that handles single/range/end-date-only modes, soft and hard severity disabling, range preview, viewport tracking, Koha- configured display format detection, and dynamic l10n bundle loading for the current HTML lang; exposes clear, setDate, instance, and inputElement via defineExpose - Add useBookingCalendarMaps composable that translates booking- domain refs (bookings, checkouts, item, period, rules) into the disabledFn / disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes maps the wrapper consumes, clamping the constrained range with findFirstBlockingDate - Add the BaseFlatpickr component spec covering single, range, end-date-only, hover preview, anchor-aware highlighting, hard and soft disabling, markers and custom markerRenderer, classByDate, external value, viewport, ready-event payload, and the exposed surface - Add the useBookingCalendarMaps component spec using a renderless ComposableHost that exposes the composable's outputs for direct inspection of disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes / end-date-only behavior, plus three DOM smoke tests against BaseFlatpickr confirming the outputs still slot into the picker's prop contract - Add Cypress support helpers: component.ts (dayjs global, String format shim, console-hooks wiring), console-hooks.js (shared console.warn-throws guard preserving Error stack/message across the cross-realm boundary), vue-select.js (component test helpers) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #45 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 199041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199041&action=edit Bug 41129: Add Vue booking modal, Pinia store, and island wiring - Add BookingModal.vue (<script setup lang="ts">) orchestrating the multi-step form, plus the step components (BookingPatronStep, BookingDetailsStep, BookingPeriodStep) and BookingTooltip - Add PatronSearchSelect.vue and KohaAlert.vue shared components - Add the setup-style Pinia store under stores/bookings/, sectioned by responsibility along a one-way dep chain (status → data → draft → availability → validation) with an effects section for cross-cutting reactive bridges and an utils/withErrorHandling HOF wrapping per-action loading/error - Add modals/booking/island.inc and the two trigger snippets (button-place.inc, button-edit.inc); wire them into cat-toolbar.inc, bookings/list.tt, and the six catalogue detail views; drop the legacy modals/place_booking.inc - Pass js-date-format.inc through unchanged for the new modal - Add the booking-modal-island entry to rspack.config.js - Add ambient.d.ts for *.css / bootstrap / vue-select shims and configure tsconfig.json: @koha-vue alias, allowJs for JSDoc-typed .mjs flow into TS SFCs, narrow per-feature include scoped to the booking subtree, plus target/lib/module/noEmit/types: [] so tsc runs clean - Hydrate the island via vue/modules/islands.ts, providing the Pinia store under "bookings" for inject() consumption - Add Cypress integration coverage in bookingsModalBasic / bookingsModalDatePicker / bookingsModalTimezone, the BookingPeriodStep component spec, plus support/e2e and support/flatpickr adjustments and the insertData.js helpers Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' - yarn cypress run --component --spec 't/cypress/component/**/*_spec.ts' (covers BaseFlatpickr, useBookingCalendarMaps, BookingPeriodStep and the lib/booking pure-function specs) Test environment setup (preconditions for the manual steps below; cypress sets up its own data and does not need these): Bookable inventory: - Administration > Item types: mark at least one item type as "Bookable" (or use the per-item "Bookable" toggle on the item edit page) - Have a biblio with multiple bookable copies of that item type so the multi-item / item-selection / capacity flows are exercisable Circulation rules (Administration > Circulation and fines rules, applied to the library + item type scope you will test against or to the wildcard row): - bookings_lead_period: non-zero (e.g. 2) so steps 18 and 25 have a lead-time constraint to validate and the hover feedback emits lead-specific messages - bookings_trail_period: non-zero (e.g. 2) so step 18 has a trail buffer to validate - issuelength: a finite value (e.g. 7) so a maxPeriod is derivable and step 19 has a max-booking-period to enforce in the "issuelength" constraint mode - renewalsallowed + renewalperiod: non-zero values to exercise the "issuelength_with_renewals" constraint mode Calendar / holidays: - Tools > Calendar: add at least one closed day inside the visible calendar range for the pickup library so step 15 has a holiday to render (and the hover-feedback "library closed" path runs) Existing data on the test biblio: - Place one booking ahead of time so step 15 has a conflict to render, step 18 exercises lead/trail markers next to a real booking, and the edit flow (steps 33-38) has something to edit - Check out a bookable copy with a due date inside the visible calendar range so the picker shows a checkout interval and the checkout-vs-booking lead handling (Koha::Item->find_booking) participates 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #46 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 199042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199042&action=edit Bug 41129: [DO NOT PUSH] Add dev SQL seed for manual test setup - Marks itemtype BK bookable - Sets bookings_lead_period (2), bookings_trail_period (2), issuelength (7), renewalsallowed (2), renewalperiod (7) at the wildcard circulation_rules scope - Adds a closed day at CPL ten days out for holiday rendering - Idempotent via ON DUPLICATE KEY UPDATE / NOT EXISTS guards; run with: koha-mysql kohadev < bug_41129_seed.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #47 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 199423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199423&action=edit Bug 41129: (follow-up) Fall back to setTimeout when requestIdleCallback is missing - Vue island hydration called window.requestIdleCallback directly, which throws TypeError on iOS Safari < 17.4 and prevents the booking-modal-island custom element from being defined; trigger buttons then silently set a property on a plain HTMLElement - Add a module-level scheduleIdle shim that uses requestIdleCallback when available and falls back to setTimeout(cb, 1) otherwise; the hydrate callback never reads the idle deadline, so the fallback is behaviour-equivalent on engines lacking native support Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199038|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199039|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199040|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199041|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199042|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199423|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #48 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 200580 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200580&action=edit Bug 41129: Add API clients for booking-related endpoints - Add BiblioAPIClient for biblio sub-resources (items, bookings, checkouts, pickup_locations) - Add BookingAPIClient for bookings CRUD (create, update) - Add LibraryAPIClient for /libraries/{id}/closed_dates - Add CirculationRulesAPIClient for circulation rules lookup - Extend PatronAPIClient with a search() method for paginated patron lookup and accept optional headers on get() - Register the new clients in fetch/api-client.js (lazy) and vue/fetch/api-client.js (eager) Test plan: 1. Apply the full series and run: yarn js:build 2. The clients carry no UI of their own; they are exercised end-to-end by the Cypress suites added with the booking modal patch later in this series: npx cypress run --browser electron \ --spec 't/cypress/integration/Circulation/bookingsModalBasic_spec.ts' 3. Regression-check an existing consumer of the shared api-client registries, e.g. open the ERM module and confirm its tables still load Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #49 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 200581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200581&action=edit Bug 41129: Add booking domain library and shared utilities - Add lib/booking/BookingDate.js (immutable, timezone-aware date wrapper) - Add lib/booking/availability/ (date-change, disabled-dates, period-validators, rules, unavailable-map) and the outer lib/booking/availability.js barrel - Add lib/booking/algorithms/ (interval-tree, sweep-line-processor) for efficient overlap detection and unavailability computation - Add lib/booking/ logic modules (conflict-resolution, constants, constraints, id-utils, markers, strategies, validation, validation-messages) - Add lib/adapters/api/staff-interface.js and api/opac.js for the per-environment API surface, plus lib/adapters/{form, patron, globals, external-dependents}.js for the DOM/legacy shims - Add lib/ui/ helpers (hover-feedback, marker-labels, selection-message, steps) - Add types/ (bookings.d.ts, dayjs-plugins.d.ts, vue-shims.d.ts) and a Bookings-scoped tsconfig.json with allowJs / skipLibCheck and the @koha-vue path alias so vue-tsc reads JSDoc on the .js files directly - Add vue/utils/apiErrors.js, validationErrors.js, dayjs.js and functions.js (shared across the module) - Add Cypress component specs under t/cypress/component/lib/booking/ for createDisableFunction, findFirstBlockingDate, IntervalTree and buildIntervalTree, buildUnavailableByDateMap with addHolidayMarkers, the period validators (calculateMaxEndDate, lead/trail/range-overlap, getAvailableItemsForPeriod), and the rules helpers (calculateMaxBookingPeriod, deriveEffectiveRules, extractBookingConfiguration); pure-function tests with no Vue mount so an algorithmic regression points here directly instead of cascading through the picker DOM Test plan: 1. Run the pure-function component suites covering this library: npx cypress run --component --browser electron \ --spec 't/cypress/component/lib/booking/**/*_spec.ts' 2. Nothing is wired into a page yet; the booking modal patch later in this series exercises the library end-to-end (see its test plan) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #50 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 200582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200582&action=edit Bug 41129: Add BookingFlatpickr wrapper and booking calendar composable - Add BookingFlatpickr.vue, a Vue 3 flatpickr wrapper that handles single/range/end-date-only modes, soft and hard severity disabling, range preview, viewport tracking, Koha- configured display format detection, and dynamic l10n bundle loading for the current HTML lang; exposes clear, setDate, instance, and inputElement via defineExpose - Do not reuse the existing components/FlatPickrWrapper.vue: it is a thin shell over the global flatpickr_defaults (calendar.inc) wired in dynamically by the form framework (base-element.js) and offers no hook for per-day disabling/markers, range preview, or viewport tracking, plus a string (not Date) value model; extending it would couple that shared form-widget to booking concerns - Add useBookingCalendarMaps composable that translates booking- domain refs (bookings, checkouts, item, period, rules) into the disabledFn / disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes maps the wrapper consumes, clamping the constrained range with findFirstBlockingDate - Add the BookingFlatpickr component spec covering single, range, end-date-only, hover preview, anchor-aware highlighting, hard and soft disabling, markers and custom markerRenderer, classByDate, external value, viewport, ready-event payload, and the exposed surface - Add the useBookingCalendarMaps component spec using a renderless ComposableHost that exposes the composable's outputs for direct inspection of disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes / end-date-only behavior, plus three DOM smoke tests against BookingFlatpickr confirming the outputs still slot into the picker's prop contract - Add Cypress support helpers: component.ts (dayjs global, String format shim, console-hooks wiring), console-hooks.js (shared console.warn-throws guard preserving Error stack/message across the cross-realm boundary), vue-select.js (component test helpers) Test plan: 1. Run the component suites added here: npx cypress run --component --browser electron \ --spec 't/cypress/component/BookingFlatpickr_spec.ts,t/cypress/component/useBookingCalendarMaps_spec.ts' 2. The wrapper is not mounted on any staff page until the booking modal patch; manual calendar coverage is part of that patch's test plan (steps 14-20 and 39-41) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #51 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 200583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200583&action=edit Bug 41129: Add Vue booking modal, Pinia store, and island wiring - Add BookingModal.vue (<script setup lang="ts">) orchestrating the multi-step form, plus the step components (BookingPatronStep, BookingDetailsStep, BookingPeriodStep) and BookingTooltip - Add PatronSearchSelect.vue and KohaAlert.vue shared components - Add the setup-style Pinia store under stores/bookings/, sectioned by responsibility along a one-way dep chain (status → data → draft → availability → validation) with an effects section for cross-cutting reactive bridges and an utils/withErrorHandling HOF wrapping per-action loading - Add modals/booking/island.inc and the button-place.inc trigger snippet and wire them into cat-toolbar.inc; point the bookings/list.tt edit buttons and timeline at the island (data-booking-modal / window.openBookingModal); drop the legacy modals/place_booking.inc, js/modals/place_booking.js, and the asset include lines in the six catalogue detail views - Pass js-date-format.inc through unchanged for the new modal - Add the booking-modal-island entry to rspack.config.js - Add ambient.d.ts for *.css / bootstrap / vue-select shims and configure tsconfig.json: @koha-vue alias, allowJs for JSDoc-typed .js flow into TS SFCs, narrow per-feature include scoped to the booking subtree, plus target/lib/module/noEmit/types: [] so tsc runs clean - Hydrate the island via vue/modules/islands.ts, providing the Pinia store under "bookingStore" for inject() consumption - Add Cypress integration coverage in bookingsModalBasic / bookingsModalDatePicker / bookingsModalTimezone, the BookingPeriodStep and bookings-store effects component specs, plus support/e2e and support/flatpickr adjustments and the insertData.js helpers Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' - yarn cypress run --component --spec 't/cypress/component/**/*_spec.ts' (covers BookingFlatpickr, useBookingCalendarMaps, BookingPeriodStep and the lib/booking pure-function specs) Test environment setup (preconditions for the manual steps below; cypress sets up its own data and does not need these): Bookable inventory: - Administration > Item types: mark at least one item type as "Bookable" (or use the per-item "Bookable" toggle on the item edit page) - Have a biblio with multiple bookable copies of that item type so the multi-item / item-selection / capacity flows are exercisable Circulation rules (Administration > Circulation and fines rules, applied to the library + item type scope you will test against or to the wildcard row): - bookings_lead_period: non-zero (e.g. 2) so steps 18 and 25 have a lead-time constraint to validate and the hover feedback emits lead-specific messages - bookings_trail_period: non-zero (e.g. 2) so step 18 has a trail buffer to validate - issuelength: a finite value (e.g. 7) so a maxPeriod is derivable and step 19 has a max-booking-period to enforce in the "issuelength" constraint mode - renewalsallowed + renewalperiod: non-zero values to exercise the "issuelength_with_renewals" constraint mode Calendar / holidays: - Tools > Calendar: add at least one closed day inside the visible calendar range for the pickup library so step 15 has a holiday to render (and the hover-feedback "library closed" path runs) Existing data on the test biblio: - Place one booking ahead of time so step 15 has a conflict to render, step 18 exercises lead/trail markers next to a real booking, and the edit flow (steps 33-38) has something to edit - Check out a bookable copy with a due date inside the visible calendar range so the picker shows a checkout interval and the checkout-vs-booking lead handling (Koha::Item->find_booking) participates 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly AI/LLM usage: The architecture and design here are my own, refined by hand over a long stretch that began with a manual refactor of place_booking.js. I used AI/LLM assistants throughout to help port the original plain JavaScript to Vue, write boilerplate, and draft and refactor parts of the implementation and tests, and I reviewed, corrected, and integrated everything they produced. This spanned the past year and a succession of models: Anthropic's Opus 4.5 through 4.8 and Fable 5, and OpenAI's GPT-5 to 5.2; the trailer records Opus 4.8, used most recently. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #52 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 200584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200584&action=edit Bug 41129: (follow-up) Fall back to setTimeout when requestIdleCallback is missing - Vue island hydration called window.requestIdleCallback directly, which throws TypeError on iOS Safari < 17.4 and prevents the booking-modal-island custom element from being defined; trigger buttons then silently set a property on a plain HTMLElement - Add a module-level scheduleIdle shim that uses requestIdleCallback when available and falls back to setTimeout(cb, 1) otherwise; the hydrate callback never reads the idle deadline, so the fallback is behaviour-equivalent on engines lacking native support Test plan: 1. yarn js:build 2. Regression (requestIdleCallback present): open a staff catalogue detail page for a biblio with bookable items and confirm "Place booking" still opens the modal 3. Fallback (requestIdleCallback missing): test on iOS Safari < 17.4, or emulate it by injecting `delete window.requestIdleCallback;` as the first inline script of the page (e.g. via DevTools local overrides), reload, and confirm the island still hydrates and the button still opens the modal Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #53 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 200585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200585&action=edit Bug 41129: [DO NOT PUSH] Add dev SQL seed for manual test setup - Marks itemtype BK bookable - Sets bookings_lead_period (2), bookings_trail_period (2), issuelength (7), renewalsallowed (2), renewalperiod (7) at the wildcard circulation_rules scope - Adds a closed day at CPL ten days out for holiday rendering - Idempotent via ON DUPLICATE KEY UPDATE / NOT EXISTS guards; run with: koha-mysql kohadev < bug_41129_seed.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/>, |<https://www.bz-sh.de/>, |Büchereizentrale |Büchereizentrale |Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #54 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Hi all, I further stripped things out of the patch set that are currently not needed for the scope of this bug to reduce the review surface. The Bookings dir within the Vue directory is still a bit of code to read but nowhere near what it was a few rounds ago. The store methods should be also relatively easy to follow since I grouped and order them a while back. I am aware that some of this is breaking/extending existing Koha conventions, but just throwing everything into a single giant wall of JS makes maintaining this code a nightmare. That's why I split it aggressively. Also added LLM-use notes which got a little convoluted since so many models were used over time, opted for the model in the trailer that last touched the commits and mentioned the rest in the big feature commit in comment #51. As stated, the architecture is my design, so please feel free to tell me where you think it is bad, or where we should align with existing Koha/Vue-patterns more. It's not any LLMs fault :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Initiative type|--- |Epic Strategic theme|--- |Modernisation Target Milestone|--- |26.11 Blocks| |42959 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42959 [Bug 42959] Migrate staff interface functionality from CGI controller + Template Toolkit to REST API + Vue.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Bug 41129 depends on bug 42206, which changed state. Bug 42206 Summary: Add REST endpoint GET /libraries/{library_id}/closed_dates https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42206 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/>, |<https://www.bz-sh.de/>, |Büchereizentrale |Büchereizentrale |Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200580|0 |1 is obsolete| | Attachment #200581|0 |1 is obsolete| | Attachment #200582|0 |1 is obsolete| | Attachment #200583|0 |1 is obsolete| | Attachment #200584|0 |1 is obsolete| | Attachment #200585|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #55 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 201572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201572&action=edit Bug 41129: Add booking domain library and shared utilities - Add lib/booking/BookingDate.js (immutable, timezone-aware date wrapper) - Add lib/booking/availability/ (date-change, disabled-dates, period-validators, rules, unavailable-map) and the outer lib/booking/availability.js barrel - Add lib/booking/algorithms/ (interval-tree, sweep-line-processor) for efficient overlap detection and unavailability computation - Add lib/booking/ logic modules (conflict-resolution, constants, constraints, id-utils, markers, strategies, validation, validation-messages) - Add lib/adapters/api/staff-interface.js and api/opac.js for the per-environment API surface, plus lib/adapters/{form, patron, globals, external-dependents}.js for the DOM/legacy shims - Add lib/ui/ helpers (hover-feedback, marker-labels, selection-message, steps) - Add types/ (bookings.d.ts, dayjs-plugins.d.ts, vue-shims.d.ts) and a Bookings-scoped tsconfig.json with allowJs / skipLibCheck and the @koha-vue path alias so vue-tsc reads JSDoc on the .js files directly - Add vue/utils/apiErrors.js, validationErrors.js, dayjs.js and functions.js (shared across the module) - Add Cypress component specs under t/cypress/component/lib/booking/ for createDisableFunction, findFirstBlockingDate, IntervalTree and buildIntervalTree, buildUnavailableByDateMap with addHolidayMarkers, the period validators (calculateMaxEndDate, lead/trail/range-overlap, getAvailableItemsForPeriod), and the rules helpers (calculateMaxBookingPeriod, deriveEffectiveRules, extractBookingConfiguration), the constraint cross-filters (constrainPickupLocations / constrainBookableItems / constrainItemTypes), and the UTC day-boundary contract helpers (toUTCStartOfDayISO / toUTCEndOfDayISO / utcDatePart); pure-function tests with no Vue mount so an algorithmic regression points here directly instead of cascading through the picker DOM Test plan: 1. Run the pure-function component suites covering this library: npx cypress run --component --browser electron \ --spec 't/cypress/component/lib/booking/**/*_spec.ts' 2. Nothing is wired into a page yet; the booking modal patch later in this series exercises the library end-to-end (see its test plan) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #56 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 201573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201573&action=edit Bug 41129: Add API clients for booking-related endpoints - Add BiblioAPIClient for biblio sub-resources (items, bookings, checkouts, pickup_locations) - Add BookingAPIClient for bookings CRUD (create, update) - Add LibraryAPIClient for /libraries/{id}/closed_dates - Add CirculationRulesAPIClient for circulation rules lookup - Extend PatronAPIClient with a search() method for paginated patron lookup and accept optional headers on get() - Register the new clients in fetch/api-client.js (lazy) and vue/fetch/api-client.js (eager) Test plan: 1. Apply the full series and run: yarn js:build 2. The clients carry no UI of their own; they are exercised end-to-end by the Cypress suites added with the booking modal patch later in this series: npx cypress run --browser electron \ --spec 't/cypress/integration/Circulation/bookingsModalBasic_spec.ts' 3. Regression-check an existing consumer of the shared api-client registries, e.g. open the ERM module and confirm its tables still load Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #57 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 201574 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201574&action=edit Bug 41129: Add BookingFlatpickr wrapper and booking calendar composable - Add BookingFlatpickr.vue, a Vue 3 flatpickr wrapper that handles single/range/end-date-only modes, soft and hard severity disabling, range preview, viewport tracking, Koha- configured display format detection, and dynamic l10n bundle loading for the current HTML lang; exposes clear, setDate, instance, and inputElement via defineExpose - Do not reuse the existing components/FlatPickrWrapper.vue: it is a thin shell over the global flatpickr_defaults (calendar.inc) wired in dynamically by the form framework (base-element.js) and offers no hook for per-day disabling/markers, range preview, or viewport tracking, plus a string (not Date) value model; extending it would couple that shared form-widget to booking concerns - Add useBookingCalendarMaps composable that translates booking- domain refs (bookings, checkouts, item, period, rules) into the disabledFn / disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes maps the wrapper consumes, clamping the constrained range with findFirstBlockingDate - Add the BookingFlatpickr component spec covering single, range, end-date-only, hover preview, anchor-aware highlighting, hard and soft disabling, markers and custom markerRenderer, classByDate, external value, viewport, ready-event payload, and the exposed surface - Add the useBookingCalendarMaps component spec using a renderless ComposableHost that exposes the composable's outputs for direct inspection of disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes / end-date-only behavior, plus three DOM smoke tests against BookingFlatpickr confirming the outputs still slot into the picker's prop contract - Add Cypress support helpers: component.ts (dayjs global, String format shim, console-hooks wiring), console-hooks.js (shared console.warn-throws guard preserving Error stack/message across the cross-realm boundary), vue-select.js (component test helpers) Test plan: 1. Run the component suites added here: npx cypress run --component --browser electron \ --spec 't/cypress/component/BookingFlatpickr_spec.ts,t/cypress/component/useBookingCalendarMaps_spec.ts' 2. The wrapper is not mounted on any staff page until the booking modal patch; manual calendar coverage is part of that patch's test plan (steps 14-20 and 39-41) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #58 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 201575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201575&action=edit Bug 41129: Add Vue booking modal, Pinia store, and island wiring - Add BookingModal.vue (<script setup lang="ts">) orchestrating the multi-step form, plus the step components (BookingPatronStep, BookingDetailsStep, BookingPeriodStep) and BookingTooltip - Add PatronSearchSelect.vue and KohaAlert.vue shared components - Add the setup-style Pinia store under stores/bookings/, sectioned by responsibility along a one-way dep chain (status → data → draft → availability → validation) with an effects section for cross-cutting reactive bridges and an utils/withErrorHandling HOF wrapping per-action loading - Add modals/booking/island.inc and the button-place.inc trigger snippet and wire them into cat-toolbar.inc; point the bookings/list.tt edit buttons and timeline at the island (data-booking-modal / window.openBookingModal); drop the legacy modals/place_booking.inc, js/modals/place_booking.js, its calendar styles in staff-global.scss, and the asset include lines in the six catalogue detail views - Pass js-date-format.inc through unchanged for the new modal - Add the booking-modal-island entry to rspack.config.js - Add ambient.d.ts for *.css / bootstrap / vue-select shims and configure tsconfig.json: @koha-vue alias, allowJs for JSDoc-typed .js flow into TS SFCs, narrow per-feature include scoped to the booking subtree, plus target/lib/module/noEmit/types: [] so tsc runs clean - Hydrate the island via vue/modules/islands.ts, providing the Pinia store under "bookingStore" for inject() consumption - Add Cypress integration coverage in bookingsModalBasic / bookingsModalDatePicker / bookingsModalTimezone, the BookingPeriodStep and bookings-store effects and validation component specs, plus support/e2e and support/flatpickr adjustments and the insertData.js helpers Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' - yarn cypress run --component --spec 't/cypress/component/**/*_spec.ts' (covers BookingFlatpickr, useBookingCalendarMaps, BookingPeriodStep and the lib/booking pure-function specs) Test environment setup (preconditions for the manual steps below; cypress sets up its own data and does not need these): Bookable inventory: - Administration > Item types: mark at least one item type as "Bookable" (or use the per-item "Bookable" toggle on the item edit page) - Have a biblio with multiple bookable copies of that item type so the multi-item / item-selection / capacity flows are exercisable Circulation rules (Administration > Circulation and fines rules, applied to the library + item type scope you will test against or to the wildcard row): - bookings_lead_period: non-zero (e.g. 2) so steps 18 and 25 have a lead-time constraint to validate and the hover feedback emits lead-specific messages - bookings_trail_period: non-zero (e.g. 2) so step 18 has a trail buffer to validate - issuelength: a finite value (e.g. 7) so a maxPeriod is derivable and step 19 has a max-booking-period to enforce in the "issuelength" constraint mode - renewalsallowed + renewalperiod: non-zero values to exercise the "issuelength_with_renewals" constraint mode Calendar / holidays: - Tools > Calendar: add at least one closed day inside the visible calendar range for the pickup library so step 15 has a holiday to render (and the hover-feedback "library closed" path runs) Existing data on the test biblio: - Place one booking ahead of time so step 15 has a conflict to render, step 18 exercises lead/trail markers next to a real booking, and the edit flow (steps 33-38) has something to edit - Check out a bookable copy with a due date inside the visible calendar range so the picker shows a checkout interval and the checkout-vs-booking lead handling (Koha::Item->find_booking) participates 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly AI/LLM usage: The architecture and design here are my own, refined by hand over a long stretch that began with a manual refactor of place_booking.js. I used AI/LLM assistants throughout to help port the original plain JavaScript to Vue, write boilerplate, and draft and refactor parts of the implementation and tests, and I reviewed, corrected, and integrated everything they produced. This spanned the past year and a succession of models: Anthropic's Opus 4.5 through 4.8 and Fable 5, and OpenAI's GPT-5 to 5.2; the trailer records Opus 4.8, used most recently. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #59 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 201576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201576&action=edit Bug 41129: (follow-up) Fall back to setTimeout when requestIdleCallback is missing - Vue island hydration called window.requestIdleCallback directly, which throws TypeError on iOS Safari < 17.4 and prevents the booking-modal-island custom element from being defined; trigger buttons then silently set a property on a plain HTMLElement - Add a module-level scheduleIdle shim that uses requestIdleCallback when available and falls back to setTimeout(cb, 1) otherwise; the hydrate callback never reads the idle deadline, so the fallback is behaviour-equivalent on engines lacking native support Test plan: 1. yarn js:build 2. Regression (requestIdleCallback present): open a staff catalogue detail page for a biblio with bookable items and confirm "Place booking" still opens the modal 3. Fallback (requestIdleCallback missing): test on iOS Safari < 17.4, or emulate it by injecting `delete window.requestIdleCallback;` as the first inline script of the page (e.g. via DevTools local overrides), reload, and confirm the island still hydrates and the button still opens the modal Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #60 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 201577 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201577&action=edit Bug 41129: [DO NOT PUSH] Add dev SQL seed for manual test setup - Marks itemtype BK bookable - Sets bookings_lead_period (2), bookings_trail_period (2), issuelength (7), renewalsallowed (2), renewalperiod (7) at the wildcard circulation_rules scope - Adds a closed day at CPL ten days out for holiday rendering - Idempotent via ON DUPLICATE KEY UPDATE / NOT EXISTS guards; run with: koha-mysql kohadev < bug_41129_seed.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #61 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Rebased on top of Bug 42862. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43091 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43091 [Bug 43091] Staff-only Vue island chunks are emitted into the OPAC dist directory -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43108 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43108 [Bug 43108] Add a REST API endpoint for a biblio's booking availability over a date range -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201572|0 |1 is obsolete| | Attachment #201573|0 |1 is obsolete| | Attachment #201574|0 |1 is obsolete| | Attachment #201575|0 |1 is obsolete| | Attachment #201576|0 |1 is obsolete| | Attachment #201577|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #62 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202173&action=edit Bug 41129: Add booking domain library and shared utilities - Add lib/booking/BookingDate.js (immutable, timezone-aware date wrapper) - Add lib/booking/availability/ (date-change, disabled-dates, period-validators, rules, unavailable-map) and the outer lib/booking/availability.js barrel - Add lib/booking/algorithms/ (interval-tree, sweep-line-processor) for efficient overlap detection and unavailability computation - Add lib/booking/ logic modules (conflict-resolution, constants, constraints, id-utils, markers, strategies, validation, validation-messages) - Add lib/adapters/api/staff-interface.js and api/opac.js for the per-environment API surface, plus lib/adapters/{form, patron, globals, external-dependents}.js for the DOM/legacy shims - Add lib/ui/ helpers (hover-feedback, marker-labels, selection-message, steps) - Add types/ (bookings.d.ts, dayjs-plugins.d.ts, vue-shims.d.ts) and a Bookings-scoped tsconfig.json with allowJs / skipLibCheck and the @koha-vue path alias so vue-tsc reads JSDoc on the .js files directly - Add vue/utils/apiErrors.js, validationErrors.js, dayjs.js and functions.js (shared across the module) - Add Cypress component specs under t/cypress/component/lib/booking/ for createDisableFunction, findFirstBlockingDate, IntervalTree and buildIntervalTree, buildUnavailableByDateMap with addHolidayMarkers, the period validators (calculateMaxEndDate, lead/trail/range-overlap, getAvailableItemsForPeriod), and the rules helpers (calculateMaxBookingPeriod, deriveEffectiveRules, extractBookingConfiguration), the constraint cross-filters (constrainPickupLocations / constrainBookableItems / constrainItemTypes), and the UTC day-boundary contract helpers (toUTCStartOfDayISO / toUTCEndOfDayISO / utcDatePart); pure-function tests with no Vue mount so an algorithmic regression points here directly instead of cascading through the picker DOM Test plan: 1. Run the pure-function component suites covering this library: yarn cypress run --component --browser electron \ --spec 't/cypress/component/lib/booking/**/*_spec.ts' 2. Nothing is wired into a page yet; the booking modal patch later in this series exercises the library end-to-end (see its test plan) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #63 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202174&action=edit Bug 41129: Add API clients for booking-related endpoints - Add BiblioAPIClient for biblio sub-resources (items, bookings, checkouts, pickup_locations) - Add BookingAPIClient for bookings CRUD (create, update) - Add LibraryAPIClient for /libraries/{id}/closed_dates - Add CirculationRulesAPIClient for circulation rules lookup - Extend PatronAPIClient with a search() method for paginated patron lookup and accept optional headers on get() - Register the new clients in fetch/api-client.js (lazy) and vue/fetch/api-client.js (eager) Test plan: 1. Apply the full series and run: yarn js:build 2. The clients carry no UI of their own; they are exercised end-to-end by the Cypress suites added with the booking modal patch later in this series: yarn cypress run --browser electron \ --spec 't/cypress/integration/Circulation/bookingsModalBasic_spec.ts' 3. Regression-check an existing consumer of the shared api-client registries, e.g. open the ERM module and confirm its tables still load Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #64 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202175&action=edit Bug 41129: Add BookingFlatpickr wrapper and booking calendar composable - Add BookingFlatpickr.vue, a Vue 3 flatpickr wrapper that handles single/range/end-date-only modes, soft and hard severity disabling, range preview, viewport tracking, Koha- configured display format detection, and dynamic l10n bundle loading for the current HTML lang; exposes clear, setDate, instance, and inputElement via defineExpose - Do not reuse the existing components/FlatPickrWrapper.vue: it is a thin shell over the global flatpickr_defaults (calendar.inc) wired in dynamically by the form framework (base-element.js) and offers no hook for per-day disabling/markers, range preview, or viewport tracking, plus a string (not Date) value model; extending it would couple that shared form-widget to booking concerns - Add useBookingCalendarMaps composable that translates booking- domain refs (bookings, checkouts, item, period, rules) into the disabledFn / disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes maps the wrapper consumes, clamping the constrained range with findFirstBlockingDate - Add the BookingFlatpickr component spec covering single, range, end-date-only, hover preview, anchor-aware highlighting, hard and soft disabling, markers and custom markerRenderer, classByDate, external value, viewport, ready-event payload, and the exposed surface - Add the useBookingCalendarMaps component spec using a renderless ComposableHost that exposes the composable's outputs for direct inspection of disabledByDate / markersByDate / classByDate / rangePreviewFn / loanBoundaryTimes / end-date-only behavior, plus three DOM smoke tests against BookingFlatpickr confirming the outputs still slot into the picker's prop contract - Add Cypress support helpers: component.ts (dayjs global, String format shim, console-hooks wiring), console-hooks.js (shared console.warn-throws guard preserving Error stack/message across the cross-realm boundary), vue-select.js (component test helpers) Test plan: 1. Run the component suites added here: yarn cypress run --component --browser electron \ --spec 't/cypress/component/BookingFlatpickr_spec.ts,t/cypress/component/useBookingCalendarMaps_spec.ts' 2. The wrapper is not mounted on any staff page until the booking modal patch; manual calendar coverage is part of that patch's test plan (steps 14-20 and 39-41) Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #65 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202176&action=edit Bug 41129: Add Vue booking modal, Pinia store, and island wiring - Add BookingModal.vue (<script setup lang="ts">) orchestrating the multi-step form, plus the step components (BookingPatronStep, BookingDetailsStep, BookingPeriodStep) and BookingTooltip - Add PatronSearchSelect.vue and KohaAlert.vue shared components - Add the setup-style Pinia store under stores/bookings/, sectioned by responsibility along a one-way dep chain (status → data → draft → availability → validation) with an effects section for cross-cutting reactive bridges and an utils/withErrorHandling HOF wrapping per-action loading - Add modals/booking/island.inc and the button-place.inc trigger snippet and wire them into cat-toolbar.inc; point the bookings/list.tt edit buttons and timeline at the island (data-booking-modal / window.openBookingModal); drop the legacy modals/place_booking.inc, js/modals/place_booking.js, its calendar styles in staff-global.scss, and the asset include lines in the six catalogue detail views - Pass js-date-format.inc through unchanged for the new modal - Add the booking-modal-island entry to rspack.config.js - Add ambient.d.ts for *.css / bootstrap / vue-select shims and configure tsconfig.json: @koha-vue alias, allowJs for JSDoc-typed .js flow into TS SFCs, narrow per-feature include scoped to the booking subtree, plus target/lib/module/noEmit/types: [] so tsc runs clean - Hydrate the island via vue/modules/islands.ts, providing the Pinia store under "bookingStore" for inject() consumption - Add Cypress integration coverage in bookingsModalBasic / bookingsModalDatePicker / bookingsModalTimezone, the BookingPeriodStep and bookings-store effects and validation component specs, plus support/e2e and support/flatpickr adjustments and the insertData.js helpers Test plan: STAFF INTERFACE - Creating Bookings Preparation: - Run yarn js:build to emit the bundles Automated tests: - yarn cypress run --spec 't/cypress/integration/Circulation/bookingsModal*.ts' - yarn cypress run --component --spec 't/cypress/component/**/*_spec.ts' (covers BookingFlatpickr, useBookingCalendarMaps, BookingPeriodStep and the lib/booking pure-function specs) Test environment setup (preconditions for the manual steps below; cypress sets up its own data and does not need these): Bookable inventory: - Administration > Item types: mark at least one item type as "Bookable" (or use the per-item "Bookable" toggle on the item edit page) - Have a biblio with multiple bookable copies of that item type so the multi-item / item-selection / capacity flows are exercisable Circulation rules (Administration > Circulation and fines rules, applied to the library + item type scope you will test against or to the wildcard row): - bookings_lead_period: non-zero (e.g. 2) so steps 18 and 25 have a lead-time constraint to validate and the hover feedback emits lead-specific messages - bookings_trail_period: non-zero (e.g. 2) so step 18 has a trail buffer to validate - issuelength: a finite value (e.g. 7) so a maxPeriod is derivable and step 19 has a max-booking-period to enforce in the "issuelength" constraint mode - renewalsallowed + renewalperiod: non-zero values to exercise the "issuelength_with_renewals" constraint mode Calendar / holidays: - Tools > Calendar: add at least one closed day inside the visible calendar range for the pickup library so step 15 has a holiday to render (and the hover-feedback "library closed" path runs) Existing data on the test biblio: - Place one booking ahead of time so step 15 has a conflict to render, step 18 exercises lead/trail markers next to a real booking, and the edit flow (steps 33-38) has something to edit - Check out a bookable copy with a due date inside the visible calendar range so the picker shows a checkout interval and the checkout-vs-booking lead handling (Koha::Item->find_booking) participates 1. Navigate to a biblio detail page with bookable items 2. Click "Place booking" button 3. Observe the Vue booking modal opens Step 1 - Patron Selection: 4. Type patron name/cardnumber in search field 5. Verify typeahead search returns results 6. Select a patron 7. Verify patron is selected and displays correctly Step 2 - Booking Details: 8. Verify item type dropdown is populated 9. Select an item type 10. Verify pickup location dropdown is populated 11. Select a pickup location 12. If multiple bookable items exist, verify item dropdown appears 13. Select specific item (if applicable) Step 3 - Booking Period: 14. Verify flatpickr calendar opens 15. Verify calendar shows existing bookings, checkouts, and available dates 16. Select a date range 17. Verify date range validation works 18. Verify lead period/trail period restrictions are enforced 19. Verify maximum booking period is enforced 20. Verify constraint highlighting updates correctly when changing item type, specific item, or pickup location Validation Testing: 21. Try to submit without patron - verify error message 22. Try to submit without item type - verify error message 23. Try to submit without pickup location - verify error message 24. Try to submit without date range - verify error message 25. Try to select dates outside allowed range - verify validation Capacity Testing: 26. For item type with limited bookable items, verify capacity warnings 27. Verify zero-capacity items show appropriate message Submitting Bookings: 28. Complete all required fields 29. Click "Place booking" 30. Verify booking is created successfully 31. Verify modal closes 32. Verify booking appears in bookings list STAFF INTERFACE - Editing Bookings 33. Click "Edit" on an existing booking 34. Verify modal opens with pre-filled data (patron, item type, pickup location, date range) 35. Modify the date range 36. Click "Update booking" 37. Verify changes are saved 38. Verify updated booking reflects changes Calendar Navigation: 39. In date picker, navigate between months 40. Verify highlighting persists across navigation 41. Verify availability data loads correctly for new months Error Handling: 42. Disconnect network 43. Try to create a booking 44. Verify appropriate error message displays 45. Restore network and verify subsequent booking attempts work Store State Management: 46. Open booking modal and fill in some fields but don't submit 47. Close modal and re-open it 48. Verify modal state is reset (no data persists inappropriately) Build Process: 49. Run yarn js:build and yarn js:build:prod 50. Verify build completes without errors 51. Verify dist files are generated correctly AI/LLM usage: The architecture and design here are my own, refined by hand over a long stretch that began with a manual refactor of place_booking.js. I used AI/LLM assistants throughout to help port the original plain JavaScript to Vue, write boilerplate, and draft and refactor parts of the implementation and tests, and I reviewed, corrected, and integrated everything they produced. This spanned the past year and a succession of models: Anthropic's Opus 4.5 through 4.8 and Fable 5, and OpenAI's GPT-5 to 5.2; the trailer records Opus 4.8, used most recently. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #66 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202177&action=edit Bug 41129: (follow-up) Fall back to setTimeout when requestIdleCallback is missing - Vue island hydration called window.requestIdleCallback directly, which throws TypeError on iOS Safari < 17.4 and prevents the booking-modal-island custom element from being defined; trigger buttons then silently set a property on a plain HTMLElement - Add a module-level scheduleIdle shim that uses requestIdleCallback when available and falls back to setTimeout(cb, 1) otherwise; the hydrate callback never reads the idle deadline, so the fallback is behaviour-equivalent on engines lacking native support Test plan: 1. yarn js:build 2. Regression (requestIdleCallback present): open a staff catalogue detail page for a biblio with bookable items and confirm "Place booking" still opens the modal 3. Fallback (requestIdleCallback missing): test on iOS Safari < 17.4, or emulate it by injecting `delete window.requestIdleCallback;` as the first inline script of the page (e.g. via DevTools local overrides), reload, and confirm the island still hydrates and the button still opens the modal Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #67 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202178&action=edit Bug 41129: (follow-up) Make ESLint parse TypeScript Vue SFCs The booking components are the first SFCs using <script setup lang="ts">; vue-eslint-parser needs the typescript-eslint parser for their script blocks, otherwise every such component fails with a parsing error and is skipped by ESLint entirely. - scope a languageOptions block to **/*.vue delegating script parsing to ts.parser (typescript-eslint is already a dependency) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #68 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202179&action=edit Bug 41129: (follow-up) Preserve error details in the fetch HttpClient and make its error dialog optional The staff HttpClient flattens failed responses into a thrown string: the response status and Koha error_code are lost, and the final 'throw Error(error)' stringifies the caught Error so consumers receive 'Error: <message>'. It also unconditionally appends a page-level warning for every failure, so callers that present errors themselves report each failure twice. - attach the response status and the body's error_code to the thrown error and rethrow the object itself instead of stringifying it - accept a per-call config with suppressDefaultErrorDialog for callers that surface errors themselves; default behaviour is unchanged -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #69 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202180&action=edit Bug 41129: [DO NOT PUSH] Add dev SQL seed for manual test setup - Marks itemtype BK bookable - Sets bookings_lead_period (2), bookings_trail_period (2), issuelength (7), renewalsallowed (2), renewalperiod (7) at the wildcard circulation_rules scope - Adds a closed day at CPL ten days out for holiday rendering - Idempotent via ON DUPLICATE KEY UPDATE / NOT EXISTS guards; run with: koha-mysql kohadev < bug_41129_seed.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/>, |<https://www.bz-sh.de/>, |Büchereizentrale |Büchereizentrale |Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|42207 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42207 [Bug 42207] Allow library embed on GET /patrons/{patron_id} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 [Bug 42790] Clarify and unify bookings actions to 'Edit, Cancel, Checkout, Extend' shown appropriate per status and permission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Large patch |Medium patch Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/>, |<https://www.bz-sh.de/>, |Büchereizentrale |Büchereizentrale |Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/> --- Comment #70 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Current status: Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202173|0 |1 is obsolete| | Attachment #202174|0 |1 is obsolete| | Attachment #202175|0 |1 is obsolete| | Attachment #202176|0 |1 is obsolete| | Attachment #202177|0 |1 is obsolete| | Attachment #202178|0 |1 is obsolete| | Attachment #202179|0 |1 is obsolete| | Attachment #202180|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #71 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203650&action=edit Bug 41129: Add client-side booking rules and utilities Add the client-side rules used to determine which booking dates and options are available. - evaluate booking, checkout, lead-period, trail-period, holiday, and maximum booking-period restrictions - convert booking availability responses into item and date indexes - filter items, item types, and pickup locations as the booking context changes - convert calendar dates to library-timezone day boundaries for API requests - build calendar markers and accessible descriptions for date restrictions - add booking type declarations and shared ID and debounce utilities - add component tests for rules, constraints, availability maps, and dates Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/lib/booking/**/*_spec.ts'` 2. Verify that all booking rule, constraint, availability-map, and timezone tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #72 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203651&action=edit Bug 41129: Add frontend clients for booking workflows Add frontend API clients for the resources needed to create and edit bookings. - add biblio client methods for items, bookings, availability, checkouts, and pickup locations - add clients for circulation rules and library closed dates - add paginated patron search and per-request configuration to existing clients - allow booking create and update requests to receive request configuration - add staff and OPAC adapters for the booking data interface - pass AbortSignal through HttpClient and preserve HTTP status and Koha error codes when a request fails - allow callers that display their own errors to suppress the default dialog - add a translated formatter for errors returned by frontend API clients - document parameters and return values for the added client operations - add component tests for HttpClient and API error formatting Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/HttpClient_spec.ts, t/cypress/component/fetch/api-error_spec.ts'` 2. Verify that cancelled requests do not display an error. 3. Verify that failed requests retain their status, code, and message. 4. Verify that suppressing the default dialog does not change the error returned to the caller. 5. Verify the translated messages for unauthorized, forbidden, server, string, and empty errors. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #73 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203652&action=edit Bug 41129: Add accessible booking calendar and Vue type checking Add a booking date-range picker that presents availability and booking rules in the calendar. - display bookings, checkouts, holidays, lead and trail periods, and booking limits on Flatpickr dates - recalculate item and date availability when the selected range or calendar month changes - retain existing booking ranges while editing - keep restricted dates keyboard-focusable and announce why they cannot be selected - support keyboard selection and day, week, month, and year navigation - exclude Koha's Flatpickr date-shortcut plugins because they bypass booking range validation - add Cypress support and component tests for the calendar and availability maps - enable TypeScript parsing and vue-tsc checking for booking Vue components Test plan: 1. Open the booking modal for a record with a bookable item. 2. Open the booking period calendar and verify that it does not display the Yesterday, Today, and Tomorrow shortcuts. 3. Verify that past dates and dates occupied by a booking or checkout cannot be selected and display the appropriate marker and explanation. 4. Use the keyboard to open the calendar, select a date range, and navigate by day, week, month, and year. 5. Verify that closing the calendar returns focus to the booking period field. 6. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/BookingCalendar_spec.ts, t/cypress/component/useBookingCalendarMaps_spec.ts'` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #74 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203653&action=edit Bug 41129: Replace the staff booking modal with Vue Replace the staff interface's jQuery booking modal with a Vue custom-element island. - add components for patron selection, booking details, the booking period, validation messages, the form, and the Bootstrap modal - add a Pinia store for booking data, validation, calendar state, and create and edit workflows - discard responses from superseded requests and cancel patron searches when the form closes - submit create and update requests through the booking API and retain support for CSRF-protected native form submission - add the booking island to catalogue, circulation, and patron pages - update booking tables and the booking timeline to open the Vue modal - refresh page booking counts, tables, timelines, and success messages after a booking is saved - return focus to the control that opened the modal when it closes - format patron ages and calendar marker details with reorderable translations - remove the old place_booking template, JavaScript, and global calendar styles - add component and end-to-end tests for booking creation and editing Test plan: 1. Enable EnableBooking and sign in as a staff user with permission to manage bookings. 2. Create a record with at least two bookable items of different item types and create a patron who can book them. 3. Open the record detail page and select Place booking. 4. Search for and select the patron. Verify that patron ages use the correct singular or plural wording. 5. Verify that pickup location, item type, and item choices become available and that changing one updates the others. 6. Leave the item and item type empty, select an available period, and save an Any item booking. Verify the success message and booking count. 7. Create another booking for a specific item. Verify that existing bookings, checkouts, holidays, and circulation rules restrict the selectable dates. 8. Verify that calendar conflict details present the marker type and barcode as one complete message. 9. Edit each booking from the bookings table or timeline. Change its details and verify that Update changes the existing booking instead of creating another. 10. Open the modal from the catalogue record, circulation, and patron-detail booking views and verify that create and edit actions use the same form. 11. Close and reopen the modal. Verify that the previous draft is cleared and focus returns to the control that opened it. 12. Repeat create, edit, and cancel using only the keyboard and verify that all fields, errors, date restrictions, and modal controls have accessible names. 13. Run the BookingForm, BookingModal, BookingPatronStep, BookingPeriodStep, booking-store, and three Circulation booking-modal Cypress suites. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #75 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203654&action=edit Bug 41129: Allow assigned unbookable items when editing bookings An item or its effective item type can become unbookable after the item has been assigned to a booking. The availability endpoint then rejects the item, and updating the booking can report a false capacity clash. Allow the assigned item only when excluded_booking_id identifies its booking. Include that item in the capacity calculation, but exclude bookings and checkouts for items outside the resulting item pool. Return a 400 response when an update has a genuine booking clash. Test plan: 1. Create a booking assigned to a specific item. 2. Make the item unbookable and edit the booking. 3. Verify that the assigned item remains selected and its availability request succeeds. 4. Change the booking period and select Update. 5. Verify that the existing booking is updated and no duplicate is created. 6. Repeat the test after making the item's effective item type unbookable. 7. Verify that another unbookable item cannot be selected for the booking. 8. Create a conflicting booking for the assigned item and verify that the update is rejected as a booking clash. 9. Run: `prove -v t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Biblio/Availability/Booking.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/bookings.t` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #76 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203655&action=edit Bug 41129: (follow-up) Fix Preservation test under ES2020 Bug 41129 changes the TypeScript output target to ES2020. The Preservation Trains Cypress spec redeclares the same block-scoped variable, which previously worked only because the default target converted each declaration to var. Reuse the existing variable so the emitted ES2020 remains valid JavaScript and the Preservation suite can load. Test plan: 1. Run: `yarn cypress run --e2e --browser electron --spec 't/cypress/integration/Preservation/Trains.ts'` 2. Confirm that all Preservation Trains tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/>, |<https://www.bz-sh.de/>, |Büchereizentrale |Büchereizentrale |Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/>, |<https://www.bz-sh.de/> |Büchereizentrale | |Schleswig-Holstein | |<https://www.bz-sh.de/> | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Bug 41129 depends on bug 37707, which changed state. Bug 37707 Summary: Lead/Trail times should work in combination https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37707 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Büchereizentrale |Büchereizentrale list of Sponsors|Schleswig-Holstein |Schleswig-Holstein |<https://www.bz-sh.de/> |<https://www.bz-sh.de/>, | |Büchereizentrale | |Schleswig-Holstein | |<https://www.bz-sh.de/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203650|0 |1 is obsolete| | Attachment #203651|0 |1 is obsolete| | Attachment #203652|0 |1 is obsolete| | Attachment #203653|0 |1 is obsolete| | Attachment #203654|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #77 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205274 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205274&action=edit Bug 41129: Add client-side booking rules and utilities Add the client-side rules used to determine which booking dates and options are available. - evaluate booking, checkout, lead-period, trail-period, holiday, and maximum booking-period restrictions - convert booking availability responses into item and date indexes - filter items, item types, and pickup locations as the booking context changes - convert calendar dates to library-timezone day boundaries for API requests - build calendar markers and accessible descriptions for date restrictions - add booking type declarations and shared ID and debounce utilities - add component tests for rules, constraints, availability maps, and dates Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/lib/booking/**/*_spec.ts'` 2. Verify that all booking rule, constraint, availability-map, and timezone tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #78 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205275&action=edit Bug 41129: Add frontend clients for booking workflows Add frontend API clients for the resources needed to create and edit bookings. - add biblio client methods for items, bookings, availability, checkouts, and pickup locations - add clients for circulation rules and library closed dates - add paginated patron search and per-request configuration to existing clients - allow booking create and update requests to receive request configuration - add staff and OPAC adapters for the booking data interface - pass AbortSignal through HttpClient and preserve HTTP status and Koha error codes when a request fails - allow callers that display their own errors to suppress the default dialog - add a translated formatter for errors returned by frontend API clients - document parameters and return values for the added client operations - add component tests for HttpClient and API error formatting Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/HttpClient_spec.ts, t/cypress/component/fetch/api-error_spec.ts'` 2. Verify that cancelled requests do not display an error. 3. Verify that failed requests retain their status, code, and message. 4. Verify that suppressing the default dialog does not change the error returned to the caller. 5. Verify the translated messages for unauthorized, forbidden, server, string, and empty errors. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #79 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205276 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205276&action=edit Bug 41129: Add accessible booking calendar and Vue type checking Add a booking date-range picker that presents availability and booking rules in the calendar. - display bookings, checkouts, holidays, lead and trail periods, and booking limits on Flatpickr dates - recalculate item and date availability when the selected range or calendar month changes - retain existing booking ranges while editing - keep restricted dates keyboard-focusable and announce why they cannot be selected - support keyboard selection and day, week, month, and year navigation - exclude Koha's Flatpickr date-shortcut plugins because they bypass booking range validation - add Cypress support and component tests for the calendar and availability maps - enable TypeScript parsing and vue-tsc checking for booking Vue components Test plan: 1. Open the booking modal for a record with a bookable item. 2. Open the booking period calendar and verify that it does not display the Yesterday, Today, and Tomorrow shortcuts. 3. Verify that past dates and dates occupied by a booking or checkout cannot be selected and display the appropriate marker and explanation. 4. Use the keyboard to open the calendar, select a date range, and navigate by day, week, month, and year. 5. Verify that closing the calendar returns focus to the booking period field. 6. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/BookingCalendar_spec.ts, t/cypress/component/useBookingCalendarMaps_spec.ts'` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #80 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205277 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205277&action=edit Bug 41129: Replace the staff booking modal with Vue Replace the staff interface's jQuery booking modal with a Vue custom-element island. - add components for patron selection, booking details, the booking period, validation messages, the form, and the Bootstrap modal - add a Pinia store for booking data, validation, calendar state, and create and edit workflows - discard responses from superseded requests and cancel patron searches when the form closes - submit create and update requests through the booking API and retain support for CSRF-protected native form submission - add the booking island to catalogue, circulation, and patron pages - update booking tables and the booking timeline to open the Vue modal - refresh page booking counts, tables, timelines, and success messages after a booking is saved - return focus to the control that opened the modal when it closes - format patron ages and calendar marker details with reorderable translations - remove the old place_booking template, JavaScript, and global calendar styles - add component and end-to-end tests for booking creation and editing Test plan: 1. Enable EnableBooking and sign in as a staff user with permission to manage bookings. 2. Create a record with at least two bookable items of different item types and create a patron who can book them. 3. Open the record detail page and select Place booking. 4. Search for and select the patron. Verify that patron ages use the correct singular or plural wording. 5. Verify that pickup location, item type, and item choices become available and that changing one updates the others. 6. Leave the item and item type empty, select an available period, and save an Any item booking. Verify the success message and booking count. 7. Create another booking for a specific item. Verify that existing bookings, checkouts, holidays, and circulation rules restrict the selectable dates. 8. Verify that calendar conflict details present the marker type and barcode as one complete message. 9. Edit each booking from the bookings table or timeline. Change its details and verify that Update changes the existing booking instead of creating another. 10. Open the modal from the catalogue record, circulation, and patron-detail booking views and verify that create and edit actions use the same form. 11. Close and reopen the modal. Verify that the previous draft is cleared and focus returns to the control that opened it. 12. Repeat create, edit, and cancel using only the keyboard and verify that all fields, errors, date restrictions, and modal controls have accessible names. 13. Run the BookingForm, BookingModal, BookingPatronStep, BookingPeriodStep, booking-store, and three Circulation booking-modal Cypress suites. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #81 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205278 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205278&action=edit Bug 41129: Allow assigned unbookable items when editing bookings An item or its effective item type can become unbookable after the item has been assigned to a booking. The availability endpoint then rejects the item, and updating the booking can report a false capacity clash. Allow the assigned item only when excluded_booking_id identifies its booking. Include that item in the capacity calculation, but exclude bookings and checkouts for items outside the resulting item pool. Return a 400 response when an update has a genuine booking clash. Test plan: 1. Create a booking assigned to a specific item. 2. Make the item unbookable and edit the booking. 3. Verify that the assigned item remains selected and its availability request succeeds. 4. Change the booking period and select Update. 5. Verify that the existing booking is updated and no duplicate is created. 6. Repeat the test after making the item's effective item type unbookable. 7. Verify that another unbookable item cannot be selected for the booking. 8. Create a conflicting booking for the assigned item and verify that the update is rejected as a booking clash. 9. Run: `prove -v t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Biblio/Availability/Booking.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/bookings.t` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #82 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205279&action=edit Bug 41129: (QA follow-up) Disable the calendar when an availability refresh fails Guard against a stale, still-enabled calendar after an availability refresh call fails, and cover the guard with a test. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #83 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205280&action=edit Bug 41129: (QA follow-up) Restore Escape-to-close on the booking modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #84 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205281&action=edit Bug 41129: (QA follow-up) Harden HttpClient against malformed and unreachable API responses Guard against malformed JSON in http-client responses, keep status and error_code available on the Vue HttpClient, and surface a clear message when the API is unreachable. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #85 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205282&action=edit Bug 41129: (QA follow-up) Add error_code to booking conflict/duplicate responses Surface a stable error_code on booking conflict/duplicate API responses, and assert it in the conflict tests. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #86 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205283 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205283&action=edit Bug 41129: (QA follow-up) Improve booking workflow diagnostics Log when the availability window is clamped and when a booking session opens without a biblionumber, to aid support diagnosis. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #87 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205284&action=edit Bug 41129: (QA follow-up) Add DST-transition coverage for booking date math Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #88 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205285&action=edit Bug 41129: (QA follow-up) Add a component spec for BookingDetailsStep Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #89 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205286&action=edit Bug 41129: (QA follow-up) Harden booking date/range utilities against invalid input Make addDays/addMonths fail loudly on invalid input instead of silently producing nonsense dates, and make rangeHasConflict return false for a null date range instead of throwing. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #90 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205287&action=edit Bug 41129: (QA follow-up) Remove dead code left over from earlier iterations Remove unused rangeState, dead event-dots calendar CSS, and correct check_booking's POD synopsis to include item_id. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #91 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205288&action=edit Bug 41129: (QA follow-up) Extract a shared PatronSelect component Pull the patron-selection widget out into its own reusable PatronSelect component, use it from the patron step, and stop it depending on booking-only CSS tokens so it can be reused elsewhere. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #92 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205289 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205289&action=edit Bug 41129: (QA follow-up) Rework calendar marker colours and block trail-conflicting start dates Give the trail-period marker its own colour, hide the marker-count grid and multi-marker tooltip mechanism (superseded later by an inline day-details panel), remove the marker dot grid entirely, and simplify the calendar's colour/legend model. Block start dates whose trail window would run into an existing booking - a start whose booking already puts its trail on a conflict has no valid end, so grey those days too. Known limitation: this can end up disabling almost every date under some configurations of long trail periods and dense bookings - not fixed here. Also keep the calendar hint visible with tighter step spacing, and only pre-paint the constrained booking range in end_date_only mode. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #93 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205290&action=edit Bug 41129: (QA follow-up) Replace the floating booking tooltip with an inline day-details panel The floating, positioned tooltip was fragile (z-index/positioning inside a modal) and awkward for assistive tech. Replace it with an inline panel that updates in place as the pointer moves. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #94 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205291 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205291&action=edit Bug 41129: (QA follow-up) Restore richer calendar colours with hover-scoped adjacency, and rebalance the info panels Consolidate lead/trail colours and clarify the buffer legend, remove the muted baseline from non-adjacent lead/trail days, and only style booked/checked-out/holiday before hover - richer detail (adjacency, partial availability) now only appears in response to hovering, keeping the at-rest view calm. Merge Booked/Checked out into a single Unavailable state, scope booked/checked-out markers to the current selection, and add a partial-availability dot for days with a mix of free and booked items. Move the constraint-info summary next to the legend it explains, rebalance the two hover-feedback panels so each owns one job, and restore a dual lead/trail hover preview before a start date is chosen. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #95 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205292 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205292&action=edit Bug 41129: (QA follow-up) Fix the picker getting stuck open inside the modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #96 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205293&action=edit Bug 41129: (QA follow-up) Rework Unavailable-day rendering, gate clash colours, and fix junction shapes per the UX spec Make consecutive Unavailable days read as one contiguous strip rather than a row of separately-rounded pills, then stop rounding those runs entirely and fix the junction shapes between adjacent coloured segments so the bands read as smooth, continuous strips. Gate the clash colours on a genuine conflict, fix a wrong disabled-reason message caused by a stale maxPeriod, and size the existing-booking lead/trail band from leadDays rather than a per-item tag union. Rework colours, legend, and info panels per the UX spec: dock the legend inside flatpickr's own calendar, only highlight existing- booking lead/trail around Unavailable slots, fix month-nav arrows overlapping the legend, and show the same detail dot on Unavailable days as Partial ones. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #97 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205294&action=edit Bug 41129: (QA follow-up) Trial an always-visible, two-month booking calendar Proposed UX improvement on top of the rest of this follow-up series: replace the click-to-open, single-month popup with an always-visible, two-month inline calendar. Move the legend and hover panels out of flatpickr's own container, stop re-emitting an unchanged viewport on every date pick, keep the picker mounted under v-show, harden date-range selection against redraw churn, overlay the clear button, add a not-ready placeholder, reorder input/legend/calendar, fix the lead/trail hover highlight breaking at a month's last row, and style the hover-feedback bar and day-details panel as standard Bootstrap alerts. This is offered as a proposed improvement, not a required fix - the preceding commits stand on their own with the original single-month popup calendar. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205274|0 |1 is obsolete| | Attachment #205275|0 |1 is obsolete| | Attachment #205276|0 |1 is obsolete| | Attachment #205277|0 |1 is obsolete| | Attachment #205278|0 |1 is obsolete| | Attachment #205279|0 |1 is obsolete| | Attachment #205280|0 |1 is obsolete| | Attachment #205281|0 |1 is obsolete| | Attachment #205282|0 |1 is obsolete| | Attachment #205283|0 |1 is obsolete| | Attachment #205284|0 |1 is obsolete| | Attachment #205285|0 |1 is obsolete| | Attachment #205286|0 |1 is obsolete| | Attachment #205287|0 |1 is obsolete| | Attachment #205288|0 |1 is obsolete| | Attachment #205289|0 |1 is obsolete| | Attachment #205290|0 |1 is obsolete| | Attachment #205291|0 |1 is obsolete| | Attachment #205292|0 |1 is obsolete| | Attachment #205293|0 |1 is obsolete| | Attachment #205294|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #98 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205301&action=edit Bug 41129: Add client-side booking rules and utilities Add the client-side rules used to determine which booking dates and options are available. - evaluate booking, checkout, lead-period, trail-period, holiday, and maximum booking-period restrictions - convert booking availability responses into item and date indexes - filter items, item types, and pickup locations as the booking context changes - convert calendar dates to library-timezone day boundaries for API requests - build calendar markers and accessible descriptions for date restrictions - add booking type declarations and shared ID and debounce utilities - add component tests for rules, constraints, availability maps, and dates Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/lib/booking/**/*_spec.ts'` 2. Verify that all booking rule, constraint, availability-map, and timezone tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #99 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205302 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205302&action=edit Bug 41129: Add frontend clients for booking workflows Add frontend API clients for the resources needed to create and edit bookings. - add biblio client methods for items, bookings, availability, checkouts, and pickup locations - add clients for circulation rules and library closed dates - add paginated patron search and per-request configuration to existing clients - allow booking create and update requests to receive request configuration - add staff and OPAC adapters for the booking data interface - pass AbortSignal through HttpClient and preserve HTTP status and Koha error codes when a request fails - allow callers that display their own errors to suppress the default dialog - add a translated formatter for errors returned by frontend API clients - document parameters and return values for the added client operations - add component tests for HttpClient and API error formatting Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/HttpClient_spec.ts, t/cypress/component/fetch/api-error_spec.ts'` 2. Verify that cancelled requests do not display an error. 3. Verify that failed requests retain their status, code, and message. 4. Verify that suppressing the default dialog does not change the error returned to the caller. 5. Verify the translated messages for unauthorized, forbidden, server, string, and empty errors. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #100 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205303 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205303&action=edit Bug 41129: Add accessible booking calendar and Vue type checking Add a booking date-range picker that presents availability and booking rules in the calendar. - display bookings, checkouts, holidays, lead and trail periods, and booking limits on Flatpickr dates - recalculate item and date availability when the selected range or calendar month changes - retain existing booking ranges while editing - keep restricted dates keyboard-focusable and announce why they cannot be selected - support keyboard selection and day, week, month, and year navigation - exclude Koha's Flatpickr date-shortcut plugins because they bypass booking range validation - add Cypress support and component tests for the calendar and availability maps - enable TypeScript parsing and vue-tsc checking for booking Vue components Test plan: 1. Open the booking modal for a record with a bookable item. 2. Open the booking period calendar and verify that it does not display the Yesterday, Today, and Tomorrow shortcuts. 3. Verify that past dates and dates occupied by a booking or checkout cannot be selected and display the appropriate marker and explanation. 4. Use the keyboard to open the calendar, select a date range, and navigate by day, week, month, and year. 5. Verify that closing the calendar returns focus to the booking period field. 6. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/BookingCalendar_spec.ts, t/cypress/component/useBookingCalendarMaps_spec.ts'` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #101 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205304&action=edit Bug 41129: Replace the staff booking modal with Vue Replace the staff interface's jQuery booking modal with a Vue custom-element island. - add components for patron selection, booking details, the booking period, validation messages, the form, and the Bootstrap modal - add a Pinia store for booking data, validation, calendar state, and create and edit workflows - discard responses from superseded requests and cancel patron searches when the form closes - submit create and update requests through the booking API and retain support for CSRF-protected native form submission - add the booking island to catalogue, circulation, and patron pages - update booking tables and the booking timeline to open the Vue modal - refresh page booking counts, tables, timelines, and success messages after a booking is saved - return focus to the control that opened the modal when it closes - format patron ages and calendar marker details with reorderable translations - remove the old place_booking template, JavaScript, and global calendar styles - add component and end-to-end tests for booking creation and editing Test plan: 1. Enable EnableBooking and sign in as a staff user with permission to manage bookings. 2. Create a record with at least two bookable items of different item types and create a patron who can book them. 3. Open the record detail page and select Place booking. 4. Search for and select the patron. Verify that patron ages use the correct singular or plural wording. 5. Verify that pickup location, item type, and item choices become available and that changing one updates the others. 6. Leave the item and item type empty, select an available period, and save an Any item booking. Verify the success message and booking count. 7. Create another booking for a specific item. Verify that existing bookings, checkouts, holidays, and circulation rules restrict the selectable dates. 8. Verify that calendar conflict details present the marker type and barcode as one complete message. 9. Edit each booking from the bookings table or timeline. Change its details and verify that Update changes the existing booking instead of creating another. 10. Open the modal from the catalogue record, circulation, and patron-detail booking views and verify that create and edit actions use the same form. 11. Close and reopen the modal. Verify that the previous draft is cleared and focus returns to the control that opened it. 12. Repeat create, edit, and cancel using only the keyboard and verify that all fields, errors, date restrictions, and modal controls have accessible names. 13. Run the BookingForm, BookingModal, BookingPatronStep, BookingPeriodStep, booking-store, and three Circulation booking-modal Cypress suites. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #102 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205305&action=edit Bug 41129: Allow assigned unbookable items when editing bookings An item or its effective item type can become unbookable after the item has been assigned to a booking. The availability endpoint then rejects the item, and updating the booking can report a false capacity clash. Allow the assigned item only when excluded_booking_id identifies its booking. Include that item in the capacity calculation, but exclude bookings and checkouts for items outside the resulting item pool. Return a 400 response when an update has a genuine booking clash. Test plan: 1. Create a booking assigned to a specific item. 2. Make the item unbookable and edit the booking. 3. Verify that the assigned item remains selected and its availability request succeeds. 4. Change the booking period and select Update. 5. Verify that the existing booking is updated and no duplicate is created. 6. Repeat the test after making the item's effective item type unbookable. 7. Verify that another unbookable item cannot be selected for the booking. 8. Create a conflicting booking for the assigned item and verify that the update is rejected as a booking clash. 9. Run: `prove -v t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Biblio/Availability/Booking.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/bookings.t` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #103 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205306&action=edit Bug 41129: (QA follow-up) Disable the calendar when an availability refresh fails Guard against a stale, still-enabled calendar after an availability refresh call fails, and cover the guard with a test. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #104 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205307 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205307&action=edit Bug 41129: (QA follow-up) Restore Escape-to-close on the booking modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #105 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205308 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205308&action=edit Bug 41129: (QA follow-up) Harden HttpClient against malformed and unreachable API responses Guard against malformed JSON in http-client responses, keep status and error_code available on the Vue HttpClient, and surface a clear message when the API is unreachable. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #106 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205309 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205309&action=edit Bug 41129: (QA follow-up) Add error_code to booking conflict/duplicate responses Surface a stable error_code on booking conflict/duplicate API responses, and assert it in the conflict tests. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #107 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205310&action=edit Bug 41129: (QA follow-up) Improve booking workflow diagnostics Log when the availability window is clamped and when a booking session opens without a biblionumber, to aid support diagnosis. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #108 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205311 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205311&action=edit Bug 41129: (QA follow-up) Add DST-transition coverage for booking date math Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #109 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205312&action=edit Bug 41129: (QA follow-up) Add a component spec for BookingDetailsStep Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #110 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205313&action=edit Bug 41129: (QA follow-up) Harden booking date/range utilities against invalid input Make addDays/addMonths fail loudly on invalid input instead of silently producing nonsense dates, and make rangeHasConflict return false for a null date range instead of throwing. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #111 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205314&action=edit Bug 41129: (QA follow-up) Remove dead code left over from earlier iterations Remove unused rangeState, dead event-dots calendar CSS, and correct check_booking's POD synopsis to include item_id. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #112 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205315&action=edit Bug 41129: (QA follow-up) Extract a shared PatronSelect component Pull the patron-selection widget out into its own reusable PatronSelect component, use it from the patron step, and stop it depending on booking-only CSS tokens so it can be reused elsewhere. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #113 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205316 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205316&action=edit Bug 41129: (QA follow-up) Rework calendar marker colours and block trail-conflicting start dates Give the trail-period marker its own colour, hide the marker-count grid and multi-marker tooltip mechanism (superseded later by an inline day-details panel), remove the marker dot grid entirely, and simplify the calendar's colour/legend model. Block start dates whose trail window would run into an existing booking - a start whose booking already puts its trail on a conflict has no valid end, so grey those days too. Known limitation: this can end up disabling almost every date under some configurations of long trail periods and dense bookings - not fixed here. Also keep the calendar hint visible with tighter step spacing, and only pre-paint the constrained booking range in end_date_only mode. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #114 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205317&action=edit Bug 41129: (QA follow-up) Replace the floating booking tooltip with an inline day-details panel The floating, positioned tooltip was fragile (z-index/positioning inside a modal) and awkward for assistive tech. Replace it with an inline panel that updates in place as the pointer moves. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #115 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205318 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205318&action=edit Bug 41129: (QA follow-up) Restore richer calendar colours with hover-scoped adjacency, and rebalance the info panels Consolidate lead/trail colours and clarify the buffer legend, remove the muted baseline from non-adjacent lead/trail days, and only style booked/checked-out/holiday before hover - richer detail (adjacency, partial availability) now only appears in response to hovering, keeping the at-rest view calm. Merge Booked/Checked out into a single Unavailable state, scope booked/checked-out markers to the current selection, and add a partial-availability dot for days with a mix of free and booked items. Move the constraint-info summary next to the legend it explains, rebalance the two hover-feedback panels so each owns one job, and restore a dual lead/trail hover preview before a start date is chosen. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #116 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205319&action=edit Bug 41129: (QA follow-up) Fix the picker getting stuck open inside the modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #117 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205320 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205320&action=edit Bug 41129: (QA follow-up) Rework Unavailable-day rendering, gate clash colours, and fix junction shapes per the UX spec Make consecutive Unavailable days read as one contiguous strip rather than a row of separately-rounded pills, then stop rounding those runs entirely and fix the junction shapes between adjacent coloured segments so the bands read as smooth, continuous strips. Gate the clash colours on a genuine conflict, fix a wrong disabled-reason message caused by a stale maxPeriod, and size the existing-booking lead/trail band from leadDays rather than a per-item tag union. Rework colours, legend, and info panels per the UX spec: dock the legend inside flatpickr's own calendar, only highlight existing- booking lead/trail around Unavailable slots, fix month-nav arrows overlapping the legend, and show the same detail dot on Unavailable days as Partial ones. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #118 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205321&action=edit Bug 41129: (QA follow-up) Trial an always-visible, two-month booking calendar Proposed UX improvement on top of the rest of this follow-up series: replace the click-to-open, single-month popup with an always-visible, two-month inline calendar. Move the legend and hover panels out of flatpickr's own container, stop re-emitting an unchanged viewport on every date pick, keep the picker mounted under v-show, harden date-range selection against redraw churn, overlay the clear button, add a not-ready placeholder, reorder input/legend/calendar, fix the lead/trail hover highlight breaking at a month's last row, and style the hover-feedback bar and day-details panel as standard Bootstrap alerts. This is offered as a proposed improvement, not a required fix - the preceding commits stand on their own with the original single-month popup calendar. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #119 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- *** Bug 37618 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37477 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37477 [Bug 37477] Add option to override warm-up/cool-down periods on bookings at booking time -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203655|0 |1 is obsolete| | Attachment #205301|0 |1 is obsolete| | Attachment #205302|0 |1 is obsolete| | Attachment #205303|0 |1 is obsolete| | Attachment #205304|0 |1 is obsolete| | Attachment #205305|0 |1 is obsolete| | Attachment #205306|0 |1 is obsolete| | Attachment #205307|0 |1 is obsolete| | Attachment #205308|0 |1 is obsolete| | Attachment #205309|0 |1 is obsolete| | Attachment #205310|0 |1 is obsolete| | Attachment #205311|0 |1 is obsolete| | Attachment #205312|0 |1 is obsolete| | Attachment #205313|0 |1 is obsolete| | Attachment #205314|0 |1 is obsolete| | Attachment #205315|0 |1 is obsolete| | Attachment #205316|0 |1 is obsolete| | Attachment #205317|0 |1 is obsolete| | Attachment #205318|0 |1 is obsolete| | Attachment #205319|0 |1 is obsolete| | Attachment #205320|0 |1 is obsolete| | Attachment #205321|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #120 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205334&action=edit Bug 41129: (follow-up) Fix Preservation test under ES2020 Bug 41129 changes the TypeScript output target to ES2020. The Preservation Trains Cypress spec redeclares the same block-scoped variable, which previously worked only because the default target converted each declaration to var. Reuse the existing variable so the emitted ES2020 remains valid JavaScript and the Preservation suite can load. Test plan: 1. Run: `yarn cypress run --e2e --browser electron --spec 't/cypress/integration/Preservation/Trains.ts'` 2. Confirm that all Preservation Trains tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #121 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205335&action=edit Bug 41129: Add client-side booking rules and utilities Add the client-side rules used to determine which booking dates and options are available. - evaluate booking, checkout, lead-period, trail-period, holiday, and maximum booking-period restrictions - convert booking availability responses into item and date indexes - filter items, item types, and pickup locations as the booking context changes - convert calendar dates to library-timezone day boundaries for API requests - build calendar markers and accessible descriptions for date restrictions - add booking type declarations and shared ID and debounce utilities - add component tests for rules, constraints, availability maps, and dates Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/lib/booking/**/*_spec.ts'` 2. Verify that all booking rule, constraint, availability-map, and timezone tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #122 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205336&action=edit Bug 41129: Add frontend clients for booking workflows Add frontend API clients for the resources needed to create and edit bookings. - add biblio client methods for items, bookings, availability, checkouts, and pickup locations - add clients for circulation rules and library closed dates - add paginated patron search and per-request configuration to existing clients - allow booking create and update requests to receive request configuration - add staff and OPAC adapters for the booking data interface - pass AbortSignal through HttpClient and preserve HTTP status and Koha error codes when a request fails - allow callers that display their own errors to suppress the default dialog - add a translated formatter for errors returned by frontend API clients - document parameters and return values for the added client operations - add component tests for HttpClient and API error formatting Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/HttpClient_spec.ts, t/cypress/component/fetch/api-error_spec.ts'` 2. Verify that cancelled requests do not display an error. 3. Verify that failed requests retain their status, code, and message. 4. Verify that suppressing the default dialog does not change the error returned to the caller. 5. Verify the translated messages for unauthorized, forbidden, server, string, and empty errors. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #123 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205337&action=edit Bug 41129: Add accessible booking calendar and Vue type checking Add a booking date-range picker that presents availability and booking rules in the calendar. - display bookings, checkouts, holidays, lead and trail periods, and booking limits on Flatpickr dates - recalculate item and date availability when the selected range or calendar month changes - retain existing booking ranges while editing - keep restricted dates keyboard-focusable and announce why they cannot be selected - support keyboard selection and day, week, month, and year navigation - exclude Koha's Flatpickr date-shortcut plugins because they bypass booking range validation - add Cypress support and component tests for the calendar and availability maps - enable TypeScript parsing and vue-tsc checking for booking Vue components Test plan: 1. Open the booking modal for a record with a bookable item. 2. Open the booking period calendar and verify that it does not display the Yesterday, Today, and Tomorrow shortcuts. 3. Verify that past dates and dates occupied by a booking or checkout cannot be selected and display the appropriate marker and explanation. 4. Use the keyboard to open the calendar, select a date range, and navigate by day, week, month, and year. 5. Verify that closing the calendar returns focus to the booking period field. 6. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/BookingCalendar_spec.ts, t/cypress/component/useBookingCalendarMaps_spec.ts'` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #124 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205338&action=edit Bug 41129: Replace the staff booking modal with Vue Replace the staff interface's jQuery booking modal with a Vue custom-element island. - add components for patron selection, booking details, the booking period, validation messages, the form, and the Bootstrap modal - add a Pinia store for booking data, validation, calendar state, and create and edit workflows - discard responses from superseded requests and cancel patron searches when the form closes - submit create and update requests through the booking API and retain support for CSRF-protected native form submission - add the booking island to catalogue, circulation, and patron pages - update booking tables and the booking timeline to open the Vue modal - refresh page booking counts, tables, timelines, and success messages after a booking is saved - return focus to the control that opened the modal when it closes - format patron ages and calendar marker details with reorderable translations - remove the old place_booking template, JavaScript, and global calendar styles - add component and end-to-end tests for booking creation and editing Test plan: 1. Enable EnableBooking and sign in as a staff user with permission to manage bookings. 2. Create a record with at least two bookable items of different item types and create a patron who can book them. 3. Open the record detail page and select Place booking. 4. Search for and select the patron. Verify that patron ages use the correct singular or plural wording. 5. Verify that pickup location, item type, and item choices become available and that changing one updates the others. 6. Leave the item and item type empty, select an available period, and save an Any item booking. Verify the success message and booking count. 7. Create another booking for a specific item. Verify that existing bookings, checkouts, holidays, and circulation rules restrict the selectable dates. 8. Verify that calendar conflict details present the marker type and barcode as one complete message. 9. Edit each booking from the bookings table or timeline. Change its details and verify that Update changes the existing booking instead of creating another. 10. Open the modal from the catalogue record, circulation, and patron-detail booking views and verify that create and edit actions use the same form. 11. Close and reopen the modal. Verify that the previous draft is cleared and focus returns to the control that opened it. 12. Repeat create, edit, and cancel using only the keyboard and verify that all fields, errors, date restrictions, and modal controls have accessible names. 13. Run the BookingForm, BookingModal, BookingPatronStep, BookingPeriodStep, booking-store, and three Circulation booking-modal Cypress suites. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #125 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205339 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205339&action=edit Bug 41129: Allow assigned unbookable items when editing bookings An item or its effective item type can become unbookable after the item has been assigned to a booking. The availability endpoint then rejects the item, and updating the booking can report a false capacity clash. Allow the assigned item only when excluded_booking_id identifies its booking. Include that item in the capacity calculation, but exclude bookings and checkouts for items outside the resulting item pool. Return a 400 response when an update has a genuine booking clash. Test plan: 1. Create a booking assigned to a specific item. 2. Make the item unbookable and edit the booking. 3. Verify that the assigned item remains selected and its availability request succeeds. 4. Change the booking period and select Update. 5. Verify that the existing booking is updated and no duplicate is created. 6. Repeat the test after making the item's effective item type unbookable. 7. Verify that another unbookable item cannot be selected for the booking. 8. Create a conflicting booking for the assigned item and verify that the update is rejected as a booking clash. 9. Run: `prove -v t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Biblio/Availability/Booking.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/bookings.t` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #126 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205340 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205340&action=edit Bug 41129: (QA follow-up) Disable the calendar when an availability refresh fails Guard against a stale, still-enabled calendar after an availability refresh call fails, and cover the guard with a test. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #127 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205341 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205341&action=edit Bug 41129: (QA follow-up) Restore Escape-to-close on the booking modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #128 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205342&action=edit Bug 41129: (QA follow-up) Harden HttpClient against malformed and unreachable API responses Guard against malformed JSON in http-client responses, keep status and error_code available on the Vue HttpClient, and surface a clear message when the API is unreachable. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #129 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205343&action=edit Bug 41129: (QA follow-up) Add error_code to booking conflict/duplicate responses Surface a stable error_code on booking conflict/duplicate API responses, and assert it in the conflict tests. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #130 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205344 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205344&action=edit Bug 41129: (QA follow-up) Improve booking workflow diagnostics Log when the availability window is clamped and when a booking session opens without a biblionumber, to aid support diagnosis. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #131 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205345&action=edit Bug 41129: (QA follow-up) Add DST-transition coverage for booking date math Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #132 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205346&action=edit Bug 41129: (QA follow-up) Add a component spec for BookingDetailsStep Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #133 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205347&action=edit Bug 41129: (QA follow-up) Harden booking date/range utilities against invalid input Make addDays/addMonths fail loudly on invalid input instead of silently producing nonsense dates, and make rangeHasConflict return false for a null date range instead of throwing. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #134 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205348&action=edit Bug 41129: (QA follow-up) Remove dead code left over from earlier iterations Remove unused rangeState, dead event-dots calendar CSS, and correct check_booking's POD synopsis to include item_id. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #135 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205349&action=edit Bug 41129: (QA follow-up) Extract a shared PatronSelect component Pull the patron-selection widget out into its own reusable PatronSelect component, use it from the patron step, and stop it depending on booking-only CSS tokens so it can be reused elsewhere. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #136 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205350&action=edit Bug 41129: (QA follow-up) Rework calendar marker colours and block trail-conflicting start dates Give the trail-period marker its own colour, hide the marker-count grid and multi-marker tooltip mechanism (superseded later by an inline day-details panel), remove the marker dot grid entirely, and simplify the calendar's colour/legend model. Block start dates whose trail window would run into an existing booking - a start whose booking already puts its trail on a conflict has no valid end, so grey those days too. Known limitation: this can end up disabling almost every date under some configurations of long trail periods and dense bookings - not fixed here. Also keep the calendar hint visible with tighter step spacing, and only pre-paint the constrained booking range in end_date_only mode. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #137 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205351 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205351&action=edit Bug 41129: (QA follow-up) Replace the floating booking tooltip with an inline day-details panel The floating, positioned tooltip was fragile (z-index/positioning inside a modal) and awkward for assistive tech. Replace it with an inline panel that updates in place as the pointer moves. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #138 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205352&action=edit Bug 41129: (QA follow-up) Restore richer calendar colours with hover-scoped adjacency, and rebalance the info panels Consolidate lead/trail colours and clarify the buffer legend, remove the muted baseline from non-adjacent lead/trail days, and only style booked/checked-out/holiday before hover - richer detail (adjacency, partial availability) now only appears in response to hovering, keeping the at-rest view calm. Merge Booked/Checked out into a single Unavailable state, scope booked/checked-out markers to the current selection, and add a partial-availability dot for days with a mix of free and booked items. Move the constraint-info summary next to the legend it explains, rebalance the two hover-feedback panels so each owns one job, and restore a dual lead/trail hover preview before a start date is chosen. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #139 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205353&action=edit Bug 41129: (QA follow-up) Fix the picker getting stuck open inside the modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #140 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205354&action=edit Bug 41129: (QA follow-up) Rework Unavailable-day rendering, gate clash colours, and fix junction shapes per the UX spec Make consecutive Unavailable days read as one contiguous strip rather than a row of separately-rounded pills, then stop rounding those runs entirely and fix the junction shapes between adjacent coloured segments so the bands read as smooth, continuous strips. Gate the clash colours on a genuine conflict, fix a wrong disabled-reason message caused by a stale maxPeriod, and size the existing-booking lead/trail band from leadDays rather than a per-item tag union. Rework colours, legend, and info panels per the UX spec: dock the legend inside flatpickr's own calendar, only highlight existing- booking lead/trail around Unavailable slots, fix month-nav arrows overlapping the legend, and show the same detail dot on Unavailable days as Partial ones. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #141 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205355&action=edit Bug 41129: (QA follow-up) Trial an always-visible, two-month booking calendar Proposed UX improvement on top of the rest of this follow-up series: replace the click-to-open, single-month popup with an always-visible, two-month inline calendar. Move the legend and hover panels out of flatpickr's own container, stop re-emitting an unchanged viewport on every date pick, keep the picker mounted under v-show, harden date-range selection against redraw churn, overlay the clear button, add a not-ready placeholder, reorder input/legend/calendar, fix the lead/trail hover highlight breaking at a month's last row, and style the hover-feedback bar and day-details panel as standard Bootstrap alerts. This is offered as a proposed improvement, not a required fix - the preceding commits stand on their own with the original single-month popup calendar. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #142 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205356&action=edit Bug 41129: (QA follow-up) Adapt the flatpickr helper and specs to the inline two-month calendar - Day selector: exclude the hidden overflow cells (.hidden) that showMonths > 1 renders for the neighbouring month, so a date near a month boundary matches one element - Select helpers: wait for the day to lose flatpickr-disabled before clicking; every day is disabled until availability has loaded, and a click on a disabled day is silently ignored - Wait for the item-specific availability after selecting an item: the picker stays enabled on the previous context's data meanwhile, and the redraw applying the new data wipes any hover preview set before - Rewrite the two tests expecting the calendar to close: it is inline now, Escape from a day returns focus to the input - Drop the runMode retries from bookingsModalBasic_spec.ts, which masked the disabled-day clicks Test plan: 1. cypress run --spec 't/cypress/integration/Circulation/bookingsModal*_spec.ts' Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #143 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205357&action=edit Bug 41129: (QA follow-up) Show a single month when the calendar has no room for two - BookingCalendar picks showMonths from its wrapper's width: two when two day grids fit, else one, so a phone-width modal no longer overflows; measured once after the first build, then from a ResizeObserver, rebuilding Flatpickr on the next frame when the count changes - Stretch .booking-date-picker so that width is the space available - Write BookingPeriodStep's render width on the next frame too, or the two observers trip the browser's ResizeObserver loop error - Load Flatpickr's stylesheet in the component harness, as calendar.inc does, so the grid has its real width there - Cover the single-month and resize cases in BookingCalendar_spec.ts Test plan: 1. yarn js:build; open the booking modal at ~440px width: one month; widen past ~620px of modal width: two months, selection kept 2. cypress run --component 3. cypress run --spec 't/cypress/integration/Circulation/bookingsModal*_spec.ts' Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #144 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205358 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205358&action=edit Bug 41129: (QA follow-up) Lay the calendar legend out as a grid sized to the calendar - One element per legend entry, laid out as a grid instead of a ragged flex row with an orphaned last entry - The legend takes the calendar's measured width (the same --booking-calendar-render-width the panels use) and centres with it: two content-sized columns per displayed month, spread edge to edge, the count passed from the picker's ready event as --booking-legend-columns - BookingPeriodStep.vue owns the legend layout; drop the duplicate flex rules and horizontal padding from BookingForm.vue Test plan: 1. yarn js:build; enable the calendar: legend as wide as the calendar, four columns edge to edge; at phone width one month, two columns 2. cypress run --component --spec t/cypress/component/BookingPeriodStep_spec.ts Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #145 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 205359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205359&action=edit Bug 41129: (QA follow-up) Remove the calendar drop shadow and clip highlight bands to the grid - Replace Flatpickr's popup drop shadow with a 1px border in the modal's neutral colour and its small radius, as the closed-days calendar (tools/holidays.pl) is embedded; report the border-box width so legend and panels line up with the border - Bands (selected, unavailable, lead, trail, clash and hover variants) bridge the ~5px cell gaps with a 5px box-shadow each side; at a row's ends the outward half spilled past the grid or into the next month. Hoist each state's colour into --booking-band, draw the shadow from one rule, and trim the outward half on row-end cells (nth-child 7n+1 and 7n+7) to the 2.5px that reach the grid edge - Assert the Saturday case in bookingsModalDatePicker_spec.ts Test plan: 1. yarn js:build; enable the calendar: no shadow, plain border, legend and panels as wide as the bordered calendar 2. With a booking spanning a weekend: the band runs to the grid edge on Saturday and from it on Sunday 3. cypress run --spec t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts 4. cypress run --component Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205334|0 |1 is obsolete| | Attachment #205335|0 |1 is obsolete| | Attachment #205336|0 |1 is obsolete| | Attachment #205337|0 |1 is obsolete| | Attachment #205338|0 |1 is obsolete| | Attachment #205339|0 |1 is obsolete| | Attachment #205340|0 |1 is obsolete| | Attachment #205341|0 |1 is obsolete| | Attachment #205342|0 |1 is obsolete| | Attachment #205343|0 |1 is obsolete| | Attachment #205344|0 |1 is obsolete| | Attachment #205345|0 |1 is obsolete| | Attachment #205346|0 |1 is obsolete| | Attachment #205347|0 |1 is obsolete| | Attachment #205348|0 |1 is obsolete| | Attachment #205349|0 |1 is obsolete| | Attachment #205350|0 |1 is obsolete| | Attachment #205351|0 |1 is obsolete| | Attachment #205352|0 |1 is obsolete| | Attachment #205353|0 |1 is obsolete| | Attachment #205354|0 |1 is obsolete| | Attachment #205355|0 |1 is obsolete| | Attachment #205356|0 |1 is obsolete| | Attachment #205357|0 |1 is obsolete| | Attachment #205358|0 |1 is obsolete| | Attachment #205359|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #146 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205498&action=edit Bug 41129: (follow-up) Fix Preservation test under ES2020 Bug 41129 changes the TypeScript output target to ES2020. The Preservation Trains Cypress spec redeclares the same block-scoped variable, which previously worked only because the default target converted each declaration to var. Reuse the existing variable so the emitted ES2020 remains valid JavaScript and the Preservation suite can load. Test plan: 1. Run: `yarn cypress run --e2e --browser electron --spec 't/cypress/integration/Preservation/Trains.ts'` 2. Confirm that all Preservation Trains tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #147 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205499&action=edit Bug 41129: Add client-side booking rules and utilities Add the client-side rules used to determine which booking dates and options are available. - evaluate booking, checkout, lead-period, trail-period, holiday, and maximum booking-period restrictions - convert booking availability responses into item and date indexes - filter items, item types, and pickup locations as the booking context changes - convert calendar dates to library-timezone day boundaries for API requests - build calendar markers and accessible descriptions for date restrictions - add booking type declarations and shared ID and debounce utilities - add component tests for rules, constraints, availability maps, and dates Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/lib/booking/**/*_spec.ts'` 2. Verify that all booking rule, constraint, availability-map, and timezone tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #148 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205500&action=edit Bug 41129: Add frontend clients for booking workflows Add frontend API clients for the resources needed to create and edit bookings. - add biblio client methods for items, bookings, availability, checkouts, and pickup locations - add clients for circulation rules and library closed dates - add paginated patron search and per-request configuration to existing clients - allow booking create and update requests to receive request configuration - add staff and OPAC adapters for the booking data interface - pass AbortSignal through HttpClient and preserve HTTP status and Koha error codes when a request fails - allow callers that display their own errors to suppress the default dialog - add a translated formatter for errors returned by frontend API clients - document parameters and return values for the added client operations - add component tests for HttpClient and API error formatting Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/HttpClient_spec.ts, t/cypress/component/fetch/api-error_spec.ts'` 2. Verify that cancelled requests do not display an error. 3. Verify that failed requests retain their status, code, and message. 4. Verify that suppressing the default dialog does not change the error returned to the caller. 5. Verify the translated messages for unauthorized, forbidden, server, string, and empty errors. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #149 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205501 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205501&action=edit Bug 41129: Add accessible booking calendar and Vue type checking Add a booking date-range picker that presents availability and booking rules in the calendar. - display bookings, checkouts, holidays, lead and trail periods, and booking limits on Flatpickr dates - recalculate item and date availability when the selected range or calendar month changes - retain existing booking ranges while editing - keep restricted dates keyboard-focusable and announce why they cannot be selected - support keyboard selection and day, week, month, and year navigation - exclude Koha's Flatpickr date-shortcut plugins because they bypass booking range validation - add Cypress support and component tests for the calendar and availability maps - enable TypeScript parsing and vue-tsc checking for booking Vue components Test plan: 1. Open the booking modal for a record with a bookable item. 2. Open the booking period calendar and verify that it does not display the Yesterday, Today, and Tomorrow shortcuts. 3. Verify that past dates and dates occupied by a booking or checkout cannot be selected and display the appropriate marker and explanation. 4. Use the keyboard to open the calendar, select a date range, and navigate by day, week, month, and year. 5. Verify that closing the calendar returns focus to the booking period field. 6. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/BookingCalendar_spec.ts, t/cypress/component/useBookingCalendarMaps_spec.ts'` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #150 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205502&action=edit Bug 41129: Replace the staff booking modal with Vue Replace the staff interface's jQuery booking modal with a Vue custom-element island. - add components for patron selection, booking details, the booking period, validation messages, the form, and the Bootstrap modal - add a Pinia store for booking data, validation, calendar state, and create and edit workflows - discard responses from superseded requests and cancel patron searches when the form closes - submit create and update requests through the booking API and retain support for CSRF-protected native form submission - add the booking island to catalogue, circulation, and patron pages - update booking tables and the booking timeline to open the Vue modal - refresh page booking counts, tables, timelines, and success messages after a booking is saved - return focus to the control that opened the modal when it closes - format patron ages and calendar marker details with reorderable translations - remove the old place_booking template, JavaScript, and global calendar styles - add component and end-to-end tests for booking creation and editing Test plan: 1. Enable EnableBooking and sign in as a staff user with permission to manage bookings. 2. Create a record with at least two bookable items of different item types and create a patron who can book them. 3. Open the record detail page and select Place booking. 4. Search for and select the patron. Verify that patron ages use the correct singular or plural wording. 5. Verify that pickup location, item type, and item choices become available and that changing one updates the others. 6. Leave the item and item type empty, select an available period, and save an Any item booking. Verify the success message and booking count. 7. Create another booking for a specific item. Verify that existing bookings, checkouts, holidays, and circulation rules restrict the selectable dates. 8. Verify that calendar conflict details present the marker type and barcode as one complete message. 9. Edit each booking from the bookings table or timeline. Change its details and verify that Update changes the existing booking instead of creating another. 10. Open the modal from the catalogue record, circulation, and patron-detail booking views and verify that create and edit actions use the same form. 11. Close and reopen the modal. Verify that the previous draft is cleared and focus returns to the control that opened it. 12. Repeat create, edit, and cancel using only the keyboard and verify that all fields, errors, date restrictions, and modal controls have accessible names. 13. Run the BookingForm, BookingModal, BookingPatronStep, BookingPeriodStep, booking-store, and three Circulation booking-modal Cypress suites. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #151 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205503&action=edit Bug 41129: Allow assigned unbookable items when editing bookings An item or its effective item type can become unbookable after the item has been assigned to a booking. The availability endpoint then rejects the item, and updating the booking can report a false capacity clash. Allow the assigned item only when excluded_booking_id identifies its booking. Include that item in the capacity calculation, but exclude bookings and checkouts for items outside the resulting item pool. Return a 400 response when an update has a genuine booking clash. Test plan: 1. Create a booking assigned to a specific item. 2. Make the item unbookable and edit the booking. 3. Verify that the assigned item remains selected and its availability request succeeds. 4. Change the booking period and select Update. 5. Verify that the existing booking is updated and no duplicate is created. 6. Repeat the test after making the item's effective item type unbookable. 7. Verify that another unbookable item cannot be selected for the booking. 8. Create a conflicting booking for the assigned item and verify that the update is rejected as a booking clash. 9. Run: `prove -v t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Biblio/Availability/Booking.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/bookings.t` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #152 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205504&action=edit Bug 41129: (QA follow-up) Disable the calendar when an availability refresh fails Guard against a stale, still-enabled calendar after an availability refresh call fails, and cover the guard with a test. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #153 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205505&action=edit Bug 41129: (QA follow-up) Restore Escape-to-close on the booking modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #154 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205506&action=edit Bug 41129: (QA follow-up) Harden HttpClient against malformed and unreachable API responses Guard against malformed JSON in http-client responses, keep status and error_code available on the Vue HttpClient, and surface a clear message when the API is unreachable. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #155 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205507&action=edit Bug 41129: (QA follow-up) Thread request config through the Vue HttpClient The sibling fetch/http-client.js was hardened to accept a per-request config object (config.signal, config.suppressDefaultErrorDialog), but this Vue variant was missed. Since it's what the live staff booking modal actually uses (via the @bookingApi alias to staff-interface.js), every booking submission failure showed two error messages: the inline one BookingForm.vue renders itself, plus a spurious global banner this client raised regardless of suppressDefaultErrorDialog. Abort-on-supersede (workflow.js's transitionController.abort()) was also a no-op, since the signal never reached fetch(). Thread config through _fetchJSON and every public method the same way the plain client does. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #156 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205508 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205508&action=edit Bug 41129: (QA follow-up) Add error_code to booking conflict/duplicate responses Surface a stable error_code on booking conflict/duplicate API responses, and assert it in the conflict tests. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #157 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205509&action=edit Bug 41129: (QA follow-up) Improve booking workflow diagnostics Log when the availability window is clamped and when a booking session opens without a biblionumber, to aid support diagnosis. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #158 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205510 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205510&action=edit Bug 41129: (QA follow-up) Add DST-transition coverage for booking date math Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #159 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205511 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205511&action=edit Bug 41129: (QA follow-up) Add a component spec for BookingDetailsStep Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #160 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205512 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205512&action=edit Bug 41129: (QA follow-up) Harden booking date/range utilities against invalid input Make addDays/addMonths fail loudly on invalid input instead of silently producing nonsense dates, and make rangeHasConflict return false for a null date range instead of throwing. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #161 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205513 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205513&action=edit Bug 41129: (QA follow-up) Remove dead code left over from earlier iterations Remove unused rangeState, dead event-dots calendar CSS, and correct check_booking's POD synopsis to include item_id. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #162 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205514&action=edit Bug 41129: (QA follow-up) Extract a shared PatronSelect component Pull the patron-selection widget out into its own reusable PatronSelect component, use it from the patron step, and stop it depending on booking-only CSS tokens so it can be reused elsewhere. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #163 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205515&action=edit Bug 41129: (QA follow-up) Rework calendar marker colours and block trail-conflicting start dates Give the trail-period marker its own colour, hide the marker-count grid and multi-marker tooltip mechanism (superseded later by an inline day-details panel), remove the marker dot grid entirely, and simplify the calendar's colour/legend model. Block start dates whose trail window would run into an existing booking - a start whose booking already puts its trail on a conflict has no valid end, so grey those days too. Known limitation: this can end up disabling almost every date under some configurations of long trail periods and dense bookings - not fixed here. Also keep the calendar hint visible with tighter step spacing, and only pre-paint the constrained booking range in end_date_only mode. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #164 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205516&action=edit Bug 41129: (QA follow-up) Replace the floating booking tooltip with an inline day-details panel The floating, positioned tooltip was fragile (z-index/positioning inside a modal) and awkward for assistive tech. Replace it with an inline panel that updates in place as the pointer moves. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #165 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205517&action=edit Bug 41129: (QA follow-up) Restore richer calendar colours with hover-scoped adjacency, and rebalance the info panels Consolidate lead/trail colours and clarify the buffer legend, remove the muted baseline from non-adjacent lead/trail days, and only style booked/checked-out/holiday before hover - richer detail (adjacency, partial availability) now only appears in response to hovering, keeping the at-rest view calm. Merge Booked/Checked out into a single Unavailable state, scope booked/checked-out markers to the current selection, and add a partial-availability dot for days with a mix of free and booked items. Move the constraint-info summary next to the legend it explains, rebalance the two hover-feedback panels so each owns one job, and restore a dual lead/trail hover preview before a start date is chosen. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #166 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205518&action=edit Bug 41129: (QA follow-up) Fix the picker getting stuck open inside the modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #167 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205519&action=edit Bug 41129: (QA follow-up) Rework Unavailable-day rendering, gate clash colours, and fix junction shapes per the UX spec Make consecutive Unavailable days read as one contiguous strip rather than a row of separately-rounded pills, then stop rounding those runs entirely and fix the junction shapes between adjacent coloured segments so the bands read as smooth, continuous strips. Gate the clash colours on a genuine conflict, fix a wrong disabled-reason message caused by a stale maxPeriod, and size the existing-booking lead/trail band from leadDays rather than a per-item tag union. Rework colours, legend, and info panels per the UX spec: dock the legend inside flatpickr's own calendar, only highlight existing- booking lead/trail around Unavailable slots, fix month-nav arrows overlapping the legend, and show the same detail dot on Unavailable days as Partial ones. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #168 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205520&action=edit Bug 41129: (QA follow-up) Trial an always-visible, two-month booking calendar Proposed UX improvement on top of the rest of this follow-up series: replace the click-to-open, single-month popup with an always-visible, two-month inline calendar. Move the legend and hover panels out of flatpickr's own container, stop re-emitting an unchanged viewport on every date pick, keep the picker mounted under v-show, harden date-range selection against redraw churn, overlay the clear button, add a not-ready placeholder, reorder input/legend/calendar, fix the lead/trail hover highlight breaking at a month's last row, and style the hover-feedback bar and day-details panel as standard Bootstrap alerts. This is offered as a proposed improvement, not a required fix - the preceding commits stand on their own with the original single-month popup calendar. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #169 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205521&action=edit Bug 41129: (QA follow-up) Adapt the flatpickr helper and specs to the inline two-month calendar - Day selector: exclude the hidden overflow cells (.hidden) that showMonths > 1 renders for the neighbouring month, so a date near a month boundary matches one element - Select helpers: wait for the day to lose flatpickr-disabled before clicking; every day is disabled until availability has loaded, and a click on a disabled day is silently ignored - Wait for the item-specific availability after selecting an item: the picker stays enabled on the previous context's data meanwhile, and the redraw applying the new data wipes any hover preview set before - Rewrite the two tests expecting the calendar to close: it is inline now, Escape from a day returns focus to the input - Drop the runMode retries from bookingsModalBasic_spec.ts, which masked the disabled-day clicks Test plan: 1. cypress run --spec 't/cypress/integration/Circulation/bookingsModal*_spec.ts' Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #170 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205522 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205522&action=edit Bug 41129: (QA follow-up) Show a single month when the calendar has no room for two - BookingCalendar picks showMonths from its wrapper's width: two when two day grids fit, else one, so a phone-width modal no longer overflows; measured once after the first build, then from a ResizeObserver, rebuilding Flatpickr on the next frame when the count changes - Stretch .booking-date-picker so that width is the space available - Write BookingPeriodStep's render width on the next frame too, or the two observers trip the browser's ResizeObserver loop error - Load Flatpickr's stylesheet in the component harness, as calendar.inc does, so the grid has its real width there - Cover the single-month and resize cases in BookingCalendar_spec.ts Test plan: 1. yarn js:build; open the booking modal at ~440px width: one month; widen past ~620px of modal width: two months, selection kept 2. cypress run --component 3. cypress run --spec 't/cypress/integration/Circulation/bookingsModal*_spec.ts' Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #171 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205523 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205523&action=edit Bug 41129: (QA follow-up) Lay the calendar legend out as a grid sized to the calendar - One element per legend entry, laid out as a grid instead of a ragged flex row with an orphaned last entry - The legend takes the calendar's measured width (the same --booking-calendar-render-width the panels use) and centres with it: two content-sized columns per displayed month, spread edge to edge, the count passed from the picker's ready event as --booking-legend-columns - BookingPeriodStep.vue owns the legend layout; drop the duplicate flex rules and horizontal padding from BookingForm.vue Test plan: 1. yarn js:build; enable the calendar: legend as wide as the calendar, four columns edge to edge; at phone width one month, two columns 2. cypress run --component --spec t/cypress/component/BookingPeriodStep_spec.ts Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #172 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205524 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205524&action=edit Bug 41129: (QA follow-up) Remove the calendar drop shadow and clip highlight bands to the grid - Replace Flatpickr's popup drop shadow with a 1px border in the modal's neutral colour and its small radius, as the closed-days calendar (tools/holidays.pl) is embedded; report the border-box width so legend and panels line up with the border - Bands (selected, unavailable, lead, trail, clash and hover variants) bridge the ~5px cell gaps with a 5px box-shadow each side; at a row's ends the outward half spilled past the grid or into the next month. Hoist each state's colour into --booking-band, draw the shadow from one rule, and trim the outward half on row-end cells (nth-child 7n+1 and 7n+7) to the 2.5px that reach the grid edge - Assert the Saturday case in bookingsModalDatePicker_spec.ts Test plan: 1. yarn js:build; enable the calendar: no shadow, plain border, legend and panels as wide as the bordered calendar 2. With a booking spanning a weekend: the band runs to the grid edge on Saturday and from it on Sunday 3. cypress run --spec t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts 4. cypress run --component Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #173 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205525&action=edit Bug 41129: (QA follow-up) Consolidate on a single APIClient.circulation_rules client The Bug 42790/Bug 41129 patch conflict resolution left two API client entries pointing at the circulation-rules API client class: the pre-existing 'circRule' key (used by the Circulation Triggers admin store) and the new 'circulation_rules' key (used by the booking workflow adapters). Both resolved to the same client class, so the duplication served no purpose. Drop the 'circRule' key and switch its one remaining consumer (vue/stores/circulation-rules.js) over to 'circulation_rules'. No additions were needed on the client itself, as it already exposed everything both call sites required. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43516 Depends on| |43517 Depends on| |43518 QA Contact|testopia@bugs.koha-communit |matt.blenkinsop@openfifth.c |y.org |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43516 [Bug 43516] Harden the frontend HttpClient and add a shared API error formatter https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43517 [Bug 43517] Enable vue-tsc type checking and shared Cypress component-test shims https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43518 [Bug 43518] Add a reusable PatronSelect Vue component with patron search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205498|0 |1 is obsolete| | Attachment #205499|0 |1 is obsolete| | Attachment #205500|0 |1 is obsolete| | Attachment #205501|0 |1 is obsolete| | Attachment #205502|0 |1 is obsolete| | Attachment #205503|0 |1 is obsolete| | Attachment #205504|0 |1 is obsolete| | Attachment #205505|0 |1 is obsolete| | Attachment #205506|0 |1 is obsolete| | Attachment #205507|0 |1 is obsolete| | Attachment #205508|0 |1 is obsolete| | Attachment #205509|0 |1 is obsolete| | Attachment #205510|0 |1 is obsolete| | Attachment #205511|0 |1 is obsolete| | Attachment #205512|0 |1 is obsolete| | Attachment #205513|0 |1 is obsolete| | Attachment #205515|0 |1 is obsolete| | Attachment #205516|0 |1 is obsolete| | Attachment #205517|0 |1 is obsolete| | Attachment #205518|0 |1 is obsolete| | Attachment #205519|0 |1 is obsolete| | Attachment #205520|0 |1 is obsolete| | Attachment #205521|0 |1 is obsolete| | Attachment #205522|0 |1 is obsolete| | Attachment #205523|0 |1 is obsolete| | Attachment #205524|0 |1 is obsolete| | Attachment #205525|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #174 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205548&action=edit Bug 41129: (follow-up) Fix Preservation test under ES2020 Bug 41129 changes the TypeScript output target to ES2020. The Preservation Trains Cypress spec redeclares the same block-scoped variable, which previously worked only because the default target converted each declaration to var. Reuse the existing variable so the emitted ES2020 remains valid JavaScript and the Preservation suite can load. Test plan: 1. Run: `yarn cypress run --e2e --browser electron --spec 't/cypress/integration/Preservation/Trains.ts'` 2. Confirm that all Preservation Trains tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #175 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205549 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205549&action=edit Bug 41129: Add client-side booking rules and utilities Add the client-side rules used to determine which booking dates and options are available. - evaluate booking, checkout, lead-period, trail-period, holiday, and maximum booking-period restrictions - convert booking availability responses into item and date indexes - filter items, item types, and pickup locations as the booking context changes - convert calendar dates to library-timezone day boundaries for API requests - build calendar markers and accessible descriptions for date restrictions - add booking type declarations and shared ID and debounce utilities - add component tests for rules, constraints, availability maps, and dates Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/lib/booking/**/*_spec.ts'` 2. Verify that all booking rule, constraint, availability-map, and timezone tests pass. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #176 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205550&action=edit Bug 41129: Add frontend clients for booking workflows Add frontend API clients for the resources needed to create and edit bookings. - add biblio client methods for items, bookings, availability, checkouts, and pickup locations - add clients for circulation rules and library closed dates - add paginated patron search and per-request configuration to existing clients - allow booking create and update requests to receive request configuration - add staff and OPAC adapters for the booking data interface - pass AbortSignal through HttpClient and preserve HTTP status and Koha error codes when a request fails - allow callers that display their own errors to suppress the default dialog - add a translated formatter for errors returned by frontend API clients - document parameters and return values for the added client operations - add component tests for HttpClient and API error formatting Test plan: 1. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/HttpClient_spec.ts, t/cypress/component/fetch/api-error_spec.ts'` 2. Verify that cancelled requests do not display an error. 3. Verify that failed requests retain their status, code, and message. 4. Verify that suppressing the default dialog does not change the error returned to the caller. 5. Verify the translated messages for unauthorized, forbidden, server, string, and empty errors. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #177 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205551&action=edit Bug 41129: Add accessible booking calendar and Vue type checking Add a booking date-range picker that presents availability and booking rules in the calendar. - display bookings, checkouts, holidays, lead and trail periods, and booking limits on Flatpickr dates - recalculate item and date availability when the selected range or calendar month changes - retain existing booking ranges while editing - keep restricted dates keyboard-focusable and announce why they cannot be selected - support keyboard selection and day, week, month, and year navigation - exclude Koha's Flatpickr date-shortcut plugins because they bypass booking range validation - add Cypress support and component tests for the calendar and availability maps - enable TypeScript parsing and vue-tsc checking for booking Vue components Test plan: 1. Open the booking modal for a record with a bookable item. 2. Open the booking period calendar and verify that it does not display the Yesterday, Today, and Tomorrow shortcuts. 3. Verify that past dates and dates occupied by a booking or checkout cannot be selected and display the appropriate marker and explanation. 4. Use the keyboard to open the calendar, select a date range, and navigate by day, week, month, and year. 5. Verify that closing the calendar returns focus to the booking period field. 6. Run: `yarn cypress run --component --browser electron --spec 't/cypress/component/BookingCalendar_spec.ts, t/cypress/component/useBookingCalendarMaps_spec.ts'` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #178 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205552&action=edit Bug 41129: Replace the staff booking modal with Vue Replace the staff interface's jQuery booking modal with a Vue custom-element island. - add components for patron selection, booking details, the booking period, validation messages, the form, and the Bootstrap modal - add a Pinia store for booking data, validation, calendar state, and create and edit workflows - discard responses from superseded requests and cancel patron searches when the form closes - submit create and update requests through the booking API and retain support for CSRF-protected native form submission - add the booking island to catalogue, circulation, and patron pages - update booking tables and the booking timeline to open the Vue modal - refresh page booking counts, tables, timelines, and success messages after a booking is saved - return focus to the control that opened the modal when it closes - format patron ages and calendar marker details with reorderable translations - remove the old place_booking template, JavaScript, and global calendar styles - add component and end-to-end tests for booking creation and editing Test plan: 1. Enable EnableBooking and sign in as a staff user with permission to manage bookings. 2. Create a record with at least two bookable items of different item types and create a patron who can book them. 3. Open the record detail page and select Place booking. 4. Search for and select the patron. Verify that patron ages use the correct singular or plural wording. 5. Verify that pickup location, item type, and item choices become available and that changing one updates the others. 6. Leave the item and item type empty, select an available period, and save an Any item booking. Verify the success message and booking count. 7. Create another booking for a specific item. Verify that existing bookings, checkouts, holidays, and circulation rules restrict the selectable dates. 8. Verify that calendar conflict details present the marker type and barcode as one complete message. 9. Edit each booking from the bookings table or timeline. Change its details and verify that Update changes the existing booking instead of creating another. 10. Open the modal from the catalogue record, circulation, and patron-detail booking views and verify that create and edit actions use the same form. 11. Close and reopen the modal. Verify that the previous draft is cleared and focus returns to the control that opened it. 12. Repeat create, edit, and cancel using only the keyboard and verify that all fields, errors, date restrictions, and modal controls have accessible names. 13. Run the BookingForm, BookingModal, BookingPatronStep, BookingPeriodStep, booking-store, and three Circulation booking-modal Cypress suites. Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #179 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205553&action=edit Bug 41129: Allow assigned unbookable items when editing bookings An item or its effective item type can become unbookable after the item has been assigned to a booking. The availability endpoint then rejects the item, and updating the booking can report a false capacity clash. Allow the assigned item only when excluded_booking_id identifies its booking. Include that item in the capacity calculation, but exclude bookings and checkouts for items outside the resulting item pool. Return a 400 response when an update has a genuine booking clash. Test plan: 1. Create a booking assigned to a specific item. 2. Make the item unbookable and edit the booking. 3. Verify that the assigned item remains selected and its availability request succeeds. 4. Change the booking period and select Update. 5. Verify that the existing booking is updated and no duplicate is created. 6. Repeat the test after making the item's effective item type unbookable. 7. Verify that another unbookable item cannot be selected for the booking. 8. Create a conflicting booking for the assigned item and verify that the update is rejected as a booking clash. 9. Run: `prove -v t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Biblio/Availability/Booking.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/bookings.t` Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #180 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205554&action=edit Bug 41129: (QA follow-up) Disable the calendar when an availability refresh fails Guard against a stale, still-enabled calendar after an availability refresh call fails, and cover the guard with a test. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #181 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205555&action=edit Bug 41129: (QA follow-up) Restore Escape-to-close on the booking modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #182 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205556&action=edit Bug 41129: (QA follow-up) Add error_code to booking conflict/duplicate responses Surface a stable error_code on booking conflict/duplicate API responses, and assert it in the conflict tests. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #183 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205557&action=edit Bug 41129: (QA follow-up) Improve booking workflow diagnostics Log when the availability window is clamped and when a booking session opens without a biblionumber, to aid support diagnosis. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #184 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205558&action=edit Bug 41129: (QA follow-up) Add DST-transition coverage for booking date math Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #185 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205559&action=edit Bug 41129: (QA follow-up) Add a component spec for BookingDetailsStep Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #186 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205560 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205560&action=edit Bug 41129: (QA follow-up) Harden booking date/range utilities against invalid input Make addDays/addMonths fail loudly on invalid input instead of silently producing nonsense dates, and make rangeHasConflict return false for a null date range instead of throwing. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #187 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205561&action=edit Bug 41129: (QA follow-up) Remove dead code left over from earlier iterations Remove unused rangeState, dead event-dots calendar CSS, and correct check_booking's POD synopsis to include item_id. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #188 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205562&action=edit Bug 41129: (QA follow-up) Adopt the shared PatronSelect component in BookingPatronStep Replace BookingPatronStep's inline v-select patron search with the reusable PatronSelect component from bug 43518, removing the duplicated search/debounce/age-formatting logic. Test plan: 1. Open the booking modal, verify the patron step still searches, debounces, and displays age/library context as before. 2. Run: yarn cypress run --component --browser electron --spec 't/cypress/component/BookingPatronStep_spec.ts' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #189 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205563&action=edit Bug 41129: (QA follow-up) Rework calendar marker colours and block trail-conflicting start dates Give the trail-period marker its own colour, hide the marker-count grid and multi-marker tooltip mechanism (superseded later by an inline day-details panel), remove the marker dot grid entirely, and simplify the calendar's colour/legend model. Block start dates whose trail window would run into an existing booking - a start whose booking already puts its trail on a conflict has no valid end, so grey those days too. Known limitation: this can end up disabling almost every date under some configurations of long trail periods and dense bookings - not fixed here. Also keep the calendar hint visible with tighter step spacing, and only pre-paint the constrained booking range in end_date_only mode. Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #190 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205564&action=edit Bug 41129: (QA follow-up) Replace the floating booking tooltip with an inline day-details panel The floating, positioned tooltip was fragile (z-index/positioning inside a modal) and awkward for assistive tech. Replace it with an inline panel that updates in place as the pointer moves. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #191 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205565&action=edit Bug 41129: (QA follow-up) Restore richer calendar colours with hover-scoped adjacency, and rebalance the info panels Consolidate lead/trail colours and clarify the buffer legend, remove the muted baseline from non-adjacent lead/trail days, and only style booked/checked-out/holiday before hover - richer detail (adjacency, partial availability) now only appears in response to hovering, keeping the at-rest view calm. Merge Booked/Checked out into a single Unavailable state, scope booked/checked-out markers to the current selection, and add a partial-availability dot for days with a mix of free and booked items. Move the constraint-info summary next to the legend it explains, rebalance the two hover-feedback panels so each owns one job, and restore a dual lead/trail hover preview before a start date is chosen. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #192 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205566 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205566&action=edit Bug 41129: (QA follow-up) Fix the picker getting stuck open inside the modal Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #193 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205567 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205567&action=edit Bug 41129: (QA follow-up) Rework Unavailable-day rendering, gate clash colours, and fix junction shapes per the UX spec Make consecutive Unavailable days read as one contiguous strip rather than a row of separately-rounded pills, then stop rounding those runs entirely and fix the junction shapes between adjacent coloured segments so the bands read as smooth, continuous strips. Gate the clash colours on a genuine conflict, fix a wrong disabled-reason message caused by a stale maxPeriod, and size the existing-booking lead/trail band from leadDays rather than a per-item tag union. Rework colours, legend, and info panels per the UX spec: dock the legend inside flatpickr's own calendar, only highlight existing- booking lead/trail around Unavailable slots, fix month-nav arrows overlapping the legend, and show the same detail dot on Unavailable days as Partial ones. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #194 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205568 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205568&action=edit Bug 41129: (QA follow-up) Trial an always-visible, two-month booking calendar Proposed UX improvement on top of the rest of this follow-up series: replace the click-to-open, single-month popup with an always-visible, two-month inline calendar. Move the legend and hover panels out of flatpickr's own container, stop re-emitting an unchanged viewport on every date pick, keep the picker mounted under v-show, harden date-range selection against redraw churn, overlay the clear button, add a not-ready placeholder, reorder input/legend/calendar, fix the lead/trail hover highlight breaking at a month's last row, and style the hover-feedback bar and day-details panel as standard Bootstrap alerts. This is offered as a proposed improvement, not a required fix - the preceding commits stand on their own with the original single-month popup calendar. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #195 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205569&action=edit Bug 41129: (QA follow-up) Adapt the flatpickr helper and specs to the inline two-month calendar - Day selector: exclude the hidden overflow cells (.hidden) that showMonths > 1 renders for the neighbouring month, so a date near a month boundary matches one element - Select helpers: wait for the day to lose flatpickr-disabled before clicking; every day is disabled until availability has loaded, and a click on a disabled day is silently ignored - Wait for the item-specific availability after selecting an item: the picker stays enabled on the previous context's data meanwhile, and the redraw applying the new data wipes any hover preview set before - Rewrite the two tests expecting the calendar to close: it is inline now, Escape from a day returns focus to the input - Drop the runMode retries from bookingsModalBasic_spec.ts, which masked the disabled-day clicks Test plan: 1. cypress run --spec 't/cypress/integration/Circulation/bookingsModal*_spec.ts' Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #196 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205570&action=edit Bug 41129: (QA follow-up) Show a single month when the calendar has no room for two - BookingCalendar picks showMonths from its wrapper's width: two when two day grids fit, else one, so a phone-width modal no longer overflows; measured once after the first build, then from a ResizeObserver, rebuilding Flatpickr on the next frame when the count changes - Stretch .booking-date-picker so that width is the space available - Write BookingPeriodStep's render width on the next frame too, or the two observers trip the browser's ResizeObserver loop error - Load Flatpickr's stylesheet in the component harness, as calendar.inc does, so the grid has its real width there - Cover the single-month and resize cases in BookingCalendar_spec.ts Test plan: 1. yarn js:build; open the booking modal at ~440px width: one month; widen past ~620px of modal width: two months, selection kept 2. cypress run --component 3. cypress run --spec 't/cypress/integration/Circulation/bookingsModal*_spec.ts' Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #197 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205571&action=edit Bug 41129: (QA follow-up) Lay the calendar legend out as a grid sized to the calendar - One element per legend entry, laid out as a grid instead of a ragged flex row with an orphaned last entry - The legend takes the calendar's measured width (the same --booking-calendar-render-width the panels use) and centres with it: two content-sized columns per displayed month, spread edge to edge, the count passed from the picker's ready event as --booking-legend-columns - BookingPeriodStep.vue owns the legend layout; drop the duplicate flex rules and horizontal padding from BookingForm.vue Test plan: 1. yarn js:build; enable the calendar: legend as wide as the calendar, four columns edge to edge; at phone width one month, two columns 2. cypress run --component --spec t/cypress/component/BookingPeriodStep_spec.ts Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #198 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205572&action=edit Bug 41129: (QA follow-up) Remove the calendar drop shadow and clip highlight bands to the grid - Replace Flatpickr's popup drop shadow with a 1px border in the modal's neutral colour and its small radius, as the closed-days calendar (tools/holidays.pl) is embedded; report the border-box width so legend and panels line up with the border - Bands (selected, unavailable, lead, trail, clash and hover variants) bridge the ~5px cell gaps with a 5px box-shadow each side; at a row's ends the outward half spilled past the grid or into the next month. Hoist each state's colour into --booking-band, draw the shadow from one rule, and trim the outward half on row-end cells (nth-child 7n+1 and 7n+7) to the 2.5px that reach the grid edge - Assert the Saturday case in bookingsModalDatePicker_spec.ts Test plan: 1. yarn js:build; enable the calendar: no shadow, plain border, legend and panels as wide as the bordered calendar 2. With a booking spanning a weekend: the band runs to the grid edge on Saturday and from it on Sunday 3. cypress run --spec t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts 4. cypress run --component Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #199 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205573&action=edit Bug 41129: (QA follow-up) Consolidate on a single APIClient.circulation_rules client The Bug 42790/Bug 41129 patch conflict resolution left two API client entries pointing at the circulation-rules API client class: the pre-existing 'circRule' key (used by the Circulation Triggers admin store) and the new 'circulation_rules' key (used by the booking workflow adapters). Both resolved to the same client class, so the duplication served no purpose. Drop the 'circRule' key and switch its one remaining consumer (vue/stores/circulation-rules.js) over to 'circulation_rules'. No additions were needed on the client itself, as it already exposed everything both call sites required. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 --- Comment #200 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205593 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205593&action=edit Bug 41129: (QA follow-up) Use the shared patron formatter from bug 43518 Replace the booking store's local transformPatronData()/ transformPatronsData() with patronToOption() from vue/utils/patron-options.js (bug 43518), removing a duplicated, incomplete reimplementation of Koha's patron name formatting rules -- the local version only used firstname/surname and never considered preferred_name. Configured with { invertName: true, displayCardnumber: true }, matching the display convention already used by the legacy patron_autocomplete() dropdown for the same kind of search-result context. This is a small, deliberate display change: the booking patron search now shows "Surname, Preferred (cardnumber)" instead of "Surname Firstname (cardnumber)". For the overwhelming majority of patrons these are equivalent, since Koha::Patron->store() defaults preferred_name to firstname whenever it is not explicitly set. Test plan: 1. Apply on top of bug 43518. 2. Run: yarn cypress run --component --browser electron 3. Verify all specs pass, including the new t/cypress/component/stores/bookingsStoreData_spec.ts. 4. Open the booking modal, search for a patron, and confirm the dropdown still shows sensible name/cardnumber/age/library metadata. Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org