From 0435371e1c0bc0dd1ae81376ad767cafc46279cd Mon Sep 17 00:00:00 2001 From: riefive Date: Wed, 3 Sep 2025 15:47:07 +0700 Subject: [PATCH] feat (device): update entry form of device --- app/components/flow/device/entry.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/components/flow/device/entry.vue b/app/components/flow/device/entry.vue index b5c8c491..d53afb5c 100644 --- a/app/components/flow/device/entry.vue +++ b/app/components/flow/device/entry.vue @@ -7,19 +7,17 @@ const data = ref({ code: '', name: '', type: '', - stock: 0, }) const schema = z.object({ code: z.string().min(1, 'Code must be at least 1 characters long'), name: z.string().min(1, 'Name must be at least 1 characters long'), type: z.string(), - stock: z.preprocess((val) => Number(val), z.number({ invalid_type_error: 'Stok harus berupa angka' })), }) function onClick(type: string) { if (type === 'cancel') { - navigateTo('/tools-equipment-src/material') + navigateTo('/tools-equipment-src/device') } else if (type === 'draft') { // do something } else if (type === 'submit') { @@ -55,9 +53,9 @@ function onClick(type: string) {