Show booked lesson info on upcoming lists and add admin booking detail #104

Merged
thatguygriff merged 1 commits from feature/lesson-booking-detail into main 2026-07-24 14:12:33 +00:00
Owner

Front end — student "Upcoming lessons"

  • Each upcoming lesson now shows the booked offering's name and length next to its date/time (not just when it is).
  • Only the soonest five lessons render, with a "Show all N lessons" reveal for the rest.
  • GET /bookings now returns offering_title and duration_minutes, so the list needs no extra request.

Admin — Scheduler & My Lessons

  • Both the week and list views show the booked offering's name.
  • Each lesson links (?lesson_id=) to a new detail view showing the offering, time, status, notes, the policy versions the student accepted (with acceptance time and IP), and their intake-question answers.
  • On My Lessons an instructor may only open their own lessons; the studio Scheduler may open any.

Implementation

  • Booking\LessonDetail (new) presenter for a single lesson's answers + acceptances; template templates/admin/lesson-detail.php.
  • LessonController::maybeRenderDetail() handles the routing/permission check; rows gain the offering, duration, recurrence, and lesson id.
  • BookingEndpoint::lessonWithTimes() includes the offering name/length.

Tests

  • New tests/Unit/Booking/LessonDetailTest.php; added cases to LessonControllerTest (offering shown, detail routing, cross-instructor access blocked) and BookingEndpointTest (offering name in myLessons).
  • composer test (519 passing), composer lint, and composer cs all pass.

🤖 Generated with Claude Code

## Front end — student "Upcoming lessons" - Each upcoming lesson now shows the **booked offering's name and length** next to its date/time (not just when it is). - Only the **soonest five** lessons render, with a **"Show all N lessons"** reveal for the rest. - `GET /bookings` now returns `offering_title` and `duration_minutes`, so the list needs no extra request. ## Admin — Scheduler & My Lessons - Both the **week** and **list** views show the booked offering's name. - Each lesson links (`?lesson_id=`) to a new **detail view** showing the offering, time, status, notes, the **policy versions the student accepted** (with acceptance time and IP), and their **intake-question answers**. - On **My Lessons** an instructor may only open their own lessons; the studio **Scheduler** may open any. ## Implementation - `Booking\LessonDetail` (new) presenter for a single lesson's answers + acceptances; template `templates/admin/lesson-detail.php`. - `LessonController::maybeRenderDetail()` handles the routing/permission check; rows gain the offering, duration, recurrence, and lesson id. - `BookingEndpoint::lessonWithTimes()` includes the offering name/length. ## Tests - New `tests/Unit/Booking/LessonDetailTest.php`; added cases to `LessonControllerTest` (offering shown, detail routing, cross-instructor access blocked) and `BookingEndpointTest` (offering name in `myLessons`). - `composer test` (519 passing), `composer lint`, and `composer cs` all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thatguygriff added 1 commit 2026-07-24 14:07:51 +00:00
Show booked lesson info on upcoming lists and add admin booking detail
CI / Tests (PHP 8.1) (pull_request) Successful in 46s
CI / Coding Standards (pull_request) Successful in 2m53s
CI / Tests (PHP 8.2) (pull_request) Successful in 44s
CI / No Debug Code (pull_request) Successful in 3s
CI / PHPStan (pull_request) Successful in 3m12s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m36s
CI / Build Plugin Zip (pull_request) Skipped
32619a1b75
Front end: the student "upcoming lessons" panel now shows each booked
offering's name and length next to the time, and renders only the soonest
five lessons with a "Show all" reveal. GET /bookings returns offering_title
and duration_minutes so the list needs no extra request.

Admin: the Scheduler and My Lessons week/list views now show the booked
offering, and each lesson links to a detail view showing the policy versions
the student accepted (with acceptance time and IP) and their intake answers.
On My Lessons an instructor may only open their own lessons; the studio
Scheduler may open any.

composer test / composer lint / composer cs all pass.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
thatguygriff merged commit 36e7178158 into main 2026-07-24 14:12:33 +00:00
thatguygriff deleted branch feature/lesson-booking-detail 2026-07-24 14:12:33 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#104