feat: request list => PropertiesExpansion display employee name
This commit is contained in:
parent
a19e75e17d
commit
187ca4db0f
2 changed files with 20 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import DialogDuplicateData from 'components/DialogDuplicateData.vue';
|
|||
import useOptionStore from '../options';
|
||||
import { CustomerBranch } from '../customer/types';
|
||||
import { CustomerBranchRelation } from '../quotations';
|
||||
import { Employee } from '../employee/types';
|
||||
|
||||
export const baseUrl = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
|
|
@ -571,3 +572,17 @@ export function getCustomerName(
|
|||
(opts?.noCode ? '' : ' ' + `(${customer.code})`)
|
||||
);
|
||||
}
|
||||
|
||||
export function getEmployeeName(
|
||||
record: Employee,
|
||||
opts?: {
|
||||
locale?: string;
|
||||
},
|
||||
) {
|
||||
const employee = record;
|
||||
|
||||
return {
|
||||
['eng']: `${useOptionStore().mapOption(employee.namePrefix)} ${employee.firstNameEN} ${employee.lastNameEN}`,
|
||||
['tha']: `${useOptionStore().mapOption(employee.namePrefix)} ${employee.firstName} ${employee.lastName}`,
|
||||
}[opts?.locale || 'eng'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue