From 6ee207d7540ff15f5dad3601a5048d11fd8acf71 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 29 Sep 2019 15:07:01 -0400 Subject: [PATCH] [+] Filter courses after assignments are retrieved --- src/components/app/app.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 211759f..965bbd0 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -6,6 +6,7 @@ import Constants from '@/constants'; import JsonUtils from '@/utils/json-utils'; import pWaitFor from 'p-wait-for'; import {HttpUtils} from '@/utils/http-utils'; +import {CourseUtils} from '@/utils/course-utils'; /** * Objects of this interface represent assignment grades. @@ -54,6 +55,9 @@ export default class App extends Vue // List of course that the student takes public courses: Course[] = []; + // List of course that should be displayed + public filteredCourses: Course[] = []; + // Currently selected tab public selectedTab: string = 'overall'; @@ -152,6 +156,9 @@ export default class App extends Vue { // When the assignments are ready this.assignmentsReady = true; + + // Filter courses + this.filteredCourses = CourseUtils.getGradedCourses(this.courses); }); }