แก้แสดงข้อความกรณียื่นลาซ้ำ
This commit is contained in:
parent
19e8059cd8
commit
141c3a92f8
2 changed files with 14 additions and 3 deletions
|
|
@ -268,6 +268,7 @@ function onConfirm(id: string) {
|
|||
await http
|
||||
.put(config.API.leaveUserSendId(personalId.value), { reason: "" })
|
||||
.then(() => {
|
||||
router.push("/leave");
|
||||
success($q, "ยื่นใบลาสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -275,7 +276,6 @@ function onConfirm(id: string) {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
router.push("/leave");
|
||||
// fetchDataDetail(personalId.value);
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue