Add subject options and redesign TV dashboard layout

Subject options:
- New subject_options table (auto-created on startup)
- SubjectOut now includes options list; all eager-loading chains updated
- Admin: Options panel per subject with add, inline edit, and delete
- WS broadcast and dashboard API include options in block subject data

TV dashboard:
- Three equal columns: Timer | Activities | Schedule
- Activities column shows current subject's options in large readable text
- Activities area has subject-colored border and tinted background
- Subject name and label displayed correctly using embedded subject data

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 11:18:55 -08:00
parent c12f07daa3
commit c9441a9c9a
11 changed files with 375 additions and 51 deletions

View File

@@ -1,6 +1,23 @@
from pydantic import BaseModel
class SubjectOptionCreate(BaseModel):
text: str
order_index: int = 0
class SubjectOptionUpdate(BaseModel):
text: str | None = None
class SubjectOptionOut(BaseModel):
id: int
text: str
order_index: int
model_config = {"from_attributes": True}
class SubjectCreate(BaseModel):
name: str
color: str = "#10B981"
@@ -20,5 +37,6 @@ class SubjectOut(BaseModel):
color: str
icon: str
is_active: bool
options: list[SubjectOptionOut] = []
model_config = {"from_attributes": True}