[O] Filter out courses not from this year
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
import {Component, Prop, Vue} from 'vue-property-decorator'
|
import {Component, Prop, Vue} from 'vue-property-decorator'
|
||||||
import App from '@/components/app/app';
|
import App from '@/components/app/app';
|
||||||
import CourseInfo from '@/logic/course-info';
|
import CourseInfo from '@/logic/course-info';
|
||||||
|
import {GPAUtils} from '@/logic/utils/gpa-utils';
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class CourseSelection extends Vue
|
export default class CourseSelection extends Vue
|
||||||
@@ -81,8 +82,12 @@
|
|||||||
|
|
||||||
get filteredCourses()
|
get filteredCourses()
|
||||||
{
|
{
|
||||||
return this.courseInfo.filter(c => c.name.toLowerCase().includes(this.search))
|
let year = GPAUtils.getSchoolYear();
|
||||||
.filter(c => c.level !== 'Club');
|
|
||||||
|
return this.courseInfo.filter(c =>
|
||||||
|
c.name.toLowerCase().includes(this.search) &&
|
||||||
|
c.level !== 'Club' &&
|
||||||
|
c.year == year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user