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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user