From 5dec77862ccbb1a508a9e247f1575b72bf979ff4 Mon Sep 17 00:00:00 2001
From: "Kemas M. Aryadary Rasyad"
<112590882+aryadary0706@users.noreply.github.com>
Date: Thu, 2 Jul 2026 10:27:28 +0700
Subject: [PATCH] feat: update certificate handling and project management
features
- Refactored CertificateHistory component to display dynamic certificate images.
- Modified CertificateNotAvailable component text for clarity on certificate publication.
- Enhanced CertificateForm to include file preview and clear functionality for uploaded images.
- Removed obsolete CertificatePage component to streamline mentor interface.
- Updated CertificateResult to handle project details and loading states more effectively.
- Improved HomeMentorPage structure by adjusting imports for better organization.
- Enhanced EligibleInternTable with navigation to results and improved error handling for certificate generation.
- Updated HomeMentorProject styles for consistency with design system.
- Added utility function to resolve image URLs for certificates.
- Introduced new hooks for generating certificates and managing notifications.
- Expanded project service functions to include project completion and assignable interns retrieval.
- Updated types for certificates and projects to reflect new data structures.
- Added user types for better type safety in user management.
---
src/App.tsx | 4 +-
.../{intern/components => }/HomeCalendar.tsx | 32 +--
src/Pages/internify/intern/HomeInternPage.tsx | 2 +-
.../intern/components/CertificateAvailabe.tsx | 5 +-
.../intern/components/CertificateHistory.tsx | 3 +-
.../components/CertificateNotAvailable.tsx | 5 +-
.../internify/mentor/CertificateForm.tsx | 112 ++++++---
.../internify/mentor/CertificatePage.tsx | 232 ------------------
.../internify/mentor/CertificateResult.tsx | 18 +-
src/Pages/internify/mentor/HomeMentorPage.tsx | 2 +-
.../mentor/components/EligibleInternTable.tsx | 13 +-
.../mentor/components/HomeMentorProject.tsx | 5 +-
src/Pages/utils/SertificateGenerator.ts | 17 +-
src/hooks/useCertificates.ts | 47 ++++
src/hooks/useNotification.ts | 12 +-
src/hooks/useProjects.ts | 43 +++-
src/hooks/useTasks.ts | 39 ++-
src/hooks/useUser.ts | 28 +--
src/services/CertificateService.ts | 5 +
src/services/ProjectService.ts | 17 +-
src/types/certificate.types.ts | 5 +
src/types/project.types.ts | 13 +-
src/types/user.types.ts | 17 ++
23 files changed, 326 insertions(+), 350 deletions(-)
rename src/Pages/internify/{intern/components => }/HomeCalendar.tsx (88%)
delete mode 100644 src/Pages/internify/mentor/CertificatePage.tsx
diff --git a/src/App.tsx b/src/App.tsx
index 4b1c47e..42885ef 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -118,8 +118,8 @@ function App() {
Loading calendar...
+- Semua tugas proyek telah selesai. Klik tombol di bawah untuk{" "} - mengklaim sertifikat kelulusan Anda. + Semua tugas proyek telah selesai. Silahkan tunggu Mentor untuk{" "} + Mempublish Sertifikat kelulusan Anda.
{/* Progress Bar — 100% */} @@ -53,7 +53,6 @@ export default function CertificateNotAvailable({Semua tugas telah diselesaikan! Silahkan tunggu untuk mendapatkan sertifikat