feat: filter สถานะ ของลูกจ้าง
This commit is contained in:
parent
253a7685f1
commit
22f673da08
1 changed files with 13 additions and 1 deletions
|
|
@ -700,7 +700,10 @@ async function fetchListCustomer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchListEmployee(param?: { gender: string }) {
|
async function fetchListEmployee(param?: {
|
||||||
|
gender?: string;
|
||||||
|
status?: 'CREATED' | 'ACTIVE' | 'INACTIVE' | undefined;
|
||||||
|
}) {
|
||||||
const resultListEmployee = await employeeStore.fetchList(param);
|
const resultListEmployee = await employeeStore.fetchList(param);
|
||||||
if (resultListEmployee) {
|
if (resultListEmployee) {
|
||||||
currentPageEmployee.value = resultListEmployee.page;
|
currentPageEmployee.value = resultListEmployee.page;
|
||||||
|
|
@ -1145,6 +1148,15 @@ watch(genderselector, async (gender) => {
|
||||||
watch(currentStatus, async () => {
|
watch(currentStatus, async () => {
|
||||||
if (selectorLabel.value === 'EMPLOYER') {
|
if (selectorLabel.value === 'EMPLOYER') {
|
||||||
await fetchListCustomer();
|
await fetchListCustomer();
|
||||||
|
} else {
|
||||||
|
await fetchListEmployee({
|
||||||
|
status:
|
||||||
|
currentStatus.value === 'All'
|
||||||
|
? undefined
|
||||||
|
: currentStatus.value === 'ACTIVE'
|
||||||
|
? 'ACTIVE'
|
||||||
|
: 'INACTIVE',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue