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

Reformat

parent d4d3a8c8
No related branches found
No related tags found
1 merge request!363Resolve "Add absence overview page"
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
<v-card <v-card
outlined outlined
class="full-width" class="full-width"
v-show="pageType === 'absences' && combinedSelectedParticipations.length" v-show="
pageType === 'absences' && combinedSelectedParticipations.length
"
> >
<v-card-text> <v-card-text>
<v-row align="center"> <v-row align="center">
...@@ -49,7 +51,7 @@ ...@@ -49,7 +51,7 @@
:is="itemComponent" :is="itemComponent"
:documentation="item" :documentation="item"
:affectedQuery="lastQuery" :affectedQuery="lastQuery"
:value="selectedParticipations[item.id] ??= []" :value="(selectedParticipations[item.id] ??= [])"
@input="selectParticipation(item.id, $event)" @input="selectParticipation(item.id, $event)"
/> />
</template> </template>
...@@ -234,7 +236,11 @@ export default { ...@@ -234,7 +236,11 @@ export default {
}, },
methods: { methods: {
selectParticipation(id, value) { selectParticipation(id, value) {
this.selectedParticipations = Object.assign({}, this.selectedParticipations, { [id]: value }); this.selectedParticipations = Object.assign(
{},
this.selectedParticipations,
{ [id]: value },
);
}, },
handleMultipleAction(absenceReasonId) { handleMultipleAction(absenceReasonId) {
this.loadSelectedParticiptions = true; this.loadSelectedParticiptions = true;
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
</template> </template>
<!-- dialog view -> deactivate dialog --> <!-- dialog view -> deactivate dialog -->
<!-- cancel | save (through lesson-summary) --> <!-- cancel | save (through lesson-summary) -->
<documentation-absences <documentation-absences v-bind="$attrs" @close="popup = false" />
v-bind="$attrs"
@close="popup = false"
/>
</mobile-fullscreen-dialog> </mobile-fullscreen-dialog>
</template> </template>
......
...@@ -10,11 +10,7 @@ import updateParticipationMixin from "./updateParticipationMixin.js"; ...@@ -10,11 +10,7 @@ import updateParticipationMixin from "./updateParticipationMixin.js";
<v-list v-if="filteredParticipations.length"> <v-list v-if="filteredParticipations.length">
<v-divider /> <v-divider />
<v-list-item-group <v-list-item-group :value="value" multiple @change="changeSelect">
:value="value"
multiple
@change="changeSelect"
>
<template v-for="(participation, index) in filteredParticipations"> <template v-for="(participation, index) in filteredParticipations">
<v-list-item <v-list-item
:key="`documentation-${documentation.id}-participation-${participation.id}`" :key="`documentation-${documentation.id}-participation-${participation.id}`"
...@@ -23,14 +19,15 @@ import updateParticipationMixin from "./updateParticipationMixin.js"; ...@@ -23,14 +19,15 @@ import updateParticipationMixin from "./updateParticipationMixin.js";
> >
<template #default="{ active }"> <template #default="{ active }">
<v-list-item-action> <v-list-item-action>
<v-checkbox <v-checkbox :input-value="active" />
:input-value="active"
/>
</v-list-item-action> </v-list-item-action>
<v-list-item-title> <v-list-item-title>
{{ participation.person.fullName }} {{ participation.person.fullName }}
</v-list-item-title> </v-list-item-title>
<v-list-item-action v-if="participation.absenceReason" class="full-width"> <v-list-item-action
v-if="participation.absenceReason"
class="full-width"
>
<absence-reason-group-select <absence-reason-group-select
allow-empty allow-empty
empty-value="present" empty-value="present"
...@@ -115,6 +112,6 @@ export default { ...@@ -115,6 +112,6 @@ export default {
console.log(value); console.log(value);
this.$emit("input", value); this.$emit("input", value);
}, },
} },
}; };
</script> </script>
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