upd: project

Deskripsi:
- tambah data project

nb : upload file blm selesai

No Issuese
This commit is contained in:
amel
2025-05-14 14:19:48 +08:00
parent 9a86ccae56
commit 6b3de4d6b2
8 changed files with 218 additions and 47 deletions

View File

@@ -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;
};

View File

@@ -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;