Skip to content

Commit

Permalink
fixed a bug that prevented booked Guest meals to be displayed in the …
Browse files Browse the repository at this point in the history
…participant list
  • Loading branch information
Felix Ruf committed Aug 21, 2024
1 parent 7783289 commit ad609b2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ const isCombi = computed(() => props.meal.dish === 'combined-dish');
const bookedCombi = computed(() => {
const dishId = mealIdToDishIdDict.get(props.meal.id);
if (dishId === undefined || dishId === null) return undefined;
return hasParticipantBookedCombiDish(props.dayId, props.participant, dishId);
return hasParticipantBookedCombiDish(props.dayId, cleanParticipantName(props.participant), dishId);
});
const bookedMeal = computed(() => hasParticipantBookedMeal(props.dayId, props.participant, props.meal.id));
const bookedMeal = computed(() => hasParticipantBookedMeal(props.dayId, cleanParticipantName(props.participant), props.meal.id));
function cleanParticipantName(name: string): string {
return name.replace(/\s\(gast\)\s*/i, ' (Guest)');
}
function handleClick() {
if (props.edit === true && bookedMeal.value === true) {
Expand Down

0 comments on commit ad609b2

Please sign in to comment.