diff --git a/aleksis/apps/alsijil/frontend/components/Coursebook.vue b/aleksis/apps/alsijil/frontend/components/Coursebook.vue index e80d0fdf23d887c71d79e64ee745efdcafad3df5..cb5a5fe47d31f073efc96b27387f0a689b0c23f6 100644 --- a/aleksis/apps/alsijil/frontend/components/Coursebook.vue +++ b/aleksis/apps/alsijil/frontend/components/Coursebook.vue @@ -1,33 +1,39 @@ <template> <c-r-u-d-iterator - i18n-key="alsijil.coursebook" - :gql-query="gqlQuery" - :gql-additional-query-args="gqlQueryArgs" - :enable-create="false" - :enable-edit="false" - @lastQuery="lastQuery = $event" - ref="iterator" + i18n-key="alsijil.coursebook" + :gql-query="gqlQuery" + :gql-additional-query-args="gqlQueryArgs" + :enable-create="false" + :enable-edit="false" + @lastQuery="lastQuery = $event" + ref="iterator" > <template #additionalActions="{ attrs, on }"> <v-autocomplete - :items="selectable" - item-text="name" - clearable - return-object - filled - dense - hide-details - :placeholder="$t('alsijil.coursebook.filter.filter_for_obj')" - :loading="selectLoading" - :value="currentObj" - @input="changeSelection" - @click:clear="changeSelection" + :items="selectable" + item-text="name" + clearable + return-object + filled + dense + hide-details + :placeholder="$t('alsijil.coursebook.filter.filter_for_obj')" + :loading="selectLoading" + :value="currentObj" + @input="changeSelection" + @click:clear="changeSelection" /> <v-switch :loading="selectLoading" :label="$t('alsijil.coursebook.filter.own')" :input-value="filterType === 'my'" - @change="changeSelection({ filterType: $event ? 'my' : 'all', type: objType, id: objId })" + @change=" + changeSelection({ + filterType: $event ? 'my' : 'all', + type: objType, + id: objId, + }) + " /> </template> <template #default="{ items }"> @@ -51,22 +57,30 @@ <template #no-data> <v-list-item> - <v-list-item-content class="d-flex justify-center align-center flex-column full-width"> + <v-list-item-content + class="d-flex justify-center align-center flex-column full-width" + > <div class="mb-4"> <v-icon large color="primary">mdi-book-off-outline</v-icon> </div> - <v-list-item-title>{{ $t("alsijil.coursebook.no_data") }}</v-list-item-title> + <v-list-item-title> + {{ $t("alsijil.coursebook.no_data") }} + </v-list-item-title> </v-list-item-content> </v-list-item> </template> <template #no-results> <v-list-item> - <v-list-item-content class="d-flex justify-center align-center flex-column full-width"> + <v-list-item-content + class="d-flex justify-center align-center flex-column full-width" + > <div class="mb-4"> <v-icon large color="primary">mdi-book-alert-outline</v-icon> </div> - <v-list-item-title>{{ $t("alsijil.coursebook.no_results", { search: $refs.iterator.search }) }}</v-list-item-title> + <v-list-item-title> + {{ $t("alsijil.coursebook.no_results", { search: $refs.iterator.search }) }} + </v-list-item-title> </v-list-item-content> </v-list-item> </template> @@ -78,9 +92,9 @@ import CRUDIterator from "aleksis.core/components/generic/CRUDIterator.vue"; import DocumentationModal from "./documentation/DocumentationModal.vue"; import { DateTime } from "luxon"; import { - groupsByOwner, coursesOfTeacher, documentationsForCoursebook, + groupsByOwner, } from "./coursebook.graphql"; import CoursebookLoader from "./CoursebookLoader.vue"; @@ -157,18 +171,25 @@ export default { ]; }, currentObj() { - return this.selectable.find((o) => o.type === this.objType && o.id === this.objId); + return this.selectable.find( + (o) => o.type === this.objType && o.id === this.objId, + ); }, selectLoading() { - return this.$apollo.queries.groups.loading || this.$apollo.queries.courses.loading; - } + return ( + this.$apollo.queries.groups.loading || + this.$apollo.queries.courses.loading + ); + }, }, methods: { changeSelection(selection) { this.$router.push({ name: "alsijil.coursebook_by_type_and_date", params: { - filterType: selection.filterType ? selection.filterType : this.filterType, + filterType: selection.filterType + ? selection.filterType + : this.filterType, objType: selection.type, objId: selection.id, dateStart: this.dateStart, diff --git a/aleksis/apps/alsijil/frontend/components/documentation/LessonNotes.vue b/aleksis/apps/alsijil/frontend/components/documentation/LessonNotes.vue index a9bada95050916847473f8d411299dc61efd11c8..e67555bb1463f5fc375533801d5a3004d05df803 100644 --- a/aleksis/apps/alsijil/frontend/components/documentation/LessonNotes.vue +++ b/aleksis/apps/alsijil/frontend/components/documentation/LessonNotes.vue @@ -33,6 +33,6 @@ export default { <style scoped> .gap { - gap: 0.25em + gap: 0.25em; } </style> diff --git a/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue b/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue index 86c5e39dd0509f01e0ed57eabb35db87299aaf44..6bc2b112795cac307519ce94bc8add9e8c38b32e 100644 --- a/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue +++ b/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue @@ -155,15 +155,23 @@ export default { computed: { homeworkIcon() { if (this.documentation.homework) { - return this.documentation.canEdit ? "mdi-book-edit-outline" : "mdi-book-alert-outline"; + return this.documentation.canEdit + ? "mdi-book-edit-outline" + : "mdi-book-alert-outline"; } - return this.documentation.canEdit ? "mdi-book-plus-outline" : "mdi-book-off-outline"; + return this.documentation.canEdit + ? "mdi-book-plus-outline" + : "mdi-book-off-outline"; }, groupNoteIcon() { if (this.documentation.groupNote) { - return this.documentation.canEdit ? "mdi-note-edit-outline" : "mdi-note-alert-outline"; + return this.documentation.canEdit + ? "mdi-note-edit-outline" + : "mdi-note-alert-outline"; } - return this.documentation.canEdit ? "mdi-note-plus-outline" : "mdi-note-off-outline"; + return this.documentation.canEdit + ? "mdi-note-plus-outline" + : "mdi-note-off-outline"; }, }, };