diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue index 36a49d991..4190bd833 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue @@ -22,8 +22,9 @@ const dataStore = useDisciplineSuspendStore(); const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); -const { messageError, showLoader, hideLoader, success } = mixin; +const { messageError, showLoader, hideLoader, success, date2Thai ,convertDateToAPI} = mixin; +const date = ref(null); const employeeClass = ref(""); const employeeClassOption = ref([ { id: "", name: "ทั้งหมด" }, @@ -189,6 +190,11 @@ function openModalOrder() { /** ดึงข้อมูลหน้าหลัก */ async function getList() { showLoader(); + const params: Record = {}; + if (date.value && date.value.length === 2) { + params.startDate = convertDateToAPI(date.value[0]); + params.endDate = convertDateToAPI(date.value[1]); + } await http .get( config.API.suspendMain( @@ -196,7 +202,8 @@ async function getList() { pagination.value.rowsPerPage, filterKeyword.value.trim(), employeeClass.value - ) + ), + { params } ) .then(async (res) => { const data = await res.data.result.data; @@ -274,10 +281,56 @@ onMounted(async () => { option-value="id" option-label="name" label="ประเภทตำแหน่ง" - style="min-width: 250px" + style="min-width: 200px" @update:model-value="getList" /> +
+ + + + + +