feat(frontend): ScheduleConfig V2 types, weekday schema, export update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user