From 7726cfade64cb6a179d6121bfe620710317342fa Mon Sep 17 00:00:00 2001 From: Michael Bauer <michael-bauer@posteo.de> Date: Wed, 15 May 2024 11:35:44 +0200 Subject: [PATCH] Implement StatisticsAbsencesCard --- .../statistics/StatisticsAbsencesCard.vue | 16 ++++++++++++++++ .../statistics/StatisticsForPersonCard.vue | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsAbsencesCard.vue b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsAbsencesCard.vue index dfebecdd1..1874929f2 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsAbsencesCard.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsAbsencesCard.vue @@ -1,10 +1,26 @@ <template> <v-card> + <absence-reason-chip + v-for="absenceReason in absenceReasons" + :absenceReason="absenceReason.absenceReason" + :count="absenceReason.count" + /> </v-card> </template> <script> +import AbsenceReasonChip from "aleksis.apps.kolego/components/AbsenceReasonChip.vue"; + export default { name: "StatisticsAbsencesCard", + components: { + AbsenceReasonChip + }, + props: { + absenceReasons: { + type: Array, + required: true, + }, + }, }; </script> diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue index e44e26061..95fda2650 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue @@ -8,7 +8,9 @@ <v-card-title v-else> {{ $t("alsijil.coursebook.statistics.person_page.title") }} </v-card-title> - <statistics-absences-card /> + <statistics-absences-card + :absence-reasons="statistics.absenceReasons" + /> <statistics-tardiness-card /> <statistics-extra-marks-card /> <statistics-personal-notes-list -- GitLab