[+] Filter courses after assignments are retrieved

This commit is contained in:
Hykilpikonna
2019-09-29 15:07:01 -04:00
parent 3c0c0d5f1b
commit 6ee207d754
+7
View File
@@ -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);
});
}