Booking page shows availability windows as single giant slots; add weekly calendar views and 12-hour times #49

Closed
opened 2026-07-05 19:01:38 +00:00 by thatguygriff · 0 comments
Owner

Bugs

1. Availability windows are served as one giant bookable slot.
An instructor window of 2026-07-06 09:0016:00 with 60-minute lessons shows to students as a single "09:00–16:00 (60 min)" entry, and booking it consumes the entire day. Students should be able to book any open 60-minute block in the range.

2. Past and multi-day windows leak into the booking page.
A window of 2026-06-01 19:522026-06-30 19:52 rendered as a nonsense "19:52–19:52 (60 min)" block under a date that had already passed. GET /availability did not filter out slots whose start had passed, and nothing prevented windows spanning multiple days.

3. Times display in 24-hour form.
All views (student booking page, wp-admin availability/lesson lists, editor previews) should use a 12-hour clock with AM/PM.

Feature

Both the student booking page and the instructor My Availability page should offer a weekly calendar view in addition to the list view, with previous/next-week navigation that honours the site's start_of_week setting.

Proposed fix

  • Split windows into consecutive lesson-length slots on save (REST + admin form); weekly recurrence creates a series per chunk so a weekly reservation holds the same hour each week
  • Reject multi-day windows and windows shorter than the lesson length (400 invalid_window)
  • Floor GET /availability results at the current time
  • Version-gated data migration that rewrites existing oversized same-day windows into lesson-length rows
  • 12-hour AM/PM formatting everywhere times render
  • List | Week toggle on both booking and availability views (shared WeekCalendar helper)
## Bugs **1. Availability windows are served as one giant bookable slot.** An instructor window of `2026-07-06 09:00` – `16:00` with 60-minute lessons shows to students as a single "09:00–16:00 (60 min)" entry, and booking it consumes the entire day. Students should be able to book any open 60-minute block in the range. **2. Past and multi-day windows leak into the booking page.** A window of `2026-06-01 19:52` – `2026-06-30 19:52` rendered as a nonsense "19:52–19:52 (60 min)" block under a date that had already passed. `GET /availability` did not filter out slots whose start had passed, and nothing prevented windows spanning multiple days. **3. Times display in 24-hour form.** All views (student booking page, wp-admin availability/lesson lists, editor previews) should use a 12-hour clock with AM/PM. ## Feature Both the student booking page and the instructor **My Availability** page should offer a **weekly calendar view** in addition to the list view, with previous/next-week navigation that honours the site's `start_of_week` setting. ## Proposed fix - Split windows into consecutive lesson-length slots on save (REST + admin form); weekly recurrence creates a series per chunk so a weekly reservation holds the same hour each week - Reject multi-day windows and windows shorter than the lesson length (`400 invalid_window`) - Floor `GET /availability` results at the current time - Version-gated data migration that rewrites existing oversized same-day windows into lesson-length rows - 12-hour AM/PM formatting everywhere times render - List | Week toggle on both booking and availability views (shared `WeekCalendar` helper)
thatguygriff added the bugenhancement labels 2026-07-05 19:01:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#49