import React, { useState } from 'react'; import { PlusCircle, UploadCloud, Eye, Download, Trash2, ChevronLeft, ChevronRight, DownloadCloud } from 'lucide-react'; import { LuHistory, LuSendHorizontal } from 'react-icons/lu'; // Mock Data untuk Tabel Riwayat Sertifikat const initialHistoryData = [ { id: 1, name: "Jonathan Kristina", email: "JonathanKristina@gmail.com", project: "Internify Project", date: "24 Oct 2024", initials: "JK" }, { id: 2, name: "Ahmad Faisal", email: "ahmad.faisal@gmail.com", project: "Web Dev Fundamentals", date: "15 Sep 2024", initials: "AF" }, { id: 3, name: "Siti Rahma", email: "siti.rahma@gmail.com", project: "UI/UX Essentials", date: "10 Aug 2024", initials: "SR" }, { id: 4, name: "David Beckham", email: "david.b@gmail.com", project: "Engineering Intern 101", date: "05 Aug 2024", initials: "DB" }, ]; const MentorCertificatePage = () => { // State Form Management const [selectedIntern, setSelectedIntern] = useState("JonathanKristina@gmail.com"); const [selectedProject, setSelectedProject] = useState("Internify Project (Web Development)"); const [issueDate, setIssueDate] = useState("2024-10-24"); const [expiryDate, setExpiryDate] = useState(""); // State Data Tabel const [historyData, setHistoryData] = useState(initialHistoryData); const handleIssueCertificate = (e: React.FormEvent) => { e.preventDefault(); const payload = { intern: selectedIntern, project: selectedProject, issueDate, expiryDate }; console.log("Issuing Certificate:", payload); alert("Certificate Issued Successfully!"); }; const handleDeleteHistory = (id: number) => { if(confirm("Are you sure you want to delete this certificate log?")) { setHistoryData(historyData.filter(item => item.id !== id)); } }; return (
{/* Breadcrumb & Header Title */}

Certificates >

Certificates

Administrate, issue, and track professional certifications for all interns.

{/* Main Grid Content */}
{/* Kiri: Form Issue New Certificate (4 Kolom) */}

Issue New Certificate

{/* Select Intern */}
{/* Select Project / Course */}
{/* Certificate Image Upload Area */}

Upload Certificate Image

PNG, JPG up to 5MB

{/* Date Grid */}
setIssueDate(e.target.value)} className="w-full px-3 py-2 bg-white border border-gray-200 rounded-lg text-xs font-medium text-gray-800 focus:outline-none focus:border-red-600 focus:ring-1 focus:ring-red-600" />
setExpiryDate(e.target.value)} className="w-full px-3 py-2 bg-white border border-gray-200 rounded-lg text-xs font-medium text-gray-800 focus:outline-none focus:border-red-600 focus:ring-1 focus:ring-red-600" />
{/* Submit Button */}
{/* Kanan: Issued Certificates History (8 Kolom) */}
{/* Header Table */}

Issued Certificates History

{/* Responsive Table Wrapper */}
{historyData.map((row) => ( {/* Kolom Nama Intern + Avatar Ringkas */} {/* Kolom Nama Proyek */} {/* Kolom Tanggal Terbit */} {/* Kolom Deretan Aksi */} ))}
Intern Name Project Issue Date Actions
{row.initials}

{row.name}

{row.email}

{row.project}

{row.date}

{/* Bagian Footer Tabel & Paginasi */}

Showing 1 to {historyData.length} of 1,284 entries

); } export default MentorCertificatePage;