From febfbf48289f8448eeec7f34e7599e30f702bc03 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Fri, 11 Apr 2025 13:24:08 +0700 Subject: [PATCH] refactor: add new column --- src/i18n/eng.ts | 9 ++------- src/i18n/tha.ts | 1 + .../08_request-list/TableRequestList.vue | 20 +++++++++++++++++++ src/pages/08_request-list/constants.ts | 18 +++++++++++++++++ src/stores/request-list/types.ts | 1 + 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/i18n/eng.ts b/src/i18n/eng.ts index 241621bb..49950acd 100644 --- a/src/i18n/eng.ts +++ b/src/i18n/eng.ts @@ -477,7 +477,6 @@ export default { powerOfAttorney: 'Power of Attorney', others: 'Others', }, - employer: 'Employer', employerLegalEntity: 'Legal Entity', employerNaturalPerson: 'Natrual Person', @@ -499,15 +498,12 @@ export default { religion: 'Religion', issueDate: 'Issue Date', passportExpiryDate: 'Passport Expiry Date', - ownerName: 'Customer Name', firstName: 'First Name ', lastName: 'Last Name ', firstNameEN: 'First Name in English', lastNameEN: 'Last Name in English', - cardNumber: 'ID Card Number', - prefixName: 'Prefix', legalPersonNo: 'Legal Entity Registration Number', registerName: 'Company Name', @@ -515,7 +511,6 @@ export default { registerDate: 'Registered On', registerCompanyName: 'Registered Name', authorizedCapital: 'Authorized Capital', - workplace: 'Workplace', workplaceEN: 'Workplace (EN)', address: 'Address', @@ -523,7 +518,6 @@ export default { branchCode: 'Branch Code', customerCode: 'Employer Code', legalPersonCode: 'Legal Entity Code', - codeAbbrev: 'Company Abbreviation', codeNumber: 'Company Number', registeredBranch: 'Registered Branch', @@ -941,8 +935,9 @@ export default { localEmployee: 'Local Employee', nonLocalEmployee: 'Non Local Employee', noWorkflowTemplate: 'A workflow template has not been selected.', - salesRepresentative: 'Sales Representative', + + dataOffice: 'Employment Office District', ref: 'Reference', action: { title: 'Action', diff --git a/src/i18n/tha.ts b/src/i18n/tha.ts index f4837cc0..de4bebbd 100644 --- a/src/i18n/tha.ts +++ b/src/i18n/tha.ts @@ -932,6 +932,7 @@ export default { nonLocalEmployee: 'พนักงานนอกพื้นที่', noWorkflowTemplate: 'คุณไม่ได้เลือกแม่แบบขั้นตอนการทำงาน', salesRepresentative: 'พนักงานขาย', + dataOffice: 'สำนักงานเขตจัดหางาน', ref: 'อ้างอิง', action: { title: 'จัดการ', diff --git a/src/pages/08_request-list/TableRequestList.vue b/src/pages/08_request-list/TableRequestList.vue index 99706193..e0ae445e 100644 --- a/src/pages/08_request-list/TableRequestList.vue +++ b/src/pages/08_request-list/TableRequestList.vue @@ -13,6 +13,7 @@ import useOptionStore from 'src/stores/options'; import KebabAction from 'src/components/shared/KebabAction.vue'; import { CreatedBy } from 'src/stores/types'; +import { dateFormatJS } from 'src/utils/datetime'; const props = withDefaults( defineProps<{ @@ -168,6 +169,25 @@ function getEmployeeName( {{ getEmployeeName(props.row, { locale: $i18n.locale }) || '-' }} + + + {{ + props.row.employee.employeePassport.length !== 0 + ? props.row.employee.employeePassport[0].number + : '-' + }} + + + {{ + $i18n.locale === 'eng' + ? props.row.dataOffice.nameEN + : props.row.dataOffice.name + }} + + + {{ dateFormatJS({ date: props.row.createdAt }) }} + + {{ props.row.quotation.code || '-' }} diff --git a/src/pages/08_request-list/constants.ts b/src/pages/08_request-list/constants.ts index 2534aea5..c71aac2e 100644 --- a/src/pages/08_request-list/constants.ts +++ b/src/pages/08_request-list/constants.ts @@ -28,6 +28,24 @@ export const column = [ label: 'customer.employee', field: 'employee', }, + { + name: 'employeePassport', + align: 'center', + label: 'customerEmployee.form.passportNo', + field: 'employeePassport', + }, + { + name: 'dataOffice', + align: 'center', + label: 'requestList.dataOffice', + field: 'dataOffice', + }, + { + name: 'createdAt', + align: 'center', + label: 'general.createdAt', + field: 'createdAt', + }, { name: 'quotationCode', diff --git a/src/stores/request-list/types.ts b/src/stores/request-list/types.ts index 8d7f5d08..e3d8cd57 100644 --- a/src/stores/request-list/types.ts +++ b/src/stores/request-list/types.ts @@ -28,6 +28,7 @@ export type RequestData = { requestWork: RequestWork[]; requestDataStatus: RequestDataStatus; + dataOffice: { name: string; nameEN: string }; }; export enum RequestDataStatus {