refactor: group state

This commit is contained in:
Methapon2001 2024-08-02 17:23:07 +07:00
parent 97eea0cc6b
commit 28159e3445

View file

@ -99,6 +99,11 @@ const customerTypeSelected = ref<{
const employeeStats = ref(0);
const gridView = ref(false);
const splitPercent = ref(15); // Customer only
const currentPageCustomer = ref<number>(1);
const maxPageCustomer = ref<number>(1);
const currentPageEmployee = ref<number>(1);
const maxPageEmployee = ref<number>(1);
const pageSize = ref<number>(10);
watch(() => route.name, init);
watch(
@ -192,13 +197,6 @@ const registerAbleBranchOption = ref<{ id: string; name: string }[]>();
const branch = ref<CustomerBranch[]>();
const currentPageCustomer = ref<number>(1);
const maxPageCustomer = ref<number>(1);
const pageSize = ref<number>(10);
const currentPageEmployee = ref<number>(1);
const maxPageEmployee = ref<number>(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<CustomerType>('CORP');
const employeeHistoryDialog = ref(false);
const employeeHistory = ref<EmployeeHistory[]>();
@ -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);
}