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(() => {