diff --git a/public/src/components/ListView.vue b/public/src/components/ListView.vue index 92b4e8a..741d28d 100644 --- a/public/src/components/ListView.vue +++ b/public/src/components/ListView.vue @@ -3,7 +3,7 @@ import {ref} from "vue" import type {Gottesdienst, Mark, SimplifiedMinistrant} from "@/models/models" import GottesdienstCard from "@/components/GottesdienstCard.vue" -defineProps<{ +const props = defineProps<{ gottesdienste: Gottesdienst[] ministranten: SimplifiedMinistrant[] marks: Mark[] @@ -22,6 +22,10 @@ const emit = defineEmits<{ }>() const activeTab = ref<"gottesdienste" | "ministranten">("gottesdienste") + +function countXMarks(miniId: number): number { + return props.marks.filter(m => m.mid === miniId && m.value === 1).length +}