Add Morning Routine to Admin and TV greeting state
Adds a per-user Morning Routine item list that appears in the TV dashboard Activities panel during the "Good Morning" countdown (before the first block starts). - morning_routine_items table (auto-created on startup) - CRUD API at /api/morning-routine (auth-required) - Items included in the public DashboardSnapshot so TV gets them without auth - Morning Routine section in Admin page (same add/edit/delete UX as subject options) - TV Activities column shows routine items when no block is active, switches to subject options once a block starts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,22 +59,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Center: subject options -->
|
||||
<div class="tv-options-col" :style="{ background: currentSubjectColor + '22', borderColor: currentSubjectColor }">
|
||||
<!-- Center: subject options or morning routine -->
|
||||
<div
|
||||
class="tv-options-col"
|
||||
:style="scheduleStore.currentBlock
|
||||
? { background: currentSubjectColor + '22', borderColor: currentSubjectColor }
|
||||
: { background: '#1e293b', borderColor: '#334155' }"
|
||||
>
|
||||
<div class="tv-options-title">Activities</div>
|
||||
<div
|
||||
v-if="currentSubjectOptions.length"
|
||||
class="tv-options-list"
|
||||
>
|
||||
<div
|
||||
v-for="opt in currentSubjectOptions"
|
||||
:key="opt.id"
|
||||
class="tv-option-item"
|
||||
>
|
||||
{{ opt.text }}
|
||||
<!-- Morning routine during greeting state -->
|
||||
<template v-if="!scheduleStore.currentBlock">
|
||||
<div v-if="scheduleStore.morningRoutine.length" class="tv-options-list">
|
||||
<div v-for="(item, i) in scheduleStore.morningRoutine" :key="i" class="tv-option-item">
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="tv-options-empty">No activities listed for this subject.</div>
|
||||
<div v-else class="tv-options-empty">No morning routine items added yet.</div>
|
||||
</template>
|
||||
<!-- Subject options during active block -->
|
||||
<template v-else>
|
||||
<div v-if="currentSubjectOptions.length" class="tv-options-list">
|
||||
<div v-for="opt in currentSubjectOptions" :key="opt.id" class="tv-option-item">
|
||||
{{ opt.text }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="tv-options-empty">No activities listed for this subject.</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Right: schedule list -->
|
||||
|
||||
Reference in New Issue
Block a user