From 8513725dff5a078ca81329b34c582d19195e55d5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 31 Jan 2025 11:43:24 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/ProbationDetail.vue | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index 213e54a0e..652191a8e 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -154,7 +154,6 @@ const probation_statusOP = ref([ /** get ข้อมูล งานที่ได้รับมอบหมาย */ async function getAssignList() { - showLoader(); await http .get(config.API.probationGetAssignList(personalId.value)) .then(async (res) => { @@ -173,15 +172,11 @@ async function getAssignList() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } /** รายละเอียด ตาม id */ async function getpersonalList() { - showLoader(); await http .get(config.API.personal(personalId.value)) .then(async (res) => { @@ -195,9 +190,6 @@ async function getpersonalList() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } @@ -301,12 +293,19 @@ function onSearch() { /** get ค่า เมื่อโหลดหน้า */ onMounted(async () => { - await Promise.all([ - getpersonalList(), - getAssignList(), - fetchProfilePhoto(), - fetchCheckCommittee(), - ]); + try { + showLoader(); + await Promise.all([ + getpersonalList(), + getAssignList(), + fetchProfilePhoto(), + fetchCheckCommittee(), + ]); + } catch (error) { + console.error("Error fetching data:", error); + } finally { + hideLoader(); + } });