v2 Admin Spec — Scheduling

Scheduling

Domain 5 of the Enhanced Candidate A navigation structure. Contains: Calendar View, Live Sessions, Upcoming Appointments, TA Schedules, Holidays, One-to-One Appointment Usability (NEW in v2). Primary workflow served: WF5 (Scheduling — reduced from 4-6 screens to 1-2 screens) Key new screen (v1): Calendar View — unified calendar showing all live sessions and 1:1 appointments across all TAs Key new screen (v2): One-to-One Appointment Usability — gender-split slot fill rates and underutilization tracking (§7)


1. Domain Overview

Scheduling groups all time-based events: live sessions and 1:1 appointments. Previously these were split between Program (Live Sessions) and Appointments (Upcoming, TA Schedules, Holidays). In Enhanced Candidate A, they're unified under one domain with a new Calendar View providing the unified overview the admin requested (Interview: "Calendar view of all live sessions and 1:1 appointments across all TAs, filterable by gender").

Key changes (v1):

Key changes (v2):


2. Screen: Calendar View

2.1 Purpose

Unified visual calendar of all live sessions and 1:1 appointments across all TAs. Addresses interview request for "calendar view filterable by gender."

2.2 Entry Points

2.3 Layout

Calendar grid with filter bar above. Supports week view (default) and month view toggle.

2.4 Data Displayed

Events on calendar:

Event Type Source Display Color
Live Session live_sessions table Time block with session title, level badge, teacher initials Blue
Live Session — Needs Replacement [v2] live_sessions where assigned teacher is on personal break Time block with warning badge "Needs Replacement" overlay Blue + amber border
1:1 Appointment appointments table Time block with student name, TA name Green
Cancelled appointments / live_sessions with cancelled status Strikethrough, faded Gray
Rescheduled appointments where re_schedule=1 Original time shown faded, new time highlighted Orange
Inactive [v2] live_sessions where active=0 Dashed border, faded Gray

2.5 Filters

Filter Options Default
View Week / Month Week
TA All TAs / specific TA All
Gender All / Male / Female All (filters by TA gender; appointment gender filter scope TBD — see §2.9)
Level All / Level 0-4 / Year 2 All
Event Type All / Live Sessions / Appointments All
Needs Replacement [v2] All / Only sessions needing replacement All

2.6 Actions

Action Trigger Permission Behavior
Create Live Session "+" button on time slot or "New Session" Admin Opens create session modal (see §3.6)
Create Appointment Click empty TA slot Admin Opens create appointment modal
View/Edit Event Click existing event Admin (edit), All (view) Opens event detail modal
Cancel Session [v2] "Cancel" in event detail modal for live session Admin Destructive confirmation with cancellation-reason template picker + optional "send message" toggle (see §8)
Mark Session Inactive [v2] "Mark Inactive" in event detail modal Admin Toggles live_sessions.active=0; confirmation prompt; event renders as Inactive on calendar
Reassign Session [v2] "Reassign" in event detail modal for live session Admin Modal: select new teacher from TA list (filtered by level + gender); confirmation; clears Needs Replacement flag if it was set
Cancel Appointment [v2] "Cancel" in event detail modal for appointment Admin Destructive confirmation with cancellation-reason template picker + optional "send message" toggle
Reschedule Appointment [v2] "Reschedule" in event detail modal for appointment Admin Opens reschedule modal (see §4.6)
Navigate Weeks ◀ ▶ arrows All Shifts week/month view
Today "Today" button All Returns to current week/month
Export "Export" button Admin Exports visible events as CSV

2.7 States

State Display
Has events Calendar with color-coded events
Empty week Calendar grid with no events. "No sessions or appointments this week."
Loading Skeleton calendar grid
Error "Unable to load schedule data." + Retry

2.8 Role Visibility

2.9 TBDs [v2]


3. Screen: Live Sessions

3.1 Purpose

Schedule group learning sessions. Relocated from Program > Live Sessions.

3.2 Entry Points

3.3 Layout

Filter bar + data table with primary actions (Create, Bulk Add) above.

3.4 Key Changes from Current

v2 additions:

3.5 Data Displayed

Column Source Sortable
Session Title live_sessions.title Yes
Date/Time live_sessions.date (first occurrence shown for recurring) Yes
Recurrence [v2] Derived: "Weekly", "One-time", "Custom range" Yes
Level level assignment Yes
Teacher [v2] live_sessions.teacher_idusers.name Yes
Semester semester scope Yes
Status active / inactive / completed / cancelled Yes
Needs Replacement [v2] Boolean flag — amber badge when true Yes

3.6 Create / Edit Session Form [v2 — expanded]

Fields:

Field Type Required Notes
Session Title text Yes Preserved from v1
Level select (Level 0-4, Year 2, or All) Yes "All" triggers auto-create one session per level (preserved from v1)
Teacher [v2] select (TAs filtered by level + gender) Yes New in v2; stakeholder said "the session teacher" is required
Zoom Link url Yes Preserved from v1
Recurrence [v2] radio: Weekly (semester-bound) / Single date / Custom range Yes Default: Weekly
Start Date [v2] date picker Yes when Weekly or Custom range Default: semester start
End Date [v2] date picker Optional (Weekly) / Yes (Custom range) Default: semester end; override supported
Session Date [v2] date picker Yes when Single date Hides Start/End fields
Day of Week [v2] select (Mon-Sun) Yes when Weekly or Custom range Hidden for Single date
Time time picker Yes Preserved from v1
Duration number (minutes) Yes Preserved from v1

Recurrence semantics:

3.7 Actions

Action Trigger Permission Behavior
Create Session "Create Session" button Admin Opens create modal (§3.6)
Bulk Add Sessions [v2] "Bulk Add" button Admin Opens bulk-add modal (§3.8)
Edit Row dropdown → Edit Admin Opens edit modal (same form as create)
Cancel Session [v2] Row dropdown → Cancel Admin Destructive confirmation with cancellation-reason template picker + "send message" toggle (see §8)
Mark Inactive [v2] Row dropdown → Mark Inactive Admin Toggles active=0; row renders as Inactive
Reassign Session [v2] Row dropdown → Reassign Admin Modal: select new teacher; clears Needs Replacement flag
Delete Row dropdown → Delete Admin Destructive confirmation; hard delete (preserved from v1)

3.8 Bulk Add Sessions Modal [v2 — NEW]

Purpose: Create multiple live sessions sharing the same title but differing by time/day/teacher (stakeholder example: "bulk add Sisters' QRCs... just keep adding different... times and days").

Layout: Dialog with shared header fields + repeatable row grid + "Add Row" button.

Shared fields (applied to all rows):

Per-row fields:

Actions:

TBD: UX pattern for error recovery if some rows are valid and others invalid — fail-all vs. create-valid-and-flag-invalid. Default assumption: fail-all with inline validation errors.

3.9 States

Standard (loaded, empty: "No live sessions for this semester.", loading, error)

3.10 Role Visibility

Admin: Full CRUD + bulk add + cancel/inactive/reassign. View-Only: View only. TA: Hidden from nav (sees events on Calendar/My Schedule).


4. Screen: Upcoming Appointments

4.1 Purpose

View and manage scheduled 1:1 sessions. Relocated from Appointments > Upcoming Appointments.

4.2 Entry Points

4.3 Layout

Filter bar + data table

4.4 Data Displayed

Column Source Sortable
Date/Time appointments.apt_time Yes
Student student name via enrollment Yes
TA users.name via appointments.ta_id Yes
Group group_name.name via appointments.group_id Yes
Status Derived (upcoming/completed/cancelled/rescheduled/no-show) Yes
Rescheduled To appointments.new_apt_time No

4.5 Filters [v2 — expanded]

Filter Options Default
Search Student or TA name
Status All / Upcoming / Completed / Cancelled / Rescheduled / No-Show All
TA All TAs / specific TA All
Date Range [v2] Single date or date range picker (none)

4.6 Existing Capabilities (preserved from v1)

4.7 Actions

Action Trigger Permission Behavior
Create Group Appointment "Create" button Admin Modal: select group, date, TA
Create Individual Appointment "Add Student Appointment" button Admin Modal: search student, select date, TA
Cancel Cancel icon on row Admin Destructive confirmation with cancellation-reason template picker + "send message" toggle [v2] (see §8)
Reschedule [v2] "Reschedule" icon on row Admin Opens Reschedule modal: current date/time shown, pick new date/time, optional "notify student" toggle; sets appointments.re_schedule=1 and new_apt_time
View Student Student name click All → Student Detail Page
View in Calendar "Calendar" link All → Calendar View filtered to this TA/date

4.8 States

Standard list states

4.9 Role Visibility


5. Screen: TA Schedules

5.1 Purpose

Configure when TAs are available for 1:1 booking. Relocated from Appointments > TA Schedules.

5.2 Entry Points

5.3 Layout

TA selector + weekly availability grid + Personal Holidays card + Bulk-Add drawer [v2].

5.4 Data Displayed

Field Source
TA Name Selected TA
Timezone users.timezone for selected TA
Weekly Grid Days × time slots with available/unavailable indicators
Slot Date Bounds [v2] Per-slot valid_from / valid_to dates (semester start/end default)
TA Holidays Personal holidays for this TA

5.5 Slot Date Bounds [v2 — NEW]

Each availability slot in the weekly grid carries a valid_from and valid_to date, defaulting to the selected semester's start and end. Admins can override per-slot via the slot detail popover:

Rationale: Stakeholder said "a weekday from and to date... defining a start date and end date." Enables mid-semester schedule changes (e.g., "TA is only available Mondays for the first 4 weeks, then switches to Tuesdays").

5.6 Existing Capabilities (preserved from v1)

5.7 Actions

Action Trigger Permission
Select TA TA dropdown Admin
Toggle Slot Click time slot Admin
Edit Slot Date Bounds [v2] Click slot → popover date pickers Admin
Set Timezone Timezone dropdown Admin
Add TA Holiday "Add Holiday" button on Personal Holidays card Admin
Bulk Add Slots [v2] "Bulk Add Slots" button Admin
Clone Schedule "Clone to [New Semester]" button Admin — copies this TA's schedule to next semester (preserved from v1)

5.8 Bulk Add Slots Modal [v2 — NEW]

Purpose: Add multiple appointment slots for the currently selected TA in one go (stakeholder: "bulk add... multiple appointment slots in one go, just keeping the same TA by just adding different time slots").

Layout: Dialog with shared header (TA name read-only, semester context) + repeatable row grid + "Add Row" button.

Per-row fields:

Actions:

TBD: Conflict-resolution UX when a bulk row overlaps an existing slot — skip, overwrite, or error. Default assumption: error with inline warning, admin must remove conflicting row.

5.9 States

5.10 Role Visibility


6. Screen: Holidays

6.1 Purpose

Define system-wide non-working days. Merged: system holidays (from Appointments > Holidays) + live session holidays (from dissolved Students Management grab-bag #14).

6.2 Entry Points

6.3 Layout

Calendar view or list view (toggle)

6.4 Data Displayed

Column Source
Holiday Name holiday title
Date holiday date
Type (NEW) System-wide / Live Sessions only / Appointments only
Affects What this holiday blocks (all sessions, appointments only, etc.)

6.5 Key Change from Current

6.6 Existing Capabilities (preserved)

6.7 Actions

Action Trigger Permission
Add Holiday "Add Holiday" button Admin
Edit Edit icon Admin
Remove Delete icon Admin (destructive)

6.8 States

Standard (loaded, empty: "No holidays configured.", loading, error)

6.9 Role Visibility

Admin: Full CRUD. View-Only: View only. TA: Hidden.

6.10 Cross-Reference with Needs Replacement Flag [v2]

While this screen covers system-wide holidays, TA personal breaks are still managed in TA Schedules §5 (Personal Holidays card). When a TA personal break is added, any live session assigned to that TA during the break period is automatically flagged "Needs Replacement" on Live Sessions (§3) and Calendar View (§2). The flag clears automatically when the session is reassigned via the Reassign Session action.

TBD (from Framework v2): Whether Needs Replacement flagging is fully automatic, manual-only, or both.


7. Screen: One-to-One Appointment Usability [v2 — NEW]

7.1 Purpose

Dashboard showing 1:1 appointment slot utilization across TAs, segmented by gender, with week-by-week underutilization visibility. Enables admins to identify and remove chronically unfilled slots. Stakeholder description (ramblings line 232): "Show utilization by gender... Week-by-week underutilized slots... Remove slot from calendar button."

7.2 Entry Points

7.3 Layout

Three-section layout:

  1. Top: Summary metrics strip — overall fill rate, sisters' fill rate, brothers' fill rate (for current semester)
  2. Middle: Gender-split slot fill rate panel — side-by-side stacked bars or cards per gender showing filled / unfilled / cancelled slot counts and percentages
  3. Bottom: Underutilized slots table — week-by-week breakdown of slots below a fill-rate threshold, with inline Remove Slot action

7.4 Data Displayed

Summary metrics (top strip):

Metric Computation
Overall Fill Rate (filled appointments / available slots) × 100 for current semester
Sisters' Fill Rate Same, scoped to female TAs' slots
Brothers' Fill Rate Same, scoped to male TAs' slots
Total Slots Available Count of active slots in date range
Total Appointments Booked Count of non-cancelled appointments in date range

Gender-split panel (middle):

Metric Sisters Brothers
Slots Available count count
Slots Filled count + % count + %
Slots Unfilled count + % count + %
Avg Weekly Fill Rate % %

Underutilized slots table (bottom):

Column Source Notes
TA users.name Links to TA Detail
Gender users.gender Badge
Day/Time slot definition e.g., "Mon 3:00–4:00 PM"
Weeks Observed count of weeks in filter range
Weeks Filled count of weeks with a booking
Fill Rate % Red badge if < threshold
Trend sparkline (week-by-week fill 1/0) Visual indicator

7.5 Filters

Filter Options Default
Semester current / past semesters Current
Date Range single week / month / semester / custom Semester
Gender All / Sisters / Brothers All
TA All / specific TA All
Fill Rate Threshold < 25% / < 50% / < 75% < 50%

7.6 Actions

Action Trigger Permission Behavior
Remove Slot Row action in underutilized table Admin Destructive confirmation: "Remove [Day/Time] slot for [TA]? This deletes the recurring slot from [TA]'s schedule. Existing bookings will not be affected." On confirm, deletes the slot from TA Schedules; toast "Slot removed"
View TA Schedule TA name click Admin → TA Schedules §5 pre-filtered to this TA
View in Calendar Row → Calendar icon All → Calendar View §2 filtered to this TA/slot
Export Report "Export" button Admin CSV export of underutilized slots table
Set Threshold Threshold filter All Re-computes underutilized table

7.7 States

State Display
Has data Metrics strip + panel + underutilized table
No underutilized slots Metrics strip + panel + "No slots below [threshold] in this range. Nice work."
Loading Skeleton metrics + skeleton bars + skeleton table
Error "Unable to load utilization data." + Retry
No slots configured "No appointment slots configured for this semester. Configure in TA Schedules."

7.8 Role Visibility

7.9 TBDs


8. Cancellation Reason Templates [v2 — NEW — cross-cutting]

8.1 Purpose

Stakeholder described needing to "send a message or an email... make different templates for the reason why we cancelled... select from the template and send it." Applies to both live session cancels (Calendar View §2.6, Live Sessions §3.7) and appointment cancels (Calendar View §2.6, Upcoming Appointments §4.7).

8.2 Template Management

8.3 Cancel Flow Integration

When Cancel is triggered on a live session or appointment:

  1. Destructive confirmation dialog with:

    • Summary of the event being cancelled
    • "Cancellation Reason" select (dropdown of templates filtered by event type, plus "No template / custom" option)
    • "Send message to student(s)" toggle (default: ON)
    • If template selected: preview pane showing rendered message with merge tags filled
    • If "No template / custom": free-text area for one-off message
    • "Cancel Event" (destructive) / "Keep Event" buttons
  2. On confirm:

    • Event marked cancelled
    • If "Send message" ON: message sent to affected student(s) via their preferred channel (email/push — TBD, resolved in Communication domain)
    • Toast confirms "Event cancelled" + "Message sent to N recipient(s)" if applicable

8.4 TBDs


9. Cross-Domain Integration Points