diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/absences/ParticipationList.vue b/aleksis/apps/alsijil/frontend/components/coursebook/absences/ParticipationList.vue index 128e3d37dad09d7b74543d740e32af9ef64151e0..223ba0097cef80274a7a6145bd42443efdcacff9 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/absences/ParticipationList.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/absences/ParticipationList.vue @@ -9,43 +9,39 @@ import documentationPartMixin from "../documentation/documentationPartMixin"; </script> <template> - <v-list> - <v-divider v-if="filteredParticipations.length" /> - <p v-else>{{ $t("no participations") }}</p> - <v-list-item-group multiple v-model="selectedParticipations"> - <template v-for="(participation, index) in filteredParticipations"> - <v-list-item - :key="`documentation-${documentation.id}-participation-${participation.id}`" - :value="participation" - v-bind="$attrs" - v-on="$listeners" - > - <template #default="{ active }"> - <v-list-item-action> - <v-checkbox :input-value="active" @change="handleParticipationSelect($event, participation)" /> - </v-list-item-action> - <v-list-item-title> - {{ participation.person.fullName }} - </v-list-item-title> - <v-list-item-subtitle v-if="participation.absenceReason"> - <absence-reason-chip small :absence-reason="participation.absenceReason" /> - </v-list-item-subtitle> - <v-list-item-action> - <v-icon> - mdi-chevron-right - </v-icon> - </v-list-item-action> - </template> - </v-list-item> - <v-divider - v-if="index < filteredParticipations.length - 1" - :key="index" - ></v-divider> - <mobile-fullscreen-dialog v-model="participationDialogs" max-width="500px"> - test - </mobile-fullscreen-dialog> + <v-list v-if="filteredParticipations.length"> + <v-divider /> + <v-list-item + v-for="(participation, index) in filteredParticipations" + :key="`documentation-${documentation.id}-participation-${participation.id}`" + :value="participation" + v-bind="$attrs" + v-on="$listeners" + > + <template #default="{ active }"> + <v-list-item-action> + <v-checkbox :input-value="active" @change="handleParticipationSelect($event, participation)" /> + </v-list-item-action> + <v-list-item-title> + {{ participation.person.fullName }} + </v-list-item-title> + <v-list-item-subtitle v-if="participation.absenceReason"> + <absence-reason-chip small :absence-reason="participation.absenceReason" /> + </v-list-item-subtitle> + <v-list-item-action> + <v-icon> + mdi-chevron-right + </v-icon> + </v-list-item-action> </template> - </v-list-item-group> + </v-list-item> + <v-divider + v-if="index < filteredParticipations.length - 1" + :key="index" + ></v-divider> + <mobile-fullscreen-dialog v-model="participationDialogs" max-width="500px"> + test + </mobile-fullscreen-dialog> <!--<template #expandedItem="{ item, close }">--> @@ -80,7 +76,6 @@ export default { data() { return { loading: false, - selectedParticipations: [], participationDialogs: false, isExpanded: false, }; @@ -100,9 +95,6 @@ export default { return this.documentation.participations; } }, - selectedParticipationIDs() { - return this.selectedParticipations.map((p) => p.id); - }, }, methods: { handleParticipationSelect(value, participation) {