2023-07-03 16:18:39 +08:00
|
|
|
export interface IconProps {
|
|
|
|
size: number;
|
2023-07-03 21:22:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ResponsiveIconProps {
|
|
|
|
size: number;
|
2023-07-03 16:18:39 +08:00
|
|
|
color: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface RootDrawerParamList {
|
|
|
|
navigate: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Redux Interfaces
|
|
|
|
export interface LoginState {
|
|
|
|
Login: { logged_in: boolean };
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface LoggedInUserState {
|
|
|
|
LoggedInUser: {
|
|
|
|
value: {
|
|
|
|
email: string;
|
|
|
|
id: number;
|
|
|
|
username: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// API Interfaces
|
|
|
|
|
|
|
|
export interface RegistrationParams {
|
|
|
|
email: string;
|
|
|
|
username: string;
|
|
|
|
password: string;
|
2023-07-03 21:22:31 +08:00
|
|
|
first_name: string;
|
|
|
|
last_name: string;
|
|
|
|
student_id_number: string;
|
2023-07-03 16:18:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface LoginParams {
|
|
|
|
username: string;
|
|
|
|
password: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ActivationParams {
|
|
|
|
uid: string;
|
|
|
|
token: string;
|
|
|
|
}
|
2023-07-06 17:19:19 +08:00
|
|
|
|
2023-07-18 17:20:11 +08:00
|
|
|
export interface OptionType {
|
|
|
|
label: string;
|
|
|
|
value: string;
|
|
|
|
}
|
|
|
|
|
2023-07-18 00:33:02 +08:00
|
|
|
// Semester
|
2023-07-17 15:57:23 +08:00
|
|
|
export interface Semester {
|
2023-07-06 17:19:19 +08:00
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
shortname: string;
|
|
|
|
}
|
|
|
|
|
2023-07-17 22:44:50 +08:00
|
|
|
export type Semesters = Array<Semester>;
|
|
|
|
|
|
|
|
export type SemesterParams = [boolean, Semesters];
|
2023-07-17 15:57:23 +08:00
|
|
|
|
2023-07-18 00:33:02 +08:00
|
|
|
// Year Level
|
2023-07-17 15:57:23 +08:00
|
|
|
export interface YearLevel {
|
2023-07-06 17:19:19 +08:00
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
shortname: string;
|
|
|
|
}
|
|
|
|
|
2023-07-18 00:33:02 +08:00
|
|
|
export type YearLevels = Array<YearLevel>;
|
2023-07-17 15:57:23 +08:00
|
|
|
|
2023-07-18 00:33:02 +08:00
|
|
|
export type YearLevelParams = [boolean, YearLevels];
|
|
|
|
|
|
|
|
// Course
|
2023-07-17 15:57:23 +08:00
|
|
|
export interface Course {
|
2023-07-06 17:19:19 +08:00
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
shortname: string;
|
|
|
|
}
|
2023-07-18 00:33:02 +08:00
|
|
|
export type Courses = Array<Course>;
|
|
|
|
export type CourseParams = [boolean, Courses];
|
2023-07-06 20:29:04 +08:00
|
|
|
|
2023-07-18 00:33:02 +08:00
|
|
|
// Subject
|
|
|
|
export interface Subject {
|
2023-07-27 00:01:44 +08:00
|
|
|
id: number;
|
2023-07-18 00:33:02 +08:00
|
|
|
name: string;
|
|
|
|
code: string;
|
2023-07-27 00:01:44 +08:00
|
|
|
course: string;
|
|
|
|
year_level: string;
|
|
|
|
semester: string;
|
2023-07-18 00:33:02 +08:00
|
|
|
}
|
2023-07-18 17:20:11 +08:00
|
|
|
|
2023-07-18 00:33:02 +08:00
|
|
|
export type Subjects = Array<Subject>;
|
|
|
|
export type SubjectParams = [boolean, Subjects];
|
2023-07-17 15:57:23 +08:00
|
|
|
|
2023-07-18 17:20:11 +08:00
|
|
|
// For dropdown menu
|
|
|
|
|
2023-07-06 20:29:04 +08:00
|
|
|
export interface OnboardingParams {
|
|
|
|
year_level: string;
|
|
|
|
course: string;
|
|
|
|
semester: string;
|
|
|
|
}
|
2023-07-17 15:10:44 +08:00
|
|
|
|
2023-07-17 18:45:25 +08:00
|
|
|
export interface PatchStudentData {
|
|
|
|
course?: string | null;
|
|
|
|
first_name?: string | null;
|
|
|
|
last_name?: string | null;
|
|
|
|
semester?: string | null;
|
|
|
|
subjects?: any[] | null; // To-do, replace 'any' with your actual type
|
|
|
|
year_level?: string | null;
|
2023-07-27 00:01:44 +08:00
|
|
|
irregular?: boolean | null;
|
2023-07-17 18:45:25 +08:00
|
|
|
}
|
|
|
|
|
2023-07-17 15:10:44 +08:00
|
|
|
export interface StudentData {
|
|
|
|
first_name: string;
|
|
|
|
last_name: string;
|
2023-07-18 00:33:02 +08:00
|
|
|
email: string;
|
|
|
|
avatar: string;
|
2023-07-17 15:10:44 +08:00
|
|
|
student_id_number: string;
|
2023-07-27 00:01:44 +08:00
|
|
|
irregular: boolean;
|
2023-07-18 00:33:02 +08:00
|
|
|
semester: string;
|
|
|
|
semester_shortname: string;
|
|
|
|
course: string;
|
|
|
|
course_shortname: string;
|
|
|
|
year_level: string;
|
|
|
|
yearlevel_shortname: string;
|
2023-07-27 00:01:44 +08:00
|
|
|
subjects: Subject[]; // To-do
|
2023-07-17 15:10:44 +08:00
|
|
|
username: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type UserInfoParams = [boolean, StudentData];
|