feat: add i18n
This commit is contained in:
parent
89020a9832
commit
9d61ab8946
3 changed files with 22 additions and 3 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -124,6 +124,12 @@ export default {
|
|||
form: 'แบบฟอร์ม',
|
||||
designForm: 'ออกแบบฟอร์ม',
|
||||
properties: 'คุณสมบัติ',
|
||||
passport: 'หนังสือเดินทาง',
|
||||
passportNo: 'หมายเลขหนังสือเดินทาง',
|
||||
visa: 'หนังสือลงตรา',
|
||||
visaNo: 'หมายเลขหนังสือลงตรา',
|
||||
enterToAdd: 'กดปุ่ม Enter เพื่อเพิ่ม',
|
||||
forExample: 'เช่น {example}',
|
||||
},
|
||||
|
||||
menu: {
|
||||
|
|
|
|||
|
|
@ -43,10 +43,17 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
visa?: boolean;
|
||||
zipCode?: string;
|
||||
customerId?: string;
|
||||
payload?: { passport?: string[] };
|
||||
}) {
|
||||
const res = await api.get<Pagination<Employee[]>>(`/employee`, {
|
||||
params: opts,
|
||||
});
|
||||
const { payload, ...params } = opts || {};
|
||||
|
||||
const res = payload
|
||||
? await api.post<Pagination<Employee[]>>(`/employee`, payload, {
|
||||
params,
|
||||
})
|
||||
: await api.get<Pagination<Employee[]>>(`/employee`, {
|
||||
params,
|
||||
});
|
||||
|
||||
if (res && res.status === 200) {
|
||||
data.value = res.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue