feat(dashboard): show mini timetable strip per teacher in assign modal#111
Merged
guangshinhaha merged 1 commit intoApr 27, 2026
Merged
Conversation
Every school interviewed said they want to see a teacher's daily schedule before assigning relief — the #1 confidence gap in the current UX. This adds a compact horizontal strip below each candidate's name in the assign modal showing their full-day timetable at a glance. Visual: colored blocks per period - Blue = teaching (hover shows subject + class) - Amber-light = already covering another relief slot - Orange/highlighted = the period being assigned (ring indicator) - Gray = free period Data pipeline: - API: enriched allEntriesForDay query with className/subject/period number; new schoolPeriods query; buildDaySchedule() helper combines timetable + existing relief into per-teacher schedule - Types: new TeacherPeriodSlot type, daySchedule field on AvailableTeacher in both DashboardContent and AssignReliefModal - Modal: inline strip rendered with flex blocks, hover tooltips, and ring indicator on the target period Scannable in < 2 seconds as KPs work at 6:45am. Closes #67 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
effb76b
into
feat/fix-back-to-back-consecutive
2 checks passed
4 tasks
This was referenced Apr 27, 2026
9 tasks
guangshinhaha
added a commit
that referenced
this pull request
Apr 30, 2026
…ional gauge (#145) The previous mini-strip (PR #111) crammed every period into an equal-width flex-1 block with no labels and no time anchors, so admins couldn't tell which period was which without hovering — and the target slot's amber treatment competed with the relief amber. The PR also shipped without visual verification. Redesign: - Periods are now positioned + sized proportionally to their actual minutes, so a 60-min lesson is visibly wider than a 30-min one and recess gaps appear as gaps, not absorbed. - A single shared hour-tick gauge sits above the teacher list (24h ticks aligned to every strip below) with an inline legend. - Target slot is a faint primary-tinted highlight column, not a colored block — every listed teacher is free at the target slot by construction, so coloring it was redundant. The column anchors the eye to *where* in the day the absent slot sits. - Strip moved to its own line under the row header so periods get the full row width instead of being squeezed next to the badge. Plumbing: Period.startTime/endTime are now selected on the dashboard route and threaded through buildTeacherDaySchedule into each TeacherPeriodSlot as startMinute/endMinute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a compact horizontal timetable strip below each candidate teacher's name in the relief assignment modal. Shows the teacher's full-day schedule at a glance:
Scannable in < 2 seconds — designed for KPs working at 6:45am.
Stacked on #110 (fix back-to-back).
Changes
src/app/api/dashboard/route.tsallEntriesForDaywith className/subject/period; addedschoolPeriodsquery;buildDaySchedule()helperDashboardContent.tsxTeacherPeriodSlottype,dayScheduleonAvailableTeacherAssignReliefModal.tsxResearch evidence
All 3 schools flagged this as the #1 confidence gap — "I need to see if the teacher is already loaded before assigning."
Closes #67
Test plan
npm test— 278 tests passnpm run build— 45/45 static pages, zero errors🤖 Generated with Claude Code