feat: add i18n

This commit is contained in:
Methapon Metanipat 2024-08-28 15:07:31 +07:00
parent 52c18e6a6c
commit 6c30e4412d
5 changed files with 48 additions and 18 deletions

View file

@ -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: {

View file

@ -400,6 +400,18 @@ export default {
mother: 'มารดา',
motherBirthPlace: 'สถานที่เกิดของมารดา',
},
fileType: {
passport: 'ข้อมูลหนังสือการเดินทาง',
visa: 'ข้อมูลการตรวจลงตรา',
tm6: 'ตม.6',
workPermit: 'ใบอนุญาตทำงาน',
noticeJobEmployment: 'แบบแจ้งการจ้างคนต่างด้าวทำงาน',
noticeJobEntry: 'แบบแจ้งเข้าทำงานของคนต่างด้าว',
historyJob: 'ใบคัดประวัติระบบจัดหางาน',
acceptJob: 'ใบตอบรับการแจ้งเกี่ยวกับการทำงานของคนต่างด้าว',
receipt: 'ใบเสร็จรับเงิน',
other: 'อื่นๆ',
},
},
customerBranch: {
tab: {

View file

@ -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:

View file

@ -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',
},
];

View file

@ -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);
}