From 5212de5d2cfda1427a0d2e4ab34a353f0961c005 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Sun, 28 Jan 2024 15:40:29 +0200 Subject: [PATCH] Adding v-alert on loading --- client/src/components/calender.vue | 79 +++++++++--------------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/client/src/components/calender.vue b/client/src/components/calender.vue index ab2b3678..264d86ae 100644 --- a/client/src/components/calender.vue +++ b/client/src/components/calender.vue @@ -18,84 +18,52 @@
- +
+ +
+
- + - + @create-meeting="createMeeting(dates?.startStr, $event)" @create-event="createEvent(dates?.startStr, $event)" /> - + - + - + - + - + - + @update-vacation="updateVacation(vacation.id, $event)" @delete-vacation="deleteVacation(vacation.id)" /> @@ -227,11 +195,12 @@ export default { watch( () => currentDate.value, - async (newValue) => { - console.log(newValue) - homes.execute() - } - ) + async (newValue, oldValue) => { + if (newValue.getMonth() + 1 !== oldValue.getMonth() + 1 || newValue.getFullYear() !== oldValue.getFullYear()) { + homes.execute(); + } + }, + ); const onSelect = async (arg: any) => { calendar.value = arg.view.calendar