fix: request list => handle undefined name on table
This commit is contained in:
parent
97e76d952b
commit
c8c2032183
1 changed files with 4 additions and 4 deletions
|
|
@ -45,8 +45,8 @@ function getCustomerName(
|
||||||
}[opts?.locale || 'eng'],
|
}[opts?.locale || 'eng'],
|
||||||
['PERS']:
|
['PERS']:
|
||||||
{
|
{
|
||||||
['eng']: `${useOptionStore().mapOption(customer.namePrefix)} ${customer.firstNameEN} ${customer.lastNameEN}`,
|
['eng']: `${useOptionStore().mapOption(customer?.namePrefix)} ${customer?.firstNameEN} ${customer?.lastNameEN}`,
|
||||||
['tha']: `${useOptionStore().mapOption(customer.namePrefix)} ${customer.firstName} ${customer.lastName}`,
|
['tha']: `${useOptionStore().mapOption(customer?.namePrefix)} ${customer?.firstName} ${customer?.lastName}`,
|
||||||
}[opts?.locale || 'eng'] || '-',
|
}[opts?.locale || 'eng'] || '-',
|
||||||
}[customer.customer.customerType] +
|
}[customer.customer.customerType] +
|
||||||
(opts?.noCode ? '' : ' ' + `(${customer.code})`)
|
(opts?.noCode ? '' : ' ' + `(${customer.code})`)
|
||||||
|
|
@ -63,8 +63,8 @@ function getEmployeeName(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
{
|
{
|
||||||
['eng']: `${useOptionStore().mapOption(employee.namePrefix)} ${employee.firstNameEN} ${employee.lastNameEN}`,
|
['eng']: `${useOptionStore().mapOption(employee?.namePrefix)} ${employee?.firstNameEN} ${employee?.lastNameEN}`,
|
||||||
['tha']: `${useOptionStore().mapOption(employee.namePrefix)} ${employee.firstName} ${employee.lastName}`,
|
['tha']: `${useOptionStore().mapOption(employee?.namePrefix)} ${employee?.firstName} ${employee?.lastName}`,
|
||||||
}[opts?.locale || 'eng'] || '-'
|
}[opts?.locale || 'eng'] || '-'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue