diff --git a/src/components/overview/AgendaView.vue b/src/components/overview/AgendaView.vue index 33d2d90..36754b3 100644 --- a/src/components/overview/AgendaView.vue +++ b/src/components/overview/AgendaView.vue @@ -64,7 +64,7 @@ {{ timestamp.day }} - + Neue Veranstaltung @@ -95,6 +95,7 @@ import { date, QDate, QPopupProxy, useQuasar } from 'quasar'; import { startOfWeek } from '@flaschengeist/api'; import EditEvent from '../management/EditEvent.vue'; import { QCalendarAgenda } from '@quasar/quasar-ui-qcalendar'; +import { EditableEvent, emptyEvent } from '../../store/models'; export default defineComponent({ name: 'AgendaView', @@ -115,7 +116,7 @@ export default defineComponent({ calendarView.value == 'day' || quasar.screen.xs ? 1 : quasar.screen.sm ? 3 : 7 ); const events = ref({}); - const editor = ref(undefined); + const editor = ref(); interface Agendas { [index: number]: FG.Event[]; @@ -125,6 +126,9 @@ export default defineComponent({ await loadAgendas(); }); + function create(ds: string) { + editor.value = emptyEvent(date.extractDate(ds, 'YYYY-MM-DD')); + } async function edit(id: number) { editor.value = await store.getEvent(id); } @@ -221,6 +225,7 @@ export default defineComponent({ calendarPrev, calendarRealView, calendarView, + create, edit, editor, editDone,