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>
|
<script>
|
||||||
import StudentSubmission from '@/components/StudentSubmission';
|
import StudentSubmission from '@/components/StudentSubmission';
|
||||||
|
|
||||||
|
import {meQuery} from '@/graphql/queries';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['assignment'],
|
props: ['assignment'],
|
||||||
|
|
||||||
|
|
@ -37,10 +39,10 @@
|
||||||
return `/submission/${submission.id}`
|
return `/submission/${submission.id}`
|
||||||
},
|
},
|
||||||
belongsToSchool(submission) {
|
belongsToSchool(submission) {
|
||||||
if (this.currentFilter === '') {
|
if (this.currentFilter.id === '') {
|
||||||
return true;
|
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() {
|
currentFilter() {
|
||||||
return this.$store.state.filterForSchoolClass;
|
return this.me.selectedClass;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
me: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
apollo: {
|
||||||
|
me: meQuery
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue