feat: implement project management dashboard and certification module for mentors and interns

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-06-26 22:53:19 +07:00
parent 60aba4180e
commit 6ec9620f1f
13 changed files with 73 additions and 29 deletions
+12 -2
View File
@@ -15,7 +15,7 @@ import type {
// POST /project-api/add
export const createProject = async (
payload: CreateProjectPayload
): Promise<ProjectDetail> => {
): Promise<Project> => {
const res = await api.post("/project-api/add", payload);
return res.data.data;
};
@@ -23,7 +23,7 @@ export const createProject = async (
// GET /project-api/get
export const getProjects = async (
status?: "active" | "completed" | "archived"
): Promise<Project[]> => {
): Promise<ProjectDetail[]> => {
const res = await api.get("/project-api/get", {
params: status ? { status } : undefined,
});
@@ -115,4 +115,14 @@ export const assignMember = async (
): Promise<MemberAssignment> => {
const res = await api.post("/project-api/assign-member", payload);
return res.data.data;
};
export const removeMember = async (
payload: {
id_project: string | number;
id_user: number;
}
): Promise<MemberAssignment> => {
const res = await api.post("/project-api/remove-member", { id_project: payload.id_project, id_user: payload.id_user });
return res.data.data;
};