From df9e271f7482035f0aea8e820e3c929064a2400c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 1 Jul 2024 23:13:11 +0700 Subject: [PATCH] =?UTF-8?q?comment=20=E0=B8=84=E0=B8=B3=E0=B8=99=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B9=80=E0=B8=84=E0=B8=A3=E0=B8=B7=E0=B9=88=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/2_Manage/listManage.vue | 22 +++++++------------ src/modules/07_insignia/views/ResultPage.vue | 10 ++++----- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/modules/07_insignia/components/2_Manage/listManage.vue b/src/modules/07_insignia/components/2_Manage/listManage.vue index 835d18b88..490e6476a 100644 --- a/src/modules/07_insignia/components/2_Manage/listManage.vue +++ b/src/modules/07_insignia/components/2_Manage/listManage.vue @@ -287,20 +287,18 @@ async function directorApproved() { await http .get(config.API.insigniaDirectorApproved(round.value, DataStore.agency)) .then(async () => { - success($q, "บันทึกสำเร็จ"); await fecthInsigniaByOc( round.value, DataStore.agency, "officer", tab.value ); + await fecthStat(round.value); + await success($q, "บันทึกสำเร็จ"); }) .catch((err) => { messageError($q, err); - }) - .finally(async () => { - await hideLoader(); - await fecthStat(round.value); + hideLoader(); }); }, "ยืนยันการอนุมัติ", @@ -325,13 +323,11 @@ async function backToEditinsignia2Role(reason: string) { "officer", tab.value ); - success($q, "การตีกลับสำเร็จ"); + modalbackInsignia2Role.value = await false; + await success($q, "การตีกลับสำเร็จ"); }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - modalbackInsignia2Role.value = false; }); }); } @@ -345,20 +341,18 @@ async function requestSendNote() { name: roundName.value, }) .then(async () => { - success($q, "บันทึกสำเร็จ"); await fecthInsigniaByOc( round.value, DataStore.typeOc, "officer", tab.value ); + await fecthStat(round.value); + await success($q, "บันทึกสำเร็จ"); }) .catch((err) => { messageError($q, err); - }) - .finally(async () => { - await hideLoader(); - await fecthStat(round.value); + hideLoader(); }); }); } diff --git a/src/modules/07_insignia/views/ResultPage.vue b/src/modules/07_insignia/views/ResultPage.vue index ce28359ac..b97e982f9 100644 --- a/src/modules/07_insignia/views/ResultPage.vue +++ b/src/modules/07_insignia/views/ResultPage.vue @@ -309,11 +309,11 @@ watch(tab, () => { }); /** callback function จำทำงานเมื่อ modal มีการเปลี่ยนแปลง*/ -// watch(modal, () => { -// if (modal.value == false) { -// fecthlistInsignia(); -// } -// }); +watch(modal, () => { + if (modal.value == false) { + fecthlistInsignia(); + } +}); /** function เรียกรายชื่อบันทึกผลการได้รับพระราชทานเครื่องราชอิสริยาภรณ์/การจ่ายใบกำกับ */ async function fecthlistInsignia() {