feat: Added viewer
This commit is contained in:
49
viewer/lib/types.ts
Normal file
49
viewer/lib/types.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
export interface TeacherReference {
|
||||
name: string;
|
||||
code: string;
|
||||
}
|
||||
|
||||
export type AbsenceEntry =
|
||||
| { type: 'wholeDay'; teacher: string; teacherCode: string }
|
||||
| { type: 'single'; teacher: string; teacherCode: string; hours: string }
|
||||
| { type: 'range'; teacher: string; teacherCode: string; hours: { from: string; to: string } }
|
||||
| { type: 'exkurze'; teacher: string; teacherCode: string }
|
||||
| { type: 'zastoupen'; teacher: string; teacherCode: string; zastupuje: { teacher: string | null } }
|
||||
| { type: 'invalid'; original: string; teacher?: null; teacherCode?: null };
|
||||
|
||||
export interface ChangeEntry {
|
||||
text: string;
|
||||
backgroundColor?: string | null;
|
||||
foregroundColor?: string | null;
|
||||
}
|
||||
|
||||
export interface SubstitutionDayData {
|
||||
info: { inWork: boolean };
|
||||
takesPlace: string;
|
||||
changes: Record<string, (ChangeEntry | null)[]>;
|
||||
absence: AbsenceEntry[];
|
||||
}
|
||||
|
||||
export interface SubstitutionData {
|
||||
status: {
|
||||
currentUpdateSchedule: number;
|
||||
lastUpdated: string;
|
||||
}
|
||||
schedule: Record<string, SubstitutionDayData>;
|
||||
}
|
||||
|
||||
export interface Hour {
|
||||
subject: string;
|
||||
title: string;
|
||||
teacher: {
|
||||
code: string;
|
||||
name: string;
|
||||
}
|
||||
group?: string;
|
||||
room: string;
|
||||
}
|
||||
|
||||
export interface LocalData {
|
||||
class: string;
|
||||
timetable: Hour[][][];
|
||||
}
|
||||
Reference in New Issue
Block a user