progress
This commit is contained in:
@@ -5,7 +5,7 @@ import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||
import { toast } from '~/components/pub/ui/toast'
|
||||
import Confirmation from '~/components/pub/my-ui/confirmation/confirmation.vue'
|
||||
import { KfrSchema, } from '~/schemas/kfr.schema'
|
||||
import { handleActionSave } from '~/handlers/kfr.handler'
|
||||
import { handleActionSave, handleActionEdit } from '~/handlers/kfr.handler'
|
||||
import { getDetail } from '~/services/kfr.service';
|
||||
|
||||
// #region Props & Emits
|
||||
@@ -50,12 +50,20 @@ function goBack() {
|
||||
|
||||
async function handleConfirmAdd() {
|
||||
const inputData: any = await composeFormData()
|
||||
const response = await handleActionSave(
|
||||
inputData,
|
||||
() => { },
|
||||
() => { },
|
||||
toast,
|
||||
)
|
||||
const response = props.mode === `add`
|
||||
? await handleActionSave(
|
||||
inputData,
|
||||
() => { },
|
||||
() => { },
|
||||
toast,
|
||||
)
|
||||
: await handleActionEdit(
|
||||
kfrId,
|
||||
inputData,
|
||||
() => { },
|
||||
() => { },
|
||||
toast,
|
||||
)
|
||||
|
||||
const data = (response?.body?.data ?? null)
|
||||
if (!data) return
|
||||
|
||||
Reference in New Issue
Block a user