no message
This commit is contained in:
parent
40300cf4ce
commit
b89c09a258
1 changed files with 6 additions and 14 deletions
|
|
@ -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, "กรุณากรอกข้อมูลให้ครบ");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue