https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37707 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192009|0 |1 is obsolete| | --- Comment #50 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 192803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192803&action=edit Bug 37707: (follow-up) Refactor place_booking.js for maintainability Extract utility functions and reduce code duplication: - Add toInt(), startOfDay(), datesOverlap(), isDateInRange() helpers - Simplify containsAny() using Set and Array.some() - Refactor isItemAvailableForPeriod() to use new utilities - Refactor getAvailableItemsOnDate() and isDateDisabledForSpecificItem() - Extract submit handler helpers: getAvailableItemsForPeriod(), buildBookingPayload(), createTimelineItem(), showBookingError(), showBookingSuccess(), refreshBookingsTable(), setPickerDates() - Replace parseInt() calls with toInt() for consistency - Simplify modal reset handler with jQuery method chaining No functional changes - prepares codebase for future Vue conversion. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.