From 23e4b14a2601c2b786df7ac429a35dd630e0b5ab Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Oct 2024 11:24:39 +0700 Subject: [PATCH] =?UTF-8?q?fix=20load=20=E0=B8=A3=E0=B8=B1=E0=B8=81?= =?UTF-8?q?=E0=B8=A9=E0=B8=B2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=95=E0=B8=B3?= =?UTF-8?q?=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/17_acting/views/main.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/modules/17_acting/views/main.vue b/src/modules/17_acting/views/main.vue index 7b041e42d..af3e40221 100644 --- a/src/modules/17_acting/views/main.vue +++ b/src/modules/17_acting/views/main.vue @@ -70,7 +70,6 @@ async function updateSelected(data: PosMaster) { // เรียกใช้ function fetch รายชื่อ ,fetch รายชื่อรักษาการ await Promise.all([fetchPosMaster(), fetchListAct()]).finally(() => { isLaod.value = false; - console.log("test"); }); } @@ -188,6 +187,8 @@ function selectPosition(data: ListPerson) { }) .catch((err) => { messageError($q, err); + }) + .finally(() => { hideLoader(); }); } @@ -220,11 +221,13 @@ function onSwapPerson(type: string, id: string) { showLoader(); http .get(config.API.orgPosAct + `/swap/${type}/${id}`) - .then(() => { - fetchListAct(); + .then(async () => { + await fetchListAct(); }) .catch((err) => { messageError($q, err); + }) + .finally(() => { hideLoader(); }); } @@ -244,6 +247,8 @@ function onDelete(id: string) { }) .catch((err) => { messageError($q, err); + }) + .finally(() => { hideLoader(); }); });