feat(medicine): modify entry-form, create handler and service

This commit is contained in:
riefive
2025-09-29 09:57:57 +07:00
parent 97d36f1279
commit 11e63dde3e
9 changed files with 566 additions and 110 deletions
@@ -11,7 +11,7 @@ import { toast } from '~/components/pub/ui/toast'
// Types
import { ActionEvents, type HeaderPrep } from '~/components/pub/custom-ui/data/types'
import { MedicineBaseSchema, type MedicineBaseFormData } from '~/schemas/medicine.schema'
import { BaseSchema, type BaseFormData } from '~/schemas/base.schema'
// Handlers
import {
@@ -122,12 +122,12 @@ onMounted(async () => {
prevent-outside
>
<AppMedicineMethodEntryForm
:schema="MedicineBaseSchema"
:schema="BaseSchema"
:values="recItem"
:is-loading="isProcessing"
:is-readonly="isReadonly"
@submit="
(values: MedicineBaseFormData | Record<string, any>, resetForm: () => void) => {
(values: BaseFormData | Record<string, any>, resetForm: () => void) => {
if (recId > 0) {
handleActionEdit(recId, values, getMedicineMethodList, resetForm, toast)
return