From d3629cff31606d1705a8e6c66b15399e75a888fc Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 27 Nov 2023 09:23:43 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=20fetch=20=E0=B8=82=E0=B9=89?= =?UTF-8?q?=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormTime.vue | 4 ++-- src/components/PopUp.vue | 10 +++++++++- src/components/TableHistory.vue | 1 + src/components/ToolBar.vue | 8 ++++++-- src/views/HistoryView.vue | 1 + 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/components/FormTime.vue b/src/components/FormTime.vue index ca7955a..030dbc5 100644 --- a/src/components/FormTime.vue +++ b/src/components/FormTime.vue @@ -25,7 +25,7 @@ const props = defineProps({ type: Function, required: true, }, - fetcthDataTable: { + fetchData: { type: Function, require: true, }, @@ -59,7 +59,6 @@ const checkstatusBox = ref(false) /** function checkValidate*/ function onCkickSave() { - props.closePopup?.() const hasError = [] for (const key in objectRef) { if (Object.prototype.hasOwnProperty.call(objectRef, key)) { @@ -107,6 +106,7 @@ async function createListTime(data: FormTimeStemp) { }) .finally(() => { props.closePopup?.() + props.fetchData?.() }) } diff --git a/src/components/PopUp.vue b/src/components/PopUp.vue index 2ffadac..e103c73 100644 --- a/src/components/PopUp.vue +++ b/src/components/PopUp.vue @@ -21,6 +21,10 @@ const props = defineProps({ type: Object, default: null, }, + fetchData: { + type: Function, + default: () => console.log('not function'), + }, }) const data = ref() @@ -39,7 +43,11 @@ watch( - + diff --git a/src/components/TableHistory.vue b/src/components/TableHistory.vue index 0a96529..e46d8bb 100644 --- a/src/components/TableHistory.vue +++ b/src/components/TableHistory.vue @@ -431,6 +431,7 @@ const checkRequestEdit = (checkInStatus: string, checkOutStatus: string) => { diff --git a/src/views/HistoryView.vue b/src/views/HistoryView.vue index 3685034..3a92dd6 100644 --- a/src/views/HistoryView.vue +++ b/src/views/HistoryView.vue @@ -109,6 +109,7 @@ onMounted(() => {