feat: implement mentor dashboard features including project task management, submission tracking, and modal-based task creation.

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-06-26 18:05:54 +07:00
parent 53b270921d
commit 60aba4180e
19 changed files with 471 additions and 275 deletions
+24 -2
View File
@@ -35,7 +35,16 @@ export const getProjectMembers = async (
id: string | number
): Promise<ProjectMember[]> => {
const res = await api.get(`/project-api/get/${id}`);
return res.data.data.members;
console.log(res.data.data.member);
return res.data.data.members.map((m: any) => ({
id: m.id_user,
avatar: m.user.profile_picture ?? null,
full_name: m.user.full_name,
email: m.user.email,
professional_bio: m.user.professional_bio,
position: m.user.position,
kelompok_peminatan: m.user.kelompok_peminatan,
}));
};
// GET /project-api/get/{id}
@@ -43,7 +52,20 @@ export const getProjectById = async (
id: string | number
): Promise<ProjectDetail> => {
const res = await api.get(`/project-api/get/${id}`);
return res.data.data;
const raw = res.data.data;
return {
...raw,
members: raw.members.map((m: any) => ({
id: m.id_user,
avatar: m.user?.profile_picture ?? null,
full_name: m.user?.full_name,
email: m.user?.email,
professional_bio: m.user?.professional_bio ?? null,
position: m.user?.position,
kelompok_peminatan: m.user?.kelompok_peminatan,
})),
};
};
// PATCH /project-api/update/{id}