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 -}