Add break time feature to schedule blocks
- Admin: per-block "Break Time" checkbox + duration (min) setting; new Break Activities section (global list, same pattern as Morning Routine) - Dashboard: break timer section appears on blocks with break enabled; Start/Pause/Resume/Reset controls work independently of the main timer - TV: left column switches to amber break badge + countdown during break; center column shows configurable Break Activities list - Backend: break_time_enabled/break_time_minutes columns on schedule_blocks (auto-migrated on startup); break_activity_items table + CRUD router; break timer events (break_start/pause/resume/reset) stored as TimerEvents and broadcast via WebSocket; break_activities included in dashboard snapshot and session_update broadcast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,8 @@ class ScheduleBlock(Base):
|
||||
label: Mapped[str | None] = mapped_column(String(100), nullable=True) # override subject name
|
||||
notes: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
order_index: Mapped[int] = mapped_column(Integer, default=0)
|
||||
break_time_enabled: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
break_time_minutes: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
|
||||
template: Mapped["ScheduleTemplate"] = relationship("ScheduleTemplate", back_populates="blocks")
|
||||
subject: Mapped["Subject | None"] = relationship("Subject", back_populates="schedule_blocks") # noqa: F821
|
||||
|
||||
Reference in New Issue
Block a user