Skip to content

Commit

Permalink
no participations works
Browse files Browse the repository at this point in the history
  • Loading branch information
IrisOlfermann committed Jan 16, 2024
1 parent 624aa53 commit c860d4a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Resources/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
6 changes: 4 additions & 2 deletions src/Resources/src/services/filterParticipantsList.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { useParticipationsListData } from "@/api/getParticipationsByDay";
import { Ref, computed, reactive } from "vue";
import { useI18n } from "vue-i18n";

const { t } = useI18n();

Check warning on line 5 in src/Resources/src/services/filterParticipantsList.ts

View workflow job for this annotation

GitHub Actions / FE Asset Linting

't' is assigned a value but never used

interface ParticipantState {
participants: Readonly<Ref<readonly string[]>>,
Expand All @@ -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));
});
Expand Down

0 comments on commit c860d4a

Please sign in to comment.