feat(frontend): ScheduleConfig V2 types, weekday schema, export update

This commit is contained in:
2026-03-17 14:39:19 +01:00
parent 20e80ac28e
commit bd498b9bcb
8 changed files with 63 additions and 10 deletions

View File

@@ -91,8 +91,35 @@ export interface ProgrammingBlock {
access_password?: string;
}
export type Weekday =
| 'monday' | 'tuesday' | 'wednesday' | 'thursday'
| 'friday' | 'saturday' | 'sunday'
export const WEEKDAYS: Weekday[] = [
'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday',
]
export const WEEKDAY_LABELS: Record<Weekday, string> = {
monday: 'Mon', tuesday: 'Tue', wednesday: 'Wed', thursday: 'Thu',
friday: 'Fri', saturday: 'Sat', sunday: 'Sun',
}
export interface ScheduleConfig {
blocks: ProgrammingBlock[];
day_blocks: Record<Weekday, ProgrammingBlock[]>
}
export interface ConfigSnapshot {
id: string
version_num: number
label: string | null
created_at: string
}
export interface ScheduleHistoryEntry {
id: string
generation: number
valid_from: string
valid_until: string
}
// Config