fix: worker display number, expire date
This commit is contained in:
parent
1c3d4388f0
commit
d05eae23a9
2 changed files with 11 additions and 3 deletions
|
|
@ -394,6 +394,7 @@ async function assignWorkerToSelectedWorker() {
|
||||||
if (quotationFormData.value.customerBranchId) {
|
if (quotationFormData.value.customerBranchId) {
|
||||||
const retEmp = await customerStore.fetchBranchEmployee(
|
const retEmp = await customerStore.fetchBranchEmployee(
|
||||||
quotationFormData.value.customerBranchId,
|
quotationFormData.value.customerBranchId,
|
||||||
|
{ passport: true },
|
||||||
);
|
);
|
||||||
if (retEmp) {
|
if (retEmp) {
|
||||||
workerList.value = retEmp.data.result;
|
workerList.value = retEmp.data.result;
|
||||||
|
|
@ -560,7 +561,9 @@ watch(
|
||||||
history.pushState({}, '', url.toString());
|
history.pushState({}, '', url.toString());
|
||||||
|
|
||||||
if (!v) return;
|
if (!v) return;
|
||||||
const retEmp = await customerStore.fetchBranchEmployee(v);
|
const retEmp = await customerStore.fetchBranchEmployee(v, {
|
||||||
|
passport: true,
|
||||||
|
});
|
||||||
if (retEmp) {
|
if (retEmp) {
|
||||||
workerList.value = retEmp.data.result;
|
workerList.value = retEmp.data.result;
|
||||||
}
|
}
|
||||||
|
|
@ -702,7 +705,9 @@ async function searchEmployee(text: string) {
|
||||||
fallback-img="/images/employee-avatar.png"
|
fallback-img="/images/employee-avatar.png"
|
||||||
:rows="
|
:rows="
|
||||||
selectedWorker.map((e: Employee) => ({
|
selectedWorker.map((e: Employee) => ({
|
||||||
foreignRefNo: '123456789',
|
foreignRefNo: e.employeePassport
|
||||||
|
? e.employeePassport[0]?.number || '-'
|
||||||
|
: '-',
|
||||||
employeeName:
|
employeeName:
|
||||||
$i18n.locale === 'eng'
|
$i18n.locale === 'eng'
|
||||||
? `${e.firstNameEN} ${e.lastNameEN}`
|
? `${e.firstNameEN} ${e.lastNameEN}`
|
||||||
|
|
@ -711,7 +716,9 @@ async function searchEmployee(text: string) {
|
||||||
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,
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
query?: string;
|
query?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
pageSize?: number;
|
pageSize?: number;
|
||||||
|
passport?: boolean;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue