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