Add time-based day progress bar to dashboards
Replaces block-count progress with a wall-clock progress bar driven by configurable day start/end hours on each schedule template. - ScheduleTemplate: add day_start_time / day_end_time (TIME, nullable) - Startup migration: idempotent ALTER TABLE for existing DBs - Dashboard snapshot: includes day_start_time / day_end_time from template - Admin → Schedules: time pickers in block editor to set day hours - Dashboard view: time-based progress bar with start/current/end labels - TV view: full-width day progress strip between header and main content Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,8 @@ class ScheduleTemplate(TimestampMixin, Base):
|
||||
)
|
||||
name: Mapped[str] = mapped_column(String(100), nullable=False)
|
||||
is_default: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
day_start_time: Mapped[time | None] = mapped_column(Time, nullable=True)
|
||||
day_end_time: Mapped[time | None] = mapped_column(Time, nullable=True)
|
||||
|
||||
user: Mapped["User"] = relationship("User", back_populates="schedule_templates") # noqa: F821
|
||||
child: Mapped["Child | None"] = relationship("Child") # noqa: F821
|
||||
|
||||
Reference in New Issue
Block a user