From 0f0e1439da912ccaf2c8cb9865fd065d2c9a8cef Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 4 Apr 2025 11:01:59 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=A3?= =?UTF-8?q?=E0=B8=B5=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B8=94=E0=B9=80=E0=B9=80?= =?UTF-8?q?=E0=B8=A5=E0=B9=89=E0=B8=A7=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=AB=E0=B8=B2=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/05_leave/views/EditPage.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/modules/05_leave/views/EditPage.vue b/src/modules/05_leave/views/EditPage.vue index d2648c3..40107ac 100644 --- a/src/modules/05_leave/views/EditPage.vue +++ b/src/modules/05_leave/views/EditPage.vue @@ -300,10 +300,25 @@ async function onClickDelete(id: string, docId: string) { }); } +/** function เรียกประเภทการลา */ +async function fectOptionType() { + await http + .get(config.API.leaveType()) + .then(async (res) => { + dataStore.fetchLeaveType(res.data.result); + }) + .catch((err) => { + messageError($q, err); + }); +} + /**เมื่อเริ่มโหลดหน้า * เรียกใช้งาน fetchData เพื่อดึงข้อมูล */ onMounted(async () => { + if (dataStore.options.length == 0) { + fectOptionType(); + } await fetchDataDetail(personalId.value); });