upd: project
Deskripsi: - tambah data project nb : upload file blm selesai No Issuese
This commit is contained in:
@@ -287,4 +287,13 @@ export const apiDeleteProjectMember = async (data: { user: string, idUser: strin
|
||||
export const apiAddMemberProject = async ({ data, id }: { data: { user: string, member: any[] }, id: string }) => {
|
||||
const response = await api.post(`/mobile/project/${id}/member`, data)
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const apiCreateProject = async (data: FormData) => {
|
||||
const response = await api.post(`/mobile/project`, data, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
})
|
||||
return response.data;
|
||||
};
|
||||
@@ -7,8 +7,11 @@ const taskCreate = createSlice({
|
||||
setTaskCreate: (state, action) => {
|
||||
return action.payload;
|
||||
},
|
||||
deleteTaskCreate: (state, action) => {
|
||||
return state.filter((item: any, index: number) => index != action.payload);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setTaskCreate } = taskCreate.actions;
|
||||
export const { setTaskCreate, deleteTaskCreate } = taskCreate.actions;
|
||||
export default taskCreate.reducer;
|
||||
Reference in New Issue
Block a user