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); + } +);