diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 34708618..2404e64f 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -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); if (resultListEmployee) { currentPageEmployee.value = resultListEmployee.page; @@ -1145,6 +1148,15 @@ watch(genderselector, async (gender) => { watch(currentStatus, async () => { if (selectorLabel.value === 'EMPLOYER') { await fetchListCustomer(); + } else { + await fetchListEmployee({ + status: + currentStatus.value === 'All' + ? undefined + : currentStatus.value === 'ACTIVE' + ? 'ACTIVE' + : 'INACTIVE', + }); } });