Skip to content
Snippets Groups Projects
Commit e6842e46 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix issue with click handling

parent f7678f6c
No related branches found
No related tags found
1 merge request!363Resolve "Add absence overview page"
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment