diff --git a/src/i18n/eng.ts b/src/i18n/eng.ts index 9f26d2be..2cf172b3 100644 --- a/src/i18n/eng.ts +++ b/src/i18n/eng.ts @@ -124,6 +124,12 @@ export default { form: 'Form', properties: 'Properties', designForm: 'Design Form', + passport: 'Passport', + passportNo: 'Passport No.', + visa: 'VISA', + visaNo: 'VISA No.', + enterToAdd: 'Press enter to add.', + forExample: 'eg. {example}', }, menu: { diff --git a/src/i18n/tha.ts b/src/i18n/tha.ts index 07a85896..5ab71647 100644 --- a/src/i18n/tha.ts +++ b/src/i18n/tha.ts @@ -124,6 +124,12 @@ export default { form: 'แบบฟอร์ม', designForm: 'ออกแบบฟอร์ม', properties: 'คุณสมบัติ', + passport: 'หนังสือเดินทาง', + passportNo: 'หมายเลขหนังสือเดินทาง', + visa: 'หนังสือลงตรา', + visaNo: 'หมายเลขหนังสือลงตรา', + enterToAdd: 'กดปุ่ม Enter เพื่อเพิ่ม', + forExample: 'เช่น {example}', }, menu: { diff --git a/src/stores/employee/index.ts b/src/stores/employee/index.ts index 8266b2b5..2f14e3bf 100644 --- a/src/stores/employee/index.ts +++ b/src/stores/employee/index.ts @@ -43,10 +43,17 @@ const useEmployeeStore = defineStore('api-employee', () => { visa?: boolean; zipCode?: string; customerId?: string; + payload?: { passport?: string[] }; }) { - const res = await api.get>(`/employee`, { - params: opts, - }); + const { payload, ...params } = opts || {}; + + const res = payload + ? await api.post>(`/employee`, payload, { + params, + }) + : await api.get>(`/employee`, { + params, + }); if (res && res.status === 200) { data.value = res.data;