refactor: by value
This commit is contained in:
parent
40ecbed053
commit
91586b8e92
1 changed files with 7 additions and 2 deletions
|
|
@ -1391,7 +1391,10 @@ async function getWorkerFromCriteria(
|
||||||
:agent-price="agentPrice"
|
:agent-price="agentPrice"
|
||||||
:employee-rows="
|
:employee-rows="
|
||||||
selectedWorker.map((e: Employee) => ({
|
selectedWorker.map((e: Employee) => ({
|
||||||
foreignRefNo: '123456789',
|
foreignRefNo:
|
||||||
|
e.employeePassport !== undefined
|
||||||
|
? e.employeePassport[0]?.number || '-'
|
||||||
|
: '-',
|
||||||
employeeName:
|
employeeName:
|
||||||
$i18n.locale === 'eng'
|
$i18n.locale === 'eng'
|
||||||
? `${e.firstNameEN} ${e.lastNameEN}`
|
? `${e.firstNameEN} ${e.lastNameEN}`
|
||||||
|
|
@ -1400,7 +1403,9 @@ async function getWorkerFromCriteria(
|
||||||
gender: e.gender,
|
gender: e.gender,
|
||||||
age: calculateAge(e.dateOfBirth),
|
age: calculateAge(e.dateOfBirth),
|
||||||
nationality: optionStore.mapOption(e.nationality),
|
nationality: optionStore.mapOption(e.nationality),
|
||||||
documentExpireDate: '1234',
|
documentExpireDate: e.employeePassport
|
||||||
|
? dateFormat(e.employeePassport[0]?.expireDate) || '-'
|
||||||
|
: '-',
|
||||||
imgUrl: `${baseUrl}/customer/${e.id}/image/${e.selectedImage}`,
|
imgUrl: `${baseUrl}/customer/${e.id}/image/${e.selectedImage}`,
|
||||||
status: e.status,
|
status: e.status,
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue