แก้ฟิลเตอร์

This commit is contained in:
setthawutttty 2025-06-16 13:35:59 +07:00
parent c289880166
commit 55f865baf7
2 changed files with 9 additions and 2 deletions

View file

@ -151,11 +151,11 @@ async function fetchDataOption() {
name: `${r.startTimeMorning}-${r.endTimeAfternoon}`,
});
});
const filterData = option.filter(
(e) => e.name !== props.DataRow?.currentRound
);
dataStore.roundOp = filterData;
dataStore.roundOpMain = option;
})
.catch((err) => {
messageError($q, err);
@ -205,6 +205,11 @@ watch(
if (props.modal === true && dataStore.roundOp.length == 0) {
currentPage.value = 1;
await fetchDataOption();
} else {
const dataOp = dataStore.roundOpMain.filter(
(e: any) => e.name !== props.DataRow?.currentRound
);
dataStore.roundOp = dataOp;
}
}
);