fixing filter kpi

This commit is contained in:
Warunee Tamkoo 2025-08-01 10:12:05 +07:00
parent 3d34a8d3ff
commit 4c8549dbb2

View file

@ -126,6 +126,7 @@ async function fetchRoundOption() {
} else {
roundOp.value = [];
store.formQuery.round = "";
rows.value = [];
}
})
.catch((err) => {
@ -146,6 +147,7 @@ async function fetchList() {
keyword: store.formQuery.keyword.trim(),
status: formQuery.status === "" ? undefined : formQuery.status,
results: formQuery.results === "" ? undefined : formQuery.results,
year: year.value,
};
await http
@ -193,12 +195,12 @@ function redirectViewDetailOnly(id: string) {
}
/** ฟังก์ชันเคลียข้อมูลค้นหาเป็นค้นหาจ้อมูลทั้งหมด*/
function clearYear() {
year.value = null;
store.formQuery.round = "";
roundOp.value = [];
changRound();
}
// function clearYear() {
// year.value = null;
// store.formQuery.round = "";
// roundOp.value = [];
// changRound();
// }
/**
* function updatePagination
@ -285,8 +287,6 @@ onMounted(async () => {
hide-bottom-space
:model-value="year === null ? 'ทั้งหมด' : Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
:clearable="year !== null"
@clear="clearYear"
>
<template v-slot:prepend>
<q-icon