diff --git a/resources/js/Shared/Widgets/Calendar/DayComponent.vue b/resources/js/Shared/Widgets/Calendar/DayComponent.vue index 8cc6fc7..5ec8501 100644 --- a/resources/js/Shared/Widgets/Calendar/DayComponent.vue +++ b/resources/js/Shared/Widgets/Calendar/DayComponent.vue @@ -13,7 +13,8 @@ } ], day.isHoliday && 'font-bold cursor-default', - (day.isPendingVacation) && `border-b-4 border-dashed ${day.getVacationType.border} md:border-blumilk-600` + (day.isPendingVacation) && `border-b-4 border-dashed ${day.getVacationType.border}`, + (day.isVacation) && `border-b-4 ${day.getVacationType.border}` ]" > diff --git a/resources/js/Shared/Widgets/VacationCalendar.vue b/resources/js/Shared/Widgets/VacationCalendar.vue index 2deba40..a543b28 100644 --- a/resources/js/Shared/Widgets/VacationCalendar.vue +++ b/resources/js/Shared/Widgets/VacationCalendar.vue @@ -132,7 +132,6 @@ :day="day" class="flex flex-col relative py-2 px-3" :class="{ 'day': calendarState.viewMode.isWeek }" - :get-holiday-description="getHolidayDescription" /> @@ -239,6 +238,7 @@ const customCalendar = { date: day.toISODate(), isVacation: isCurrentMonth && isVacation(day), isPendingVacation: isCurrentMonth && isPendingVacation(day), + isHoliday: isHoliday(day), } return { @@ -247,7 +247,7 @@ const customCalendar = { isCurrentMonth, isToday: isToday(day), isWeekend: isWeekend(day), - isHoliday: isHoliday(day), + getHolidayInfo: startDay.isHoliday ? getHolidayInfo(startDay) : undefined, getVacationType: startDay.isVacation || startDay.isPendingVacation ? getVacationType(startDay) : undefined, getVacationInfo: startDay.isVacation || startDay.isPendingVacation ? getVacationInfo(startDay) : undefined, } @@ -353,7 +353,7 @@ function isHoliday(date) { return props.holidays[date.toISODate()] !== undefined } -function getHolidayDescription(day) { +function getHolidayInfo(day) { return props.holidays[day.date] } @@ -365,10 +365,6 @@ function isPendingVacation(date) { return props.pendingVacations[date.toISODate()] !== undefined } -function getVacationBorder(day) { - return findType(getVacationInfo(day).type)?.border -} - function getVacationType(day) { return findType(getVacationInfo(day).type) }