From 957af1c257d5a468e01b0f426aab531bf86a77f3 Mon Sep 17 00:00:00 2001 From: quirinecker Date: Mon, 7 Jul 2025 21:32:09 +0200 Subject: [PATCH] did thigns --- web/components/ui/ListItem.vue | 5 ++- web/components/ui/Sidebar.vue | 19 ++++++---- web/components/ui/calendar/Calendar.vue | 23 +++++++++-- .../ui/calendar/CalendarCollumn.vue | 38 +++++++++++++------ web/components/ui/calendar/CalendarEvent.vue | 29 ++++++++++++-- web/pages/index.vue | 19 ++++++++-- web/utils/task.ts | 3 +- 7 files changed, 105 insertions(+), 31 deletions(-) diff --git a/web/components/ui/ListItem.vue b/web/components/ui/ListItem.vue index a115f61..cc1807d 100644 --- a/web/components/ui/ListItem.vue +++ b/web/components/ui/ListItem.vue @@ -1,9 +1,12 @@ diff --git a/web/components/ui/Sidebar.vue b/web/components/ui/Sidebar.vue index dbfc5dd..8fc0ecb 100644 --- a/web/components/ui/Sidebar.vue +++ b/web/components/ui/Sidebar.vue @@ -27,6 +27,7 @@ const emits = defineEmits<{ (e: 'deleteTask', id: number): void (e: 'editTask', task: Task): void (e: 'scheduleTask', task: Task): void + (e: 'dismissSchedule'): void }>() const isLight = computed(() => currentTheme.value === 'light'); @@ -140,6 +141,10 @@ function scheduleTask(task: Task) { emits('scheduleTask', task) } +function dismissSchedule() { + emits('dismissSchedule') +} + -
+
Calendar
-
-
+
+
Tasks -
- +
+
- +
-
diff --git a/web/components/ui/calendar/Calendar.vue b/web/components/ui/calendar/Calendar.vue index 30f52be..7adfc4d 100644 --- a/web/components/ui/calendar/Calendar.vue +++ b/web/components/ui/calendar/Calendar.vue @@ -21,6 +21,7 @@ const editTaskModalOpened = ref(false) const editTaskContext = ref() const taskFormModalInput = ref>({}) const deleteContext = ref<{ event: Event }>() +const taskDraggingActive = ref(true) type Day = { date: DateTime @@ -212,10 +213,24 @@ function moveEvent(event: Event) { } else emits('edit', event) } +function dragEnter(_: DragEvent) { + if (draggedTask.value !== undefined) { + draggedTask.value.active = true + } +} + +function rawEdit(event: Event) { + if (event.task === undefined) { + return + } + + emits('edit-task', event.task) +} +