diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 9d213f3b..7ef61706 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -81,6 +81,7 @@ const { const flowStore = useFlowStore(); const employeeStore = useEmployeeStore(); const optionStore = useOptionStore(); +const currentTab = ref('employer'); const formData = ref({ status: 'CREATED', personName: '', @@ -129,6 +130,10 @@ const fieldSelectedCustomer = ref<{ label: string; value: string }>({ value: 'all', }); +const fieldSelected = ref(); +const fieldDisplay = ref(); +const splitterModel = ref(15); +const modeView = ref(true); const currentEmployee = ref(); const currentEmployeeCode = ref(''); const isEmployeeEdit = ref(false); @@ -1216,6 +1221,7 @@ watch(locale, () => { watch(fieldSelectedCustomer, async () => { let resultList; + console.log('asd'); if (fieldSelectedCustomer.value.value === 'all') { resultList = await fetchList({ includeBranch: true }); @@ -1278,6 +1284,12 @@ watch(genderSelector, async () => { watch(selectorLabel, async () => { if (inputSearch.value) inputSearch.value = undefined; + if (selectorLabel.value === 'EMPLOYEE') { + await fetchListEmployee(); + await fetchListStatsEmployeeGender(); + } else { + await fetchListCustomer(); + } }); watch([inputSearch, currentStatus], async () => { @@ -1331,10 +1343,25 @@ watch([inputSearch, currentStatus], async () => {
-
+
{{ $t('dataSum') }} + + {{ + selectorLabel === 'EMPLOYER' + ? listCustomer?.length + : listEmployee.length + }} + {
-
-
-
- - - - - - -
- - - - - - - - {{ $t('all') }} - - - {{ $t('statusACTIVE') }} - - - {{ $t('statusINACTIVE') }} - - - - -
- +
- +
@@ -3093,4 +3235,9 @@ watch([inputSearch, currentStatus], async () => { transform: translateY(-20px); opacity: 0; } + +.employer-active { + background-color: hsla(var(--info-bg) / 0.1); + color: hsl(var(--info-bg)); +}