Admin lessons list shows raw Slot ID instead of the lesson's date/time #47

Closed
opened 2026-07-05 18:51:36 +00:00 by thatguygriff · 0 comments
Owner

Problem

The Scheduler admin dashboard and instructor "My Lessons" pages (templates/admin/lessons.php, rows built in LessonController::row()) display a raw Slot ID column. The internal availability-slot database ID is meaningless to studio admins and instructors — the useful information is when the lesson happens.

Proposed change

  • Inject Availability\AvailabilityRepository into Booking\LessonController (wired in AdminMenu).
  • Look up each lesson's slot by slot_id and render the start/end window instead, e.g. Jul 6, 2026 9:00 AM–10:00 AM, using mysql2date('M j, Y g:i A', ...) (the project displays times in 12-hour AM/PM form).
  • Repeat the date on the end time only when a slot crosses midnight; show an em dash when the slot row no longer exists.
  • Replace the "Slot ID" column header with "Date/Time".

Tests

Unit tests under tests/Unit/Booking/ covering the admin dashboard, the instructor view, the midnight-crossing format, and the missing-slot fallback.

## Problem The Scheduler admin dashboard and instructor "My Lessons" pages (`templates/admin/lessons.php`, rows built in `LessonController::row()`) display a raw **Slot ID** column. The internal availability-slot database ID is meaningless to studio admins and instructors — the useful information is *when* the lesson happens. ## Proposed change - Inject `Availability\AvailabilityRepository` into `Booking\LessonController` (wired in `AdminMenu`). - Look up each lesson's slot by `slot_id` and render the start/end window instead, e.g. **Jul 6, 2026 9:00 AM–10:00 AM**, using `mysql2date('M j, Y g:i A', ...)` (the project displays times in 12-hour AM/PM form). - Repeat the date on the end time only when a slot crosses midnight; show an em dash when the slot row no longer exists. - Replace the "Slot ID" column header with "Date/Time". ## Tests Unit tests under `tests/Unit/Booking/` covering the admin dashboard, the instructor view, the midnight-crossing format, and the missing-slot fallback.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#47