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',
|
form: 'Form',
|
||||||
properties: 'Properties',
|
properties: 'Properties',
|
||||||
designForm: 'Design Form',
|
designForm: 'Design Form',
|
||||||
|
passport: 'Passport',
|
||||||
|
passportNo: 'Passport No.',
|
||||||
|
visa: 'VISA',
|
||||||
|
visaNo: 'VISA No.',
|
||||||
|
enterToAdd: 'Press enter to add.',
|
||||||
|
forExample: 'eg. {example}',
|
||||||
},
|
},
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,12 @@ export default {
|
||||||
form: 'แบบฟอร์ม',
|
form: 'แบบฟอร์ม',
|
||||||
designForm: 'ออกแบบฟอร์ม',
|
designForm: 'ออกแบบฟอร์ม',
|
||||||
properties: 'คุณสมบัติ',
|
properties: 'คุณสมบัติ',
|
||||||
|
passport: 'หนังสือเดินทาง',
|
||||||
|
passportNo: 'หมายเลขหนังสือเดินทาง',
|
||||||
|
visa: 'หนังสือลงตรา',
|
||||||
|
visaNo: 'หมายเลขหนังสือลงตรา',
|
||||||
|
enterToAdd: 'กดปุ่ม Enter เพื่อเพิ่ม',
|
||||||
|
forExample: 'เช่น {example}',
|
||||||
},
|
},
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
|
||||||
|
|
@ -43,10 +43,17 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
||||||
visa?: boolean;
|
visa?: boolean;
|
||||||
zipCode?: string;
|
zipCode?: string;
|
||||||
customerId?: string;
|
customerId?: string;
|
||||||
|
payload?: { passport?: string[] };
|
||||||
}) {
|
}) {
|
||||||
const res = await api.get<Pagination<Employee[]>>(`/employee`, {
|
const { payload, ...params } = opts || {};
|
||||||
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) {
|
if (res && res.status === 200) {
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue