upd: position
Deskripsi: - update load list data position - update filter page - update select form - tambah data position No Issues
This commit is contained in:
14
lib/api.ts
14
lib/api.ts
@@ -81,6 +81,20 @@ export const apiDeleteGroup = async (data: { user: string, isActive: boolean },
|
||||
});
|
||||
};
|
||||
|
||||
export const apiGetPosition = async ({ user, active, search, group }: { user: string, active: string, search: string, group?: string }) => {
|
||||
const response = await api.get(`mobile/position?user=${user}&active=${active}&group=${group}&search=${search}`);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const apiCreatePosition = async (data: { user: string, name: string, idGroup: string }) => {
|
||||
await api.post('mobile/position', data).then(response => {
|
||||
return response.data;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// export const updateEntityById = async (id: any, updatedEntity: any) => {
|
||||
// const response = await api.put(`/entities/${id}`, updatedEntity);
|
||||
|
||||
Reference in New Issue
Block a user