แยกการลา

This commit is contained in:
STW_TTTY\stwtt 2024-07-30 16:50:08 +07:00
parent 5c84afa6a8
commit 13eb56f214
8 changed files with 106 additions and 38 deletions

View file

@ -21,7 +21,7 @@ const mixin = useCounterMixin();
const leaveStore = useLeavelistDataStore();
const { showLoader, hideLoader, messageError } = mixin;
const { fetchListLeaveReject } = leaveStore;
const dataToobar = ref<any[]>([]);
const $q = useQuasar(); // noti quasar
const querySting = reactive<QuerySting>({
@ -85,7 +85,21 @@ async function updatePaging(
await fecthLeaveList();
}
/** function เรียกข้อมูลสถานะ*/
async function fetchOption() {
await http
.get(config.API.leaveType())
.then((res) => {
dataToobar.value = res.data.result;
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {});
}
onMounted(async () => {
await fetchOption();
await fecthLeaveList();
});
</script>
@ -93,6 +107,7 @@ onMounted(async () => {
<ToolBar
:rowsPerPage="querySting.pageSize"
@update:querySting="updatePaging"
:dataToobar="dataToobar"
/>
<TableList
:page="querySting.page"
@ -100,6 +115,7 @@ onMounted(async () => {
:maxPage="maxPage"
:totalList="totalList"
@update:querySting="updatePaging"
:dataToobar="dataToobar"
/>
</template>