From 8aa6d3b6f8c60279032e683711ad9a33d4a08551 Mon Sep 17 00:00:00 2001 From: riefive Date: Fri, 19 Sep 2025 16:08:42 +0700 Subject: [PATCH] feat(material): retest material --- app/components/app/equipment/entry-form.vue | 19 +++++++++----- app/components/content/equipment/list.vue | 29 ++++++++++++--------- app/models/uom.ts | 1 + server/api/[...req].ts | 4 +-- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/app/components/app/equipment/entry-form.vue b/app/components/app/equipment/entry-form.vue index 0bcb6e5f..51d8947f 100644 --- a/app/components/app/equipment/entry-form.vue +++ b/app/components/app/equipment/entry-form.vue @@ -5,12 +5,12 @@ import type { MaterialFormData } from '~/schemas/material' // helpers import { toTypedSchema } from '@vee-validate/zod' import { useForm } from 'vee-validate' +import Alert from '~/components/pub/ui/alert/Alert.vue' // components interface Props { schema: z.ZodSchema uoms: any[] - items: any[] } const isLoading = ref(false) @@ -26,7 +26,6 @@ const { handleSubmit, defineField, errors } = useForm({ code: '', name: '', uom_code: '', - item_id: '', stock: 0, } as Partial, }) @@ -34,14 +33,12 @@ const { handleSubmit, defineField, errors } = useForm({ const [code, codeAttrs] = defineField('code') const [name, nameAttrs] = defineField('name') const [uom, uomAttrs] = defineField('uom_code') -const [item, itemAttrs] = defineField('item_id') const [stock, stockAttrs] = defineField('stock') const resetForm = () => { code.value = '' name.value = '' uom.value = '' - item.value = '' stock.value = 0 } @@ -61,7 +58,7 @@ function onCancelForm() {