From 94424ea2888354f37fa61e1015ec05f6aac029a3 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 21 Dec 2019 12:40:43 -0500 Subject: [PATCH] [M] Rename filteredCourses to gradedCourses --- src/components/app/app.ts | 8 +++----- src/components/app/app.vue | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 07ce68b..439d504 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -21,9 +21,7 @@ export default class App extends Vue // List of course that the student takes courses: Course[] = []; - - // List of course that should be displayed - filteredCourses: Course[] = []; + gradedCourses: Course[] = []; // The currently selected tab selectedTab: string = 'overall'; @@ -133,7 +131,7 @@ export default class App extends Vue pWaitFor(() => this.courses.every(c => c.rawAssignments != null)).then(() => { // Filter courses - this.filteredCourses = this.courses.filter(c => c.isGraded); + this.gradedCourses = this.courses.filter(c => c.isGraded); // Check grading algorithms this.checkGradingAlgorithms(); @@ -149,7 +147,7 @@ export default class App extends Vue this.logLoading('4. Checking grading algorithms...'); // Loop through all the courses - for (const course of this.filteredCourses) + for (const course of this.gradedCourses) { for (const i of [0, 1, 2, 3]) { diff --git a/src/components/app/app.vue b/src/components/app/app.vue index e4fa3cd..018b06b 100644 --- a/src/components/app/app.vue +++ b/src/components/app/app.vue @@ -2,7 +2,7 @@
@@ -10,10 +10,10 @@
+ :courses="gradedCourses"> + :course="gradedCourses.find(c => +c.id === +selectedTab.split('/')[1])">