upd: task division

Deskripsi:
- tambah task division
- hapus task division yg telah dibatalkan
- akses user sesuai dengan role

No Issuese
This commit is contained in:
amel
2025-05-27 12:20:47 +08:00
parent bc74be122d
commit 42f6257d03
9 changed files with 672 additions and 64 deletions

View File

@@ -549,4 +549,18 @@ export const apiCancelTask = async (data: { user: string, reason: string }, id:
export const apiAddMemberTask = async ({ data, id }: { data: { user: string, member: any[], idDivision: string }, id: string }) => {
const response = await api.post(`/mobile/task/${id}/member`, data)
return response.data;
};
export const apiCreateTask = async (data: FormData) => {
const response = await api.post(`/mobile/task`, data, {
headers: {
'Content-Type': 'multipart/form-data',
},
})
return response.data;
};
export const apiDeleteTask = async (data: { user: string }, id: string) => {
const response = await api.delete(`/mobile/task/${id}/lainnya`, { data })
return response.data;
};