diff --git a/src/i18n/eng/index.ts b/src/i18n/eng/index.ts index c8ed670e..558009b6 100644 --- a/src/i18n/eng/index.ts +++ b/src/i18n/eng/index.ts @@ -401,6 +401,20 @@ export default { mother: 'Mother', motherBirthPlace: 'Mother Birth Place', }, + fileType: { + passport: 'Passport', + visa: 'VISA', + tm6: 'TM.6', + workPermit: 'Work Permit', + noticeJobEmployment: 'Foreign Worker Employment Notification Form', + noticeJobEntry: + 'Foreign Worker Employment Commencement Notification Form', + historyJob: 'Employment History Form', + acceptJob: + 'Acknowledgement of Foreign Worker Employment Notification Form', + receipt: 'Receipt', + other: 'Other', + }, }, customerBranch: { tab: { diff --git a/src/i18n/tha/index.ts b/src/i18n/tha/index.ts index f4a215b6..dc285183 100644 --- a/src/i18n/tha/index.ts +++ b/src/i18n/tha/index.ts @@ -400,6 +400,18 @@ export default { mother: 'มารดา', motherBirthPlace: 'สถานที่เกิดของมารดา', }, + fileType: { + passport: 'ข้อมูลหนังสือการเดินทาง', + visa: 'ข้อมูลการตรวจลงตรา', + tm6: 'ตม.6', + workPermit: 'ใบอนุญาตทำงาน', + noticeJobEmployment: 'แบบแจ้งการจ้างคนต่างด้าวทำงาน', + noticeJobEntry: 'แบบแจ้งเข้าทำงานของคนต่างด้าว', + historyJob: 'ใบคัดประวัติระบบจัดหางาน', + acceptJob: 'ใบตอบรับการแจ้งเกี่ยวกับการทำงานของคนต่างด้าว', + receipt: 'ใบเสร็จรับเงิน', + other: 'อื่นๆ', + }, }, customerBranch: { tab: { diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 6ece0e07..35d2441f 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -3120,7 +3120,11 @@ const emptyCreateDialog = ref(false); const _group = c.group || 'other'; if (!a[_group]) { a[_group] = { - label: _group, + label: $t( + uploadFileListEmployee.find( + (v) => v.value === _group, + )?.label || _group, + ), file: [ { label: diff --git a/src/pages/03_customer-management/constant.ts b/src/pages/03_customer-management/constant.ts index 9ba90e24..71d5e9ad 100644 --- a/src/pages/03_customer-management/constant.ts +++ b/src/pages/03_customer-management/constant.ts @@ -49,43 +49,43 @@ export const uploadFileListEmployee: { value: string; }[] = [ { - label: 'ข้อมูลหนังสือการเดินทาง', - value: 'travelBook', + label: 'customerEmployee.fileType.passport', + value: 'passport', }, { - label: 'ข้อมูลการตรวจลงตรา', - value: 'checkList', + label: 'customerEmployee.fileType.visa', + value: 'visa', }, { - label: 'ตม.6', + label: 'customerEmployee.fileType.tm6', value: 'tm6', }, { - label: 'ใบอนุญาตทำงาน', - value: 'license', + label: 'customerEmployee.fileType.workPermit', + value: 'workPermit', }, { - label: 'แบบแจ้งการจ้างคนต่างด้าวทำงาน', - value: 'noticeJob', + label: 'customerEmployee.fileType.noticeJobEmployment', + value: 'noticeJobEmployment', }, { - label: 'แบบแจ้งเข้าทำงานของคนต่างด้าว', - value: 'noticeJobOther', + label: 'customerEmployee.fileType.noticeJobEntry', + value: 'noticeJobEntry', }, { - label: 'ใบคัดประวัติระบบจัดหางาน', + label: 'customerEmployee.fileType.historyJob', value: 'historyJob', }, { - label: 'ใบตอบรับการแจ้งเกี่ยวกับการทำงานของคนต่างด้าว', + label: 'customerEmployee.fileType.acceptJob', value: 'acceptJob', }, { - label: 'ใบเสร็จรับเงิน', + label: 'customerEmployee.fileType.receipt', value: 'receipt', }, { - label: 'อื่นๆ', + label: 'customerEmployee.fileType.other', value: 'other', }, ]; diff --git a/src/stores/employee/index.ts b/src/stores/employee/index.ts index 9a92c04e..d1cb4a4a 100644 --- a/src/stores/employee/index.ts +++ b/src/stores/employee/index.ts @@ -88,9 +88,9 @@ const useEmployeeStore = defineStore('api-employee', () => { const _name = file.name; const _ext = _name.split('.').at(-1); - let filename = group || 'other' + '-' + Date.now(); + let filename = (group || 'other') + '-' + Date.now(); - if (_ext) filename += '.' + _ext; + if (_ext) filename = filename + '.' + _ext; await uploadAttachment(res.data.id, file, filename); }