diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsDialog.vue b/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsDialog.vue index 0051a182eb349532fdc3bfbadcc6c6e20fab5eab..02349f01add8910e22f6cdfdfb16d99ad303ffb5 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsDialog.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsDialog.vue @@ -220,7 +220,9 @@ export default { @input="handleMultipleAction('absenceReason', $event)" /> <h4>{{ $t("alsijil.extra_marks.title_plural") }}</h4> - <extra-mark-buttons @input="handleMultipleAction('extraMark', $event)" /> + <extra-mark-buttons + @input="handleMultipleAction('extraMark', $event)" + /> </div> </v-scroll-y-reverse-transition> </template> diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/absences/sendToServerMixin.js b/aleksis/apps/alsijil/frontend/components/coursebook/absences/sendToServerMixin.js index c417e016f01e6ba2d2f05c02267d398ac60a694d..55cae9e6e8d69b0f4e5d299e9869228ccf9c2702 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/absences/sendToServerMixin.js +++ b/aleksis/apps/alsijil/frontend/components/coursebook/absences/sendToServerMixin.js @@ -56,23 +56,25 @@ export default { ); }, addExtraMarks(participations, extraMarkId) { - // Get all participation statuses without this extra mark and get the respective person ids - const participants = participations.filter( - participation => !participation.notesWithExtraMark.some(note => note.extraMark.id === extraMarkId) - ).map(participation => participation.person.id) + const participants = participations + .filter( + (participation) => + !participation.notesWithExtraMark.some( + (note) => note.extraMark.id === extraMarkId, + ), + ) + .map((participation) => participation.person.id); // CREATE new personal note this.mutate( createPersonalNotes, { - input: participants.map(person => ( - { - documentation: this.documentation.id, - person: person, - extraMark: extraMarkId, - } - )), + input: participants.map((person) => ({ + documentation: this.documentation.id, + person: person, + extraMark: extraMarkId, + })), }, (storedDocumentations, incomingPersonalNotes) => { const documentation = storedDocumentations.find( @@ -80,7 +82,7 @@ export default { ); incomingPersonalNotes.forEach((note, index) => { const participationStatus = documentation.participations.find( - (part) => part.person.id === participants[index], + (part) => part.person.id === participants[index], ); participationStatus.notesWithExtraMark.push(note); }); @@ -88,6 +90,6 @@ export default { return storedDocumentations; }, ); - } + }, }, };