diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue index f26ebf0b97864eba43ac2cd583b7990921cb09e8..9168b2e4f41ef56983f64fe41dc28526985ba776 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue @@ -131,12 +131,21 @@ export default { }, filters: { get() { - return { objType: this.objType, objId: this.objId, filterType: this.filterType, incomplete: this.incomplete }; + return { + objType: this.objType, + objId: this.objId, + filterType: this.filterType, + incomplete: this.incomplete, + }; }, set(selectedFilters) { if (Object.hasOwn(selectedFilters, "incomplete")) { this.incomplete = selectedFilters.incomplete; - } else if (Object.hasOwn(selectedFilters, "filterType") || Object.hasOwn(selectedFilters, "objId") || Object.hasOwn(selectedFilters, "objType")) { + } else if ( + Object.hasOwn(selectedFilters, "filterType") || + Object.hasOwn(selectedFilters, "objId") || + Object.hasOwn(selectedFilters, "objType") + ) { this.$router.push({ name: "alsijil.coursebook_by_type_and_date", params: { @@ -149,8 +158,8 @@ export default { }, }); } - } - } + }, + }, }, methods: { // => [[dt doc ...] ...] diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/CoursebookFilters.vue b/aleksis/apps/alsijil/frontend/components/coursebook/CoursebookFilters.vue index 909cf3a20ade0b8aac02241e50be7ff462acd239..e5493b07cda406fddbb3fccc89e5d1b42080ab89 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/CoursebookFilters.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/CoursebookFilters.vue @@ -1,5 +1,5 @@ <template> - <div class="d-flex flex-grow-1 justify-end"> + <div class="d-flex flex-grow-1 justify-end"> <v-autocomplete :items="selectable" item-text="name" @@ -31,7 +31,7 @@ :input-value="value.incomplete" @change=" $emit('input', { - incomplete: $event + incomplete: $event, }) " dense @@ -43,10 +43,7 @@ </template> <script> -import { - coursesOfPerson, - groupsByPerson, -} from "./coursebook.graphql"; +import { coursesOfPerson, groupsByPerson } from "./coursebook.graphql"; export default { name: "CoursebookFilters", @@ -79,7 +76,7 @@ export default { ...this.groups.map((group) => ({ type: "group", ...group })), { header: this.$t("alsijil.coursebook.filter.courses") }, ...this.courses.map((course) => ({ type: "course", ...course })), - ]; + ]; }, selectLoading() { return ( @@ -95,11 +92,18 @@ export default { }, methods: { selectObject(selection) { - this.$emit("input", { objType: selection ? selection.type : null, objId: selection ? selection.id : null }) + this.$emit("input", { + objType: selection ? selection.type : null, + objId: selection ? selection.id : null, + }); }, selectFilterType(switchValue) { - this.$emit("input", { filterType: switchValue ? "my" : "all", objType: this.value.objType, objId: this.value.objId }); - } + this.$emit("input", { + filterType: switchValue ? "my" : "all", + objType: this.value.objType, + objId: this.value.objId, + }); + }, }, }; </script> diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonSummary.vue b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonSummary.vue index af9f766ef5911b04a1ad200bad733b8a9ecc76c2..025fa67f2fb7d47c17ea0aa66e053b73cfe02f3d 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonSummary.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonSummary.vue @@ -199,9 +199,9 @@ export default { this.createOrPatch([ { id: this.documentation.id, - ...this.topic !== null && { topic: this.topic }, - ...this.homework !== null && { homework: this.homework }, - ...this.groupNote !== null && { groupNote: this.groupNote }, + ...(this.topic !== null && { topic: this.topic }), + ...(this.homework !== null && { homework: this.homework }), + ...(this.groupNote !== null && { groupNote: this.groupNote }), }, ]);