feat: add i18n
This commit is contained in:
parent
89020a9832
commit
9d61ab8946
3 changed files with 22 additions and 3 deletions
|
|
@ -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