refactor: handle field only lagelPersonNo , registerName

This commit is contained in:
Thanaphon Frappet 2024-10-28 13:04:37 +07:00
parent dac32c8eae
commit 2e941af305

View file

@ -379,12 +379,6 @@ async function fetchListCustomer(fetchStats = false) {
maxPageCustomer.value = Math.ceil(resultList.total / pageSize.value); maxPageCustomer.value = Math.ceil(resultList.total / pageSize.value);
listCustomer.value = resultList.result; listCustomer.value = resultList.result;
} }
if (fetchStats) {
statsCustomerType.value = await customerStore
.getStatsCustomer()
.then((value) => (value ? value : { CORP: 0, PERS: 0 }));
}
} }
async function fetchListEmployee(fetchStats = false) { async function fetchListEmployee(fetchStats = false) {
@ -2132,12 +2126,7 @@ const emptyCreateDialog = ref(false);
]; ];
} }
if (customerFormData.customerType === 'CORP') { if (customerFormData.customerType === 'CORP') {
tabFieldRequired.main = [ tabFieldRequired.main = ['legalPersonNo', 'registerName'];
'legalPersonNo',
'registerName',
'registerNameEN',
'customerName',
];
} }
let tapIsUndefined = validateTabField( let tapIsUndefined = validateTabField(
customerFormData.customerBranch?.[idx], customerFormData.customerBranch?.[idx],