Skip to content
Snippets Groups Projects

Resolve "Add absence overview page"

Merged Hangzhi Yu requested to merge 264-add-absence-overview-page into master
All threads resolved!
2 files
+ 10
8
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -45,6 +45,10 @@
<script>
import { coursesOfPerson, groupsByPerson } from "./coursebook.graphql";
const TYPENAMES_TO_TYPES = {
CourseType: "course",
GroupType: "group",
};
export default {
name: "CoursebookFilters",
data() {
@@ -73,9 +77,9 @@ export default {
selectable() {
return [
{ header: this.$t("alsijil.coursebook.filter.groups") },
...this.groups.map((group) => ({ type: "group", ...group })),
...this.groups,
{ header: this.$t("alsijil.coursebook.filter.courses") },
...this.courses.map((course) => ({ type: "course", ...course })),
...this.courses,
];
},
selectLoading() {
@@ -86,14 +90,16 @@ export default {
},
currentObj() {
return this.selectable.find(
(o) => o.type === this.value.objType && o.id === this.value.objId,
(o) =>
TYPENAMES_TO_TYPES[o.__typename] === this.value.objType &&
o.id === this.value.objId,
);
},
},
methods: {
selectObject(selection) {
this.$emit("input", {
objType: selection ? selection.type : null,
objType: selection ? TYPENAMES_TO_TYPES[selection.__typename] : null,
objId: selection ? selection.id : null,
});
},
Loading