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