fixing return message error closed #877
This commit is contained in:
parent
f005d119b6
commit
07b45ba3ab
2 changed files with 38 additions and 11 deletions
|
|
@ -481,6 +481,32 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
}
|
||||
};
|
||||
|
||||
const messageErrorLinkage = (q: any, e: any = "") => {
|
||||
try {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
title: `พบข้อผิดพลาด`,
|
||||
message: e.message,
|
||||
icon: "warning",
|
||||
color: "red",
|
||||
onlycancel: true,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
title: `พบข้อผิดพลาด`,
|
||||
message: `ไม่สามารถเชื่อมต่อกับฐานข้อมูลกรมการปกครองได้`,
|
||||
icon: "warning",
|
||||
color: "red",
|
||||
onlycancel: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fails = (q: any, val: string) => {
|
||||
// useQuasar ไม่สามารถใช้นอกไฟล์ .vue
|
||||
if (val !== "") {
|
||||
|
|
@ -1142,6 +1168,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
modalError,
|
||||
dialogMessage,
|
||||
messageError,
|
||||
messageErrorLinkage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
typeRetire,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue