แก้แสดงข้อความกรณียื่นลาซ้ำ
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
|
await http
|
||||||
.put(config.API.leaveUserSendId(personalId.value), { reason: "" })
|
.put(config.API.leaveUserSendId(personalId.value), { reason: "" })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
router.push("/leave");
|
||||||
success($q, "ยื่นใบลาสำเร็จ");
|
success($q, "ยื่นใบลาสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
|
|
@ -275,7 +276,6 @@ function onConfirm(id: string) {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
router.push("/leave");
|
|
||||||
// fetchDataDetail(personalId.value);
|
// fetchDataDetail(personalId.value);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: `ข้อความแจ้งเตือน`,
|
title: `ข้อความแจ้งเตือน`,
|
||||||
message: `ขออภัยไม่สามารถลาได้เนื่องจากจำนวนวันลาของคุณเกินสิทธิ์ที่กำหนด`,
|
message: `ไม่สามารถขอลาในช่วงเวลาเดียวกันได้ เนื่องจากมีการขอลาในช่วงเวลาดังกล่าวแล้ว`,
|
||||||
icon: "warning",
|
icon: "warning",
|
||||||
color: "red",
|
color: "red",
|
||||||
onlycancel: true,
|
onlycancel: true,
|
||||||
|
|
@ -432,7 +432,18 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
onlycancel: true,
|
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({
|
q.dialog({
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue