upd: project
Deskripsi; - hapus detail project task - edit detail project task - fix tambah detail project task No Issues
This commit is contained in:
17
lib/api.ts
17
lib/api.ts
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user