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) +} +