fix/feat: i18n/Show quotation contact on request list
This commit is contained in:
parent
26c9345699
commit
d446dba565
3 changed files with 52 additions and 49 deletions
|
|
@ -18,6 +18,7 @@ import useOptionStore from '../options';
|
|||
import { CustomerBranch } from '../customer/types';
|
||||
import { CustomerBranchRelation } from '../quotations';
|
||||
import { Employee } from '../employee/types';
|
||||
import { CreatedBy } from '../types';
|
||||
|
||||
export const baseUrl = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
|
|
@ -596,7 +597,7 @@ export function getCustomerName(
|
|||
}
|
||||
|
||||
export function getEmployeeName(
|
||||
record: Employee,
|
||||
record: Employee | CreatedBy,
|
||||
opts?: {
|
||||
locale?: string;
|
||||
},
|
||||
|
|
@ -604,7 +605,7 @@ export function getEmployeeName(
|
|||
const employee = record;
|
||||
|
||||
return {
|
||||
['eng']: `${useOptionStore().mapOption(employee.namePrefix)} ${employee.firstNameEN} ${employee.lastNameEN}`,
|
||||
['tha']: `${useOptionStore().mapOption(employee.namePrefix)} ${employee.firstName} ${employee.lastName}`,
|
||||
['eng']: `${typeof employee.namePrefix === 'string' ? useOptionStore().mapOption(employee.namePrefix) : ''} ${employee.firstNameEN} ${employee.lastNameEN}`,
|
||||
['tha']: `${typeof employee.namePrefix === 'string' ? useOptionStore().mapOption(employee.namePrefix) : ''} ${employee.firstName} ${employee.lastName}`,
|
||||
}[opts?.locale || 'eng'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue