แก้ฟิลเตอร์
This commit is contained in:
parent
c289880166
commit
55f865baf7
2 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const useChangeRoundDataStore = defineStore(
|
|||
"changeRoundDataStore",
|
||||
() => {
|
||||
const roundOp = ref<any>([]);
|
||||
const roundOpMain = ref<any>([]);
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const visibleColumns = ref<string[]>([
|
||||
"cardId",
|
||||
|
|
@ -235,7 +236,8 @@ export const useChangeRoundDataStore = defineStore(
|
|||
|
||||
totalListMain,
|
||||
maxPageMain,
|
||||
roundOp
|
||||
roundOp,
|
||||
roundOpMain
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue