From 28159e3445d6e5051fabd8429c48a00b810e3203 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:23:07 +0700 Subject: [PATCH] refactor: group state --- src/pages/03_customer-management/MainPage.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index cf2a3bae..89088d36 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -99,6 +99,11 @@ const customerTypeSelected = ref<{ const employeeStats = ref(0); const gridView = ref(false); const splitPercent = ref(15); // Customer only +const currentPageCustomer = ref(1); +const maxPageCustomer = ref(1); +const currentPageEmployee = ref(1); +const maxPageEmployee = ref(1); +const pageSize = ref(10); watch(() => route.name, init); watch( @@ -192,13 +197,6 @@ const registerAbleBranchOption = ref<{ id: string; name: string }[]>(); const branch = ref(); -const currentPageCustomer = ref(1); -const maxPageCustomer = ref(1); -const pageSize = ref(10); - -const currentPageEmployee = ref(1); -const maxPageEmployee = ref(1); - const customerStats = [ { id: 1, count: 2, name: 'CORP' }, { id: 2, count: 3, name: 'PERS' }, @@ -210,7 +208,6 @@ const fieldCustomer = [ 'customerNaturalPerson', ] as const; -const customerType = ref('CORP'); const employeeHistoryDialog = ref(false); const employeeHistory = ref(); @@ -899,8 +896,6 @@ async function openHistory(id: string) { () => { const { branch, ...payload } = props.row; currentCustomer = payload; - - customerType = props.row.customerType; // assignFormData(props.row.id); // openDialogInputForm('INFO', props.row.id); }