diff --git a/client/src/components/dashboard/StatisticFilterList.vue b/client/src/components/dashboard/StatisticFilterList.vue index 7ec9b451..cda10a88 100644 --- a/client/src/components/dashboard/StatisticFilterList.vue +++ b/client/src/components/dashboard/StatisticFilterList.vue @@ -3,21 +3,17 @@ import { computed, ref, watch } from "vue"; import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue"; import { useTranslation } from "i18next-vue"; import type { StatisticsCourseSessionPropertiesType } from "@/gql/graphql"; +import type { StatisticsFilterItem } from "@/types"; const { t } = useTranslation(); -interface Item { - _id: string; - course_session_id: string; - generation: string; - circle_id: string; -} - const props = defineProps<{ - items: Item[]; + items: StatisticsFilterItem[]; courseSessionProperties: StatisticsCourseSessionPropertiesType; }>(); +defineExpose({ getFilteredItems }); + const sessionFilter = computed(() => { const f = props.courseSessionProperties.sessions.map((session) => ({ name: `${t("a.Durchfuehrung")}: ${session.name}`, @@ -71,6 +67,10 @@ const filteredItems = computed(() => { return sessionMatch && generationMatch && circleMatch; }); }); + +function getFilteredItems() { + return filteredItems.value; +}