From a901bbae928f64c774bce9481ef2b8ac187b6df8 Mon Sep 17 00:00:00 2001 From: diogotvf7 Date: Sat, 10 Feb 2024 16:41:48 +0000 Subject: [PATCH 01/79] New types file --- src/@types/new_index.d.ts | 106 +++++++++++++++++++++++++++++++ src/pages/TimeTableScheduler.tsx | 3 + 2 files changed, 109 insertions(+) create mode 100644 src/@types/new_index.d.ts diff --git a/src/@types/new_index.d.ts b/src/@types/new_index.d.ts new file mode 100644 index 00000000..ff8a9b26 --- /dev/null +++ b/src/@types/new_index.d.ts @@ -0,0 +1,106 @@ +enum lesson_type { + T = "T", + TP = "TP", + P = "P", + PL = "PL", + OT = "OT", + O = "O", + E = "E" +} + +/* Majors */ +export type Major = { + id: number // passa a ser o sigarra_id + faculty: number + acronym: string + name: string + url: string + // year: number // remover ?? +} + +// selected_major = { +// id: number +// } // FICA APENAS COMO STATE (não é um type) + +export type CourseInfo = { + id: number // passa a ser o sigarra_id + course_unit_year: number + ects: number, + acronym: string, + name: string, + url: string, + // last_updated: string, // remover ?? + // semester: number, // remover ?? + // year: number // remover ?? +} + +// selected_courses = CourseInfo[] // FICA APENAS COMO STATE (não é um type) + +export type CourseOption = { + course_id: number, + locked: boolean, + filteredTeachers: Array, + hide: Array, +} + +export type Option = { + id: number, + icon: string, + name: string, + course_option: Array +} + +export type MultipleOptions = Array