Toast Implementation; fix add interns dialogue: penghapusan UI delete pada dialog komponen; penambahan params pada generate sertificate; perubahan tipe state untuk submission (user bisa open file submission)

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-07-07 11:47:33 +07:00
parent 7a331b8e7d
commit 91d7bcf3f7
18 changed files with 501 additions and 290 deletions
+8 -3
View File
@@ -1,4 +1,5 @@
import { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { Check, Download, Info } from "lucide-react";
import { LuFileSpreadsheet } from "react-icons/lu";
import { io } from "socket.io-client";
@@ -14,7 +15,7 @@ const getCookieToken = () => {
export default function NotificationList() {
const [notifications, setNotifications] = useState<UINotification[]>([]);
const navigate = useNavigate();
useEffect(() => {
const loadNotifications = async () => {
try {
@@ -131,7 +132,9 @@ export default function NotificationList() {
{/* Conditional Actions */}
{item.type === 'new-task' && (
<div className="flex items-center gap-2 pt-3">
<button className="px-4 py-1.5 bg-[#B30000] hover:bg-[#990000] text-white text-xs font-bold rounded-lg shadow-sm transition-colors">
<button
className="px-4 py-1.5 bg-[#B30000] hover:bg-[#990000] text-white text-xs font-bold rounded-lg shadow-sm transition-colors"
onClick={() => navigate(`/projects/${item.link}`)}>
View Task
</button>
<button className="px-4 py-1.5 border border-gray-200 text-gray-500 hover:text-gray-700 hover:bg-gray-50 text-xs font-semibold rounded-lg transition-colors">
@@ -141,7 +144,9 @@ export default function NotificationList() {
)}
{item.type === 'achievement' && (
<button className="flex items-center gap-1 text-xs font-bold text-[#B30000] hover:underline pt-2">
<button
className="flex items-center gap-1 text-xs font-bold text-[#B30000] hover:underline pt-2"
onClick={() => navigate(`/certificate`)}>
<Download className="w-3.5 h-3.5" />
Download Certificate
</button>