แก้แสดงข้อความกรณียื่นลาซ้ำ

This commit is contained in:
Warunee Tamkoo 2024-01-19 13:40:51 +07:00
parent 19e8059cd8
commit 141c3a92f8
2 changed files with 14 additions and 3 deletions

View file

@ -411,7 +411,7 @@ export const useCounterMixin = defineStore("mixin", () => {
component: CustomComponent,
componentProps: {
title: `ข้อความแจ้งเตือน`,
message: `ขออภัยไม่สามารถลาได้เนื่องจากจำนวนวันลาของคุณเกินสิทธิ์ที่กำหนด`,
message: `ไม่สามารถขอลาในช่วงเวลาเดียวกันได้ เนื่องจากมีการขอลาในช่วงเวลาดังกล่าวแล้ว`,
icon: "warning",
color: "red",
onlycancel: true,
@ -432,7 +432,18 @@ export const useCounterMixin = defineStore("mixin", () => {
onlycancel: true,
},
});
} else {
} else if (e.response.data.result) {
q.dialog({
component: CustomComponent,
componentProps: {
title: `ข้อความแจ้งเตือน`,
message: `${e.response.data.result}`,
icon: "warning",
color: "red",
onlycancel: true,
},
});
} else if (e.response.data.message) {
q.dialog({
component: CustomComponent,
componentProps: {