Implemented update event systems
This commit is contained in:
@@ -128,7 +128,6 @@ const calendarOptions = ref({
|
||||
calendarOptions.value.datesSet = onDatesSet
|
||||
|
||||
watch(() => route.params.id, async (newID) => {
|
||||
console.log(newID)
|
||||
if (newID === undefined) {
|
||||
panelOpen.value = false;
|
||||
currentEventID.value = null;
|
||||
@@ -150,6 +149,8 @@ function onCreateEvent() {
|
||||
onDateClick({ dateStr: iso })
|
||||
}
|
||||
|
||||
const eventViewRef = ref(null);
|
||||
|
||||
onMounted(() => {
|
||||
onDatesSet()
|
||||
})
|
||||
@@ -158,7 +159,7 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<CreateCalendarEvent ref="dialogRef" @reload="loadEvents()"></CreateCalendarEvent>
|
||||
<CreateCalendarEvent ref="dialogRef" @reload="loadEvents(); eventViewRef.forceReload();"></CreateCalendarEvent>
|
||||
<div class="flex">
|
||||
<div class="flex-1 min-h-0 mt-5">
|
||||
<div class="h-[80vh] min-h-0">
|
||||
@@ -215,7 +216,7 @@ onMounted(() => {
|
||||
<aside v-if="panelOpen"
|
||||
class="3xl:w-lg 2xl:w-md border-l bg-card text-foreground flex flex-col overflow-auto scrollbar-themed"
|
||||
:style="{ height: 'calc(100vh - 61px)', position: 'sticky', top: '64px' }">
|
||||
<ViewCalendarEvent @close="() => { router.push('/calendar'); }" @reload="loadEvents()">
|
||||
<ViewCalendarEvent ref="eventViewRef" @close="() => { router.push('/calendar'); }" @reload="loadEvents()" @edit="(val) => {dialogRef.openDialog(null, 'edit', val)}">
|
||||
</ViewCalendarEvent>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user