Fix filter on assignments with submissions page
Student submissions were not displayed because of a wrong filter. They are now displayed again.
This commit is contained in:
parent
0b0942ba4b
commit
5e2ddf69b8
|
|
@ -25,6 +25,8 @@
|
|||
<script>
|
||||
import StudentSubmission from '@/components/StudentSubmission';
|
||||
|
||||
import {meQuery} from '@/graphql/queries';
|
||||
|
||||
export default {
|
||||
props: ['assignment'],
|
||||
|
||||
|
|
@ -37,10 +39,10 @@
|
|||
return `/submission/${submission.id}`
|
||||
},
|
||||
belongsToSchool(submission) {
|
||||
if (this.currentFilter === '') {
|
||||
if (this.currentFilter.id === '') {
|
||||
return true;
|
||||
}
|
||||
return submission.student.schoolClasses.edges.some(edge => edge.node.id === this.currentFilter)
|
||||
return submission.student.schoolClasses.edges.some(edge => edge.node.id === this.currentFilter.id)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -51,10 +53,20 @@
|
|||
});
|
||||
},
|
||||
currentFilter() {
|
||||
return this.$store.state.filterForSchoolClass;
|
||||
return this.me.selectedClass;
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
me: {}
|
||||
}
|
||||
},
|
||||
|
||||
apollo: {
|
||||
me: meQuery
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue