diff --git a/app/Infrastructure/Http/Controllers/VacationCalendarController.php b/app/Infrastructure/Http/Controllers/VacationCalendarController.php index 20d1678..2673f6f 100644 --- a/app/Infrastructure/Http/Controllers/VacationCalendarController.php +++ b/app/Infrastructure/Http/Controllers/VacationCalendarController.php @@ -44,6 +44,7 @@ class VacationCalendarController extends Controller "users" => SimpleUserResource::collection($users), "can" => [ "generateTimesheet" => $request->user()->can("generateTimesheet"), + "createOnBehalfOfEmployee" => $request->user()->can("createOnBehalfOfEmployee"), ], ]); } diff --git a/resources/js/Pages/Calendar.vue b/resources/js/Pages/Calendar.vue index 50a30d2..f8db8b8 100644 --- a/resources/js/Pages/Calendar.vue +++ b/resources/js/Pages/Calendar.vue @@ -101,7 +101,7 @@ :key="day.dayOfMonth" class="border border-gray-300" :class="{ 'bg-blumilk-25': day.isToday, 'bg-red-100': day.isWeekend || day.isHoliday }" - @mouseover="setActiveBtn(user.id.toString() + '' + day.date)" + @mouseover="setActiveBtn(user.id + '+' + day.date)" @mouseleave="unsetActiveBtn" >
@@ -146,6 +146,8 @@ const props = defineProps({ can: Object, }) +console.log(props.auth.user) + let activeElement = ref(undefined) const { getMonths, findMonth } = useMonthInfo()