web-backend-connect

This commit is contained in:
CoGomu
2025-05-24 20:27:10 +02:00
parent 5a66a6db3c
commit fd22136757
10 changed files with 118 additions and 15 deletions

View File

@@ -7,11 +7,15 @@ import type { DateTime } from 'luxon';
const events = defineModel<Event[]>('events', { required: true })
const date = defineModel<DateTime>('date', { required: true })
const emits = defineEmits<{
(e: 'createEvent', event: Event): void
}>()
</script>
<template>
<UCard class="flex grow" :ui="{ body: 'w-full h-full' }">
<Calendar v-model:events="events" v-model:date="date"></Calendar>
<Calendar @create="(event) => emits('createEvent', event)"v-model:events="events" v-model:date="date"></Calendar>
</UCard>
</template>

View File

@@ -70,7 +70,7 @@ const days = computed<Day[]>(() => {
})
const emits = defineEmits<{
(e: 'create', timespan: Event): void
(e: 'create', event: Event): void
}>()
const hour = (num: number) => {
@@ -108,7 +108,7 @@ function quickCreate(date: DateTime, timespan: Timespan) {
</script>
<template>
<div class="w-full h-full flex flex-col overflow-scroll">
<div class="w-full h-full flex flex-col">
<div class="calendar flex flex-row w-full flex-1 items-stretch divide-x divide-muted">
<CalendarHeader :seperators="seperators" />