From 7a42208ffdda29d931d7224f49ac23e7c2fc3977 Mon Sep 17 00:00:00 2001 From: Mahmoud Emad Date: Tue, 23 Apr 2024 09:52:30 +0200 Subject: [PATCH] Update: Added the country name on the public holiday label. --- client/src/components/CalenderComponent.vue | 2 +- client/src/utils/helpers.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/components/CalenderComponent.vue b/client/src/components/CalenderComponent.vue index 5df9eaa6..51ab27d2 100644 --- a/client/src/components/CalenderComponent.vue +++ b/client/src/components/CalenderComponent.vue @@ -230,7 +230,7 @@ function onClick(arg: any) { const clickedEventTitle = arg.event.title as string // We use a normalized event ID to avoid duplication. It's created by concatenating 'holiday', 'birthday', 'event', 'meeting', and 'vacation' with the event ID. - if (clickedEventTitle === CalendarEventSelection.PublicHoliday) { + if (clickedEventTitle.includes(CalendarEventSelection.PublicHoliday)) { selectedEvent.value = holidays.value.filter( (holiday) => holiday.id === Number(arg.event.id.replace('holiday', '')) )[0] diff --git a/client/src/utils/helpers.ts b/client/src/utils/helpers.ts index 7aa6f3d7..5b0de00c 100644 --- a/client/src/utils/helpers.ts +++ b/client/src/utils/helpers.ts @@ -97,10 +97,9 @@ export function normalizeVacation(v: Api.Vacation) { export function normalizeHoliday(h: Api.Holiday) { const dates = handelDates(h.holiday_date, h.holiday_date) - return { type: h.type, - title: `Public Holiday`, + title: `Public Holiday ${h.location.country}`, color: '#5effb4', start: dates.start, end: dates.end,