From c860d4a91eb3693744ba4beecfedf531b04768a1 Mon Sep 17 00:00:00 2001 From: Iris Olfermann Date: Tue, 16 Jan 2024 12:21:36 +0100 Subject: [PATCH] no participations works --- src/Resources/src/locales/de.json | 3 ++- src/Resources/src/locales/en.json | 4 +++- src/Resources/src/services/filterParticipantsList.ts | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Resources/src/locales/de.json b/src/Resources/src/locales/de.json index ab6bc3411..b32605ad7 100644 --- a/src/Resources/src/locales/de.json +++ b/src/Resources/src/locales/de.json @@ -163,7 +163,8 @@ }, "participations": { "added": "Ein Benutzer wurde zu einer Mahlzeit hinzugefĆ¼gt.", - "removed": "Ein Benutzer wurde aus einer Mahlzeit entfernt." + "removed": "Ein Benutzer wurde aus einer Mahlzeit entfernt.", + "no": "Heute gibt es keine Teilnehmer." }, "timeslot": { "created": "Der Zeitslot wurde erfolgreich erstellt.", diff --git a/src/Resources/src/locales/en.json b/src/Resources/src/locales/en.json index 32b108c30..dcafd5b43 100644 --- a/src/Resources/src/locales/en.json +++ b/src/Resources/src/locales/en.json @@ -163,7 +163,9 @@ }, "participations": { "added": "A user was successfully added a meal.", - "removed": "A user was succefully removed fromm a meal." + "removed": "A user was succefully removed fromm a meal.", + "no": "No participations today." + }, "timeslot": { "created": "The timeslot was successfully created.", diff --git a/src/Resources/src/services/filterParticipantsList.ts b/src/Resources/src/services/filterParticipantsList.ts index f6e230d17..d4ec197d8 100644 --- a/src/Resources/src/services/filterParticipantsList.ts +++ b/src/Resources/src/services/filterParticipantsList.ts @@ -1,5 +1,8 @@ import { useParticipationsListData } from "@/api/getParticipationsByDay"; import { Ref, computed, reactive } from "vue"; +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); interface ParticipantState { participants: Readonly>, @@ -24,8 +27,7 @@ export function filterParticipantsList(date: string){ const filteredParticipants = computed(() => { if (participations.participants.length===0){ - participations.participants = ["Hallo"] - return [] + return ["Heute gibt es keine Teilnehmer."] } return participations.participants.filter(participant => participantsContainString(participant, participations.filterValue)); });