ปรับ mixin messageError แสดง result ก่อน
This commit is contained in:
parent
f4ee2b89fc
commit
174530e7f9
3 changed files with 4 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, dialogConfirm, success, messageError } = mixin;
|
const { dialogConfirm, success, messageError } = mixin;
|
||||||
|
|
||||||
/** propsData จาก RoundMain */
|
/** propsData จาก RoundMain */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ const pagination = ref({
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="props.row.isActive === false"
|
v-if="props.row.isDefault === false"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -376,11 +376,12 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const message = e.response.data.result ?? e.response.data.message;
|
||||||
q.dialog({
|
q.dialog({
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: `พบข้อผิดพลาด`,
|
title: `พบข้อผิดพลาด`,
|
||||||
message: `${e.response.data.message}`,
|
message: `${message}`,
|
||||||
icon: "warning",
|
icon: "warning",
|
||||||
color: "red",
|
color: "red",
|
||||||
onlycancel: true,
|
onlycancel: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue