Skip to content

Commit

Permalink
Update: Added the country name on the public holiday label.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Emad committed Apr 23, 2024
1 parent ea71d02 commit 7a42208
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/components/CalenderComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 1 addition & 2 deletions client/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7a42208

Please sign in to comment.