From 0ae36dcccb0de1c316c073d108966019b0d89299 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 10 Jan 2024 11:04:27 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=20=E0=B8=9B?= =?UTF-8?q?=E0=B8=8F=E0=B8=B4=E0=B8=97=E0=B8=B4=E0=B8=99=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B3=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/views/ChangeRoundMain.vue | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/modules/09_leave/views/ChangeRoundMain.vue b/src/modules/09_leave/views/ChangeRoundMain.vue index ed6d7b1b2..48509c548 100644 --- a/src/modules/09_leave/views/ChangeRoundMain.vue +++ b/src/modules/09_leave/views/ChangeRoundMain.vue @@ -56,11 +56,30 @@ function Openmodal(check: string, detail: any) { } } +/** + * function เรียกข้อมูลปฏิทินวันทำงาน + * @param id profileId + */ +async function fetchDataCalendarWork(id: string) { + showLoader(); + await http + .get(config.API.leaveWorkByid(id)) + .then((res) => { + dateWork.value = res.data.result.work; + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + modalFix.value = true; + hideLoader(); + }); +} + const detailByid = ref(); -function OpenmodalFix(detail: any) { - dateWork.value = "NORMAL"; +async function OpenmodalFix(detail: any) { + await fetchDataCalendarWork(detail.profileId); detailByid.value = detail; - modalFix.value = true; } /** Function closePopup */