From c1fce2e3c535989d70d47b30877c20967cbdff16 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 24 Nov 2023 09:48:30 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20code=20?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2=E0=B8=9B=E0=B8=8F?= =?UTF-8?q?=E0=B8=B4=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=87=E0=B8=B2?= =?UTF-8?q?=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Work/DialogDetail.vue | 14 +++--- .../09_leave/components/1_Work/Tab1.vue | 21 +++++--- .../09_leave/components/1_Work/Tab2.vue | 8 ++- .../09_leave/components/1_Work/TableList.vue | 34 +++++++------ .../09_leave/components/1_Work/ToolBar.vue | 50 +++++++++++++------ .../components/1_Work/ToolBarDate.vue | 24 +++++---- src/modules/09_leave/stores/WorkStore.ts | 6 +-- 7 files changed, 96 insertions(+), 61 deletions(-) diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/1_Work/DialogDetail.vue index 35edb002f..7d26b171f 100644 --- a/src/modules/09_leave/components/1_Work/DialogDetail.vue +++ b/src/modules/09_leave/components/1_Work/DialogDetail.vue @@ -48,13 +48,6 @@ const formData = reactive({ fullName: "", checkOutDescription: "", }); -watch(props, () => { - if (props.modal) { - if (props.detail) { - fetchDetailByid(props.detail.id); - } - } -}); /** * function เรียกรายการลงเวลาตาม @@ -105,6 +98,13 @@ async function fetchDetailByid(id: string) { function colsePopup() { props.colse ? props.colse() : false; } + +watch( + () => props.modal, + () => { + props.modal === true && props.detail && fetchDetailByid(props.detail.id); + } +);