From 3ea348f77996a4946f00e7f27c4088aff28aae4c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 29 Nov 2023 15:28:11 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9C=E0=B8=B9=E0=B8=81=20API=20=E0=B9=81?= =?UTF-8?q?=E0=B8=A5=E0=B8=B0=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4=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=B9=83=E0=B8=99?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A=20checkin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.history.ts | 1 + src/components/TableHistory.vue | 54 +++++--------- src/interface/response/checkin.ts | 2 + src/stores/chekin.ts | 2 + src/views/HistoryView.vue | 115 ++++++++++++++++++++---------- 5 files changed, 98 insertions(+), 76 deletions(-) diff --git a/src/api/api.history.ts b/src/api/api.history.ts index 023dbab..8c09d16 100644 --- a/src/api/api.history.ts +++ b/src/api/api.history.ts @@ -4,5 +4,6 @@ const TimeStamp = `${env.API_URI}/leave` export default { history: () => `${history}`, + historyTime: () => `${TimeStamp}/edit/history`, createTimeStamp: () => `${TimeStamp}/user/edit`, } diff --git a/src/components/TableHistory.vue b/src/components/TableHistory.vue index a92a633..e7bcb7d 100644 --- a/src/components/TableHistory.vue +++ b/src/components/TableHistory.vue @@ -17,10 +17,6 @@ const props = defineProps({ type: Boolean, defualt: false, }, - // selected: { - // type: Array, - // defualt: [], - // }, pageSize: { type: Number, defualt: 10, @@ -37,6 +33,11 @@ const props = defineProps({ type: Number, defualt: 0, }, + tab: { + type: String, + defualt: '', + required: true, + }, nornmalData: { type: Boolean, defualt: false, @@ -77,7 +78,8 @@ const props = defineProps({ }, }) -const keyword = ref() +const keyword = ref('') +const tab = ref(props.tab?.toString()) const emit = defineEmits(['update:change-page']) @@ -98,7 +100,6 @@ watch( 'update:change-page', currentPage.value, initialPagination.value.rowsPerPage, - true, keyword.value ) } @@ -115,7 +116,6 @@ async function filterFn() { 'update:change-page', 1, initialPagination.value.rowsPerPage, - true, keyword.value ) } @@ -222,17 +222,6 @@ function classStatus(status: string) { break } } - -const checkRequestEdit = (checkInStatus: string, checkOutStatus: string) => { - if ( - checkInStatus === 'ขาด' || - checkInStatus === 'สาย' || - checkOutStatus === 'ขาด' || - checkOutStatus === 'สาย' - ) - return true - else false -}