Remove school day hours from schedule templates
The day progress bar no longer uses day start/end times (it uses block durations instead), so the field is no longer needed. Removed from: Admin UI, schedule store, schedule model/schemas/router, session broadcast payload, dashboard snapshot, and startup migrations. DB columns are left in place (harmless, no migration required). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
c05543d855
commit
c565c94a23
9 files changed
+3
-93
No files matched your search
@@ -229,24 +229,6 @@
|
||||
|
||||
<!-- Block editor -->
|
||||
<div v-if="editingTemplate === template.id" class="block-editor">
|
||||
<!-- Day hours -->
|
||||
<div class="day-hours-row">
|
||||
<span class="day-hours-label">School day hours</span>
|
||||
<input
|
||||
type="time"
|
||||
:value="template.day_start_time ? template.day_start_time.slice(0,5) : ''"
|
||||
@change="e => saveDayHours(template, 'start', e.target.value)"
|
||||
placeholder="Start"
|
||||
/>
|
||||
<span class="day-hours-sep">to</span>
|
||||
<input
|
||||
type="time"
|
||||
:value="template.day_end_time ? template.day_end_time.slice(0,5) : ''"
|
||||
@change="e => saveDayHours(template, 'end', e.target.value)"
|
||||
placeholder="End"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="block-list">
|
||||
<template v-for="block in sortedBlocks(template.blocks)" :key="block.id">
|
||||
<!-- Edit mode -->
|
||||
@@ -661,13 +643,6 @@ async function deleteBlock(templateId, blockId) {
|
||||
await loadTemplates()
|
||||
}
|
||||
|
||||
async function saveDayHours(template, which, value) {
|
||||
const payload = which === 'start'
|
||||
? { day_start_time: value || null }
|
||||
: { day_end_time: value || null }
|
||||
await api.patch(`/api/schedules/${template.id}`, payload)
|
||||
await loadTemplates()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await childrenStore.fetchChildren()
|
||||
@@ -762,25 +737,6 @@ h2 { font-size: 1.1rem; color: #94a3b8; text-transform: uppercase; letter-spacin
|
||||
|
||||
.block-editor { margin-top: 1.25rem; border-top: 1px solid #334155; padding-top: 1.25rem; }
|
||||
|
||||
.day-hours-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
margin-bottom: 1rem;
|
||||
background: #0f172a;
|
||||
padding: 0.6rem 0.85rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.day-hours-label { font-size: 0.8rem; color: #64748b; flex: 1; }
|
||||
.day-hours-sep { font-size: 0.8rem; color: #475569; }
|
||||
.day-hours-row input[type="time"] {
|
||||
padding: 0.35rem 0.5rem;
|
||||
background: #1e293b;
|
||||
border: 1px solid #334155;
|
||||
border-radius: 0.4rem;
|
||||
color: #f1f5f9;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.block-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
|
||||
.block-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; background: #0f172a; border-radius: 0.5rem; }
|
||||
.block-time { font-size: 0.8rem; color: #64748b; font-variant-numeric: tabular-nums; }
|
||||
|
||||
Reference in new issue
Block a user