no message

This commit is contained in:
setthawutttty 2023-08-18 11:56:08 +07:00
parent 40300cf4ce
commit b89c09a258

View file

@ -1540,6 +1540,7 @@ const {
messageError,
showLoader,
hideLoader,
dialogConfirm
} = mixin;
const filterData = (options: any[], excludedGroups: any[]) => {
return options.filter(
@ -1946,18 +1947,12 @@ const putData = (id: string) => {
return data;
};
const saveData = (id: string) => {
myForm.value.validate().then((result: boolean) => {
const saveData = (id:string) => {
dialogConfirm($q,()=>DataSave(id))
}
const DataSave = async (id: string) => {
await myForm.value.validate().then((result: boolean) => {
if (result) {
$q.dialog({
title: "บันทึกข้อมูล",
message: "ต้องการบันทึกข้อมูลนี้ใช่หรือไม่ ?",
cancel: {
flat: true,
const: "negative",
},
})
.onOk(() => {
const data = putData(id);
http
.post(config.API.saveFinish(id), data)
@ -1968,9 +1963,6 @@ const saveData = (id: string) => {
.finally(() => {
hideLoader();
});
})
.onCancel(() => {})
.onDismiss(() => {});
} else {
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
}