From afd7c629e5e7a2797e114e15aa32d799a802e00e Mon Sep 17 00:00:00 2001 From: quirinecker Date: Fri, 8 Mar 2024 16:34:51 +0100 Subject: [PATCH] editing now and resetting works --- src/components/EntryForm.vue | 6 ++- src/pages/Detail.vue | 94 +++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 8 deletions(-) diff --git a/src/components/EntryForm.vue b/src/components/EntryForm.vue index 94df8ec..2c71036 100644 --- a/src/components/EntryForm.vue +++ b/src/components/EntryForm.vue @@ -5,6 +5,7 @@ import { Input } from '@/components/ui/input'; import { Form, FormItem, FormLabel, FormField, FormControl, FormMessage, FormDescription } from '@/components/ui/form'; import { Button } from './ui/button'; import { Textarea } from '@/components/ui/textarea'; +import { Entry } from '@/data/entries'; const emit = defineEmits<{ submit: [value: CreateEntrySchema] @@ -12,6 +13,7 @@ const emit = defineEmits<{ const props = defineProps<{ action: 'create' | 'edit' + inputEntry?: Entry | undefined }>() @@ -31,7 +33,7 @@ const createEntrySchema = toTypedSchema(createEntryZodSchema) - + @@ -40,7 +42,7 @@ const createEntrySchema = toTypedSchema(createEntryZodSchema) -