upd: project

Deskripsi;
- hapus detail project task
- edit detail project task
- fix tambah detail project task

No Issues
This commit is contained in:
amel
2025-05-13 11:52:43 +08:00
parent a9368e3e32
commit f7fac510ec
4 changed files with 174 additions and 43 deletions

View File

@@ -248,7 +248,7 @@ export const apiEditProject = async (data: { name: string, user: string }, id: s
return response.data;
};
export const apiCreateProjectTask = async ({ data, id }: { data: { name: string, dateStart: Date, user: string, dateEnd: Date }, id: string }) => {
export const apiCreateProjectTask = async ({ data, id }: { data: { name: string, dateStart: string, user: string, dateEnd: string }, id: string }) => {
const response = await api.post(`/mobile/project/${id}`, data)
return response.data;
};
@@ -261,4 +261,19 @@ export const apiCancelProject = async (data: { user: string, reason: string }, i
export const apiUpdateStatusProjectTask = async (data: { user: string, status: number, idProject: string }, id: string) => {
const response = await api.put(`mobile/project/detail/${id}`, data)
return response.data
};
export const apiDeleteProjectTask = async (data: { user: string, idProject: string }, id: string) => {
const response = await api.delete(`mobile/project/detail/${id}`, { data })
return response.data
};
export const apiGetProjectTask = async ({ user, id }: { user: string, id: string }) => {
const response = await api.get(`mobile/project/detail/${id}?user=${user}`);
return response.data;
};
export const apiEditProjectTask = async ({ data, id }: { data: { title: string, dateStart: string, user: string, dateEnd: string }, id: string }) => {
const response = await api.post(`/mobile/project/detail/${id}`, data)
return response.data;
};