Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to nestedCourse.tsx nestedLecture.tsx professor.tsx #39

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/shapes/model/subject/nestedCourse.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import department from './department';

interface nestedCourse {
id: number;
old_code: string;
department: department;
type: string;
type_en: string;
title: string;
title_en: string;
summary: string;
review_total_weight: number;
credit: number;
credit_au: number;
num_classes: number;
num_labs: number;
}

export default nestedCourse;
34 changes: 34 additions & 0 deletions src/shapes/model/subject/nestedLecture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import nestedProfessor from './nestedProfessor';

interface nestedLecture {
id: number;
title: string;
title_en: string;
course: number;
old_code: string;
class_no: string;
year: number;
semester: 1 | 2 | 3 | 4;
code: string;
department: number;
department_code: string;
department_name: string;
department_name_en: string;
type: string;
type_en: string;
limit: number;
num_people: number;
is_english: boolean;
num_classes: number;
num_labs: number;
credit: number;
credit_au: number;
common_title: string;
common_title_en: string;
class_title: string;
class_title_en: string;
review_total_weight: number;
professors: nestedProfessor[];
}

export default nestedLecture;
14 changes: 14 additions & 0 deletions src/shapes/model/subject/professor.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import nestedCourse from './nestedCourse';

interface professor {
name: string;
name_en: string;
professor_id: number;
review_total_weight: number;
courses: nestedCourse[];
grade: number;
load: number;
speech: number;
}

export default professor;

Unchanged files with check annotations Beta

.then((response) => {
afterResponse(response.data);
})
.catch((error) => {});

Check warning on line 36 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'error' is defined but never used. Allowed unused args must match /^_/u
};
export const performAddToTable = (
},
},
)
.then((response) => {

Check warning on line 79 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'response' is defined but never used. Allowed unused args must match /^_/u
afterResponse();
})
.catch((error) => {});

Check warning on line 82 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'error' is defined but never used. Allowed unused args must match /^_/u
}
ReactGA.event({
},
},
)
.then((response) => {

Check warning on line 118 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'response' is defined but never used. Allowed unused args must match /^_/u
afterResponse();
})
.catch((error) => {});

Check warning on line 121 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'error' is defined but never used. Allowed unused args must match /^_/u
}
ReactGA.event({
},
},
)
.then((response) => {

Check warning on line 150 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'response' is defined but never used. Allowed unused args must match /^_/u
afterResponse();
})
.catch((error) => {});

Check warning on line 153 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'error' is defined but never used. Allowed unused args must match /^_/u
}
ReactGA.event({
},
},
)
.then((response) => {

Check warning on line 182 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'response' is defined but never used. Allowed unused args must match /^_/u
afterResponse();
})
.catch((error) => {});

Check warning on line 185 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'error' is defined but never used. Allowed unused args must match /^_/u
}
ReactGA.event({
.then((response) => {
afterResponse(response.data, duplicateTakenItems);
})
.catch((error) => {});

Check warning on line 265 in src/common/commonOperations.js

GitHub Actions / Format and Lint

'error' is defined but never used. Allowed unused args must match /^_/u
}
};