feat(material): update with processing

This commit is contained in:
riefive
2025-09-19 16:14:41 +07:00
parent 8aa6d3b6f8
commit 1e5b872f05
3 changed files with 13 additions and 5 deletions

No files matched your search

+3 -4
View File
@@ -3,10 +3,8 @@
import type z from 'zod'
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
import { toTypedSchema } from '@vee-validate/zod'
interface Props {
schema: z.ZodSchema<any>
@@ -116,10 +114,11 @@ function onCancelForm() {
</span>
</div>
<div class="my-2 flex justify-end gap-2 py-2">
<Button variant="secondary" class="w-[120px]" @click="onCancelForm"> Kembali </Button>
<Button type="button" variant="secondary" class="w-[120px]" @click="onCancelForm"> Kembali </Button>
<Button
type="button"
class="w-[120px]"
:disabled="isLoading"
@click="
() => {
handleSubmit(onSubmitForm)()
@@ -15,6 +15,7 @@ import {
recId,
recAction,
recItem,
isProcessing,
isFormEntryDialogOpen,
isRecordConfirmationOpen,
handleActionSave,
@@ -119,6 +120,7 @@ onMounted(async () => {
<AppEquipmentEntryForm
:schema="MaterialSchema"
:uoms="uoms"
:is-loading="isProcessing"
@submit="(values: MaterialFormData, resetForm: any) => handleActionSave(values, getEquipmentList, resetForm)"
@cancel="handleCancelForm"
/>