From 04f33808d529f8797ec50fb339f5369817be3594 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:48:33 +0700 Subject: [PATCH] feat: add author field --- Services/client/src/components/FileForm.vue | 32 ++++++++++++++++--- .../client/src/components/FileFormWrapper.vue | 12 +++++-- Services/client/src/stores/storage.ts | 9 +++--- 3 files changed, 43 insertions(+), 10 deletions(-) diff --git a/Services/client/src/components/FileForm.vue b/Services/client/src/components/FileForm.vue index 2dfee63..c9f545c 100644 --- a/Services/client/src/components/FileForm.vue +++ b/Services/client/src/components/FileForm.vue @@ -19,6 +19,7 @@ const props = withDefaults( description?: string keyword?: string[] category?: string[] + author?: string }>(), { open: false, @@ -34,6 +35,7 @@ const emit = defineEmits([ 'update:description', 'update:keyword', 'update:category', + 'update:author', 'filechange', 'reset', 'submit', @@ -56,6 +58,7 @@ function reset() { emit('update:description', '') emit('update:keyword', '') emit('update:category', '') + emit('update:author', '') emit('reset') } @@ -67,6 +70,7 @@ function submit() { description: props.description ?? '', keyword: props.keyword, category: props.category, + author: props.author, }) } @@ -165,7 +169,9 @@ const file = ref() : '' " id="inputFile" - :rules="[(v) => (v !== undefined || mode === 'edit' ) || ('โปรดอัปโหลดไฟล์')]" + :rules="[ + (v) => v !== undefined || mode === 'edit' || 'โปรดอัปโหลดไฟล์', + ]" >