From 887b4b26f1c6c65d1702d8774a4e9715e7845bff Mon Sep 17 00:00:00 2001 From: Geethanjana Wijesena Date: Wed, 13 Aug 2025 03:22:07 +0530 Subject: [PATCH 1/8] Fixed header / Admin dashboard / Student dashboard Update Fixed header / Admin dashboard / Student dashboard Update --- .../(pages)/admin-dashboard/page.tsx | 252 ++++++++- .../(pages)/student-dashboard/page.tsx | 500 +++++++++++++++++- src/app/(dashboard)/components/button.tsx | 2 + src/app/(dashboard)/components/header.tsx | 4 +- src/app/(dashboard)/components/sidebar.tsx | 3 +- src/app/(dashboard)/style/button.css | 4 +- 6 files changed, 744 insertions(+), 21 deletions(-) diff --git a/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx index c28ac5d..60696b1 100644 --- a/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx @@ -4,7 +4,8 @@ import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; import { useState } from "react"; -import { FaChartBar, FaCog, FaTachometerAlt, FaUsers } from "react-icons/fa"; +import { FaChartBar, FaCog, FaEdit, FaTachometerAlt, FaTrash, FaUsers } from "react-icons/fa"; + export default function AdminDashboardPage() { const [selectedMenu, setSelectedMenu] = useState("overview"); @@ -18,26 +19,261 @@ export default function AdminDashboardPage() { let content; if (selectedMenu === "overview") { - content =

Overview Content

; + content = ( +
+

Admin Dashboard Overview

+
+
+

Total Users

+

1,248

+

+12% from last month

+
+
+

Active Sessions

+

342

+

+5% from last hour

+
+
+

Pending Requests

+

24

+

3 require immediate attention

+
+
+

System Status

+

Operational

+

All systems running smoothly

+
+
+
+

Quick Actions

+
+ + + +
+
+
+ ); } else if (selectedMenu === "users") { - content =

Users Content

; + content = ( +
+
+

User Management

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UserRoleEmailLast loginActions
John DoeAdministrator + john12@gmail.com + 2023-05-15 14:30 + + +
Jane SmithEditor + smith9@gmail.com + 2023-05-14 09:15 + + +
Robert JohnsonViewer + rbjohn@gmail.com + 2023-05-10 16:45 + + + +
+
+
+ ); } else if (selectedMenu === "analytics") { - content =

Analytics Content

; + content = ( +
+

Analytics Dashboard

+
+
+

User Activity

+
+

User Activity Chart

+
+
+
+

System Performance

+
+

Performance Metrics Chart

+
+
+
+
+

Recent Activity

+
    +
  • + New user registered + 2 hours ago +
  • +
  • + Report generated + 5 hours ago +
  • +
  • + Settings updated + 1 day ago +
  • +
  • + Security scan completed + 2 days ago +
  • +
+
+
+ ); } else if (selectedMenu === "settings") { - content =

Settings Content

; + content = ( +
+

System Settings

+
+
+

General Settings

+
+
+ + +
+
+ + +
+
+ +
+ + +
+
+
+
+
+

Security Settings

+
+
+ + +
+
+ +
+ + +
+
+
+
+
+ +
+
+
+ ); } return (
+
-
+ +
-
-
+
+
{content}
diff --git a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx index 689af71..4ff98ca 100644 --- a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx @@ -4,7 +4,7 @@ import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; import { useState } from "react"; -import { FaBook, FaCalendarAlt, FaClipboardList, FaUserGraduate } from "react-icons/fa"; +import { FaBook, FaCalendarAlt, FaClipboardList, FaUserGraduate, FaChartLine, FaBell, FaGraduationCap } from "react-icons/fa"; export default function StudentDashboardPage() { const [selectedMenu, setSelectedMenu] = useState("courses"); @@ -15,31 +15,515 @@ export default function StudentDashboardPage() { { id: "timetable", label: "Timetable", icon: }, { id: "assignments", label: "Assignments", icon: }, { id: "profile", label: "Profile", icon: }, + { id: "grades", label: "Grades", icon: }, + { id: "notifications", label: "Notifications", icon: }, ]; // Student-specific content let content; if (selectedMenu === "courses") { - content =

List of enrolled courses will be shown here.

; + content = ( +
+

My Courses

+
+
+

Mathematics 101

+

Dr. Sarah Johnson

+

Semester 1

+
+ Core + Active +
+
+
+

Physics 202

+

Prof. Michael Chen

+

Semester 1

+
+ Science + Active +
+
+
+

English

+

Dr. Emily Roberts

+

Semester 1

+
+ Humanities + Active +
+
+
+

Computer Science

+

Prof. David Wilson

+

Semester 2

+
+ Elective + Active +
+
+
+

Statistics

+

Dr. James Miller

+

Semester 2

+
+ Humanities + Active +
+
+
+

Chemistry Lab

+

Prof. Lisa Anderson

+

Semester 1

+
+ Lab + Active +
+
+
+
+

Course Actions

+
+ + + +
+
+
+ ); } else if (selectedMenu === "timetable") { - content =

Your class timetable will appear here.

; + content = ( +
+
+

Weekly Timetable

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeMondayTuesdayWednesdayThursdayFriday
09:00 - 10:30 +
+
Mathematics 101
+
Room 205
+
+
+
+
Physics 202
+
Lab 3
+
+
+
+
English
+
Room 102
+
+
+
+
Computer Sci
+
Lab 7
+
+
+
+
Statistics
+
Room 301
+
+
11:00 - 12:30 +
+
Physics 202
+
Room 108
+
+
+
+
English
+
Room 102
+
+
+
+
Mathematics 101
+
Room 205
+
+
+
+
Statistics
+
Room 301
+
+
+
+
Computer Sci
+
Lab 7
+
+
14:00 - 15:30 +
+
Computer Sci
+
Lab 7
+
+
+
+
Mathematics 101
+
Room 205
+
+
+
+
Physics 202
+
Lab 3
+
+
+
+
English
+
Room 102
+
+
+
+
Chemistry Lab
+
Lab 5
+
+
+
+
+ ); } else if (selectedMenu === "assignments") { - content =

All your assignments and due dates will be shown here.

; + content = ( +
+
+

My Assignments

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AssignmentCourseDue DateStatusActions
Calculus Problem Set 3Mathematics 1012025-08-18 23:59 + Pending + + +
Physics Lab Report 2Physics 2022025-08-20 23:59 + Pending + + +
Literary Analysis EssayEnglish2025-08-25 23:59 + Pending + + +
Programming Project 1Computer Science2025-09-01 23:59 + Submitted + + +
+
+
+ ); } else if (selectedMenu === "profile") { - content =

Your student profile information will be here.

; + content = ( +
+

Student Profile

+
+
+
+ Profile +
+

Alex Morgan

+

Student ID: STU123456

+

Computer Science Major

+
+
+ +

Personal Information

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +

Academic Information

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ ); + } else if (selectedMenu === "grades") { + content = ( +
+

My Grades

+
+
+

Current GPA: 3.75

+
+
+ Mathematics 101 + A- +
+
+ Physics 202 + B+ +
+
+ English + A +
+
+ Computer Science + A +
+
+ Statistics + B +
+
+
+ +
+

Grade Distribution

+
+

Grade Distribution Chart

+
+
+
+
+ ); + } else if (selectedMenu === "notifications") { + content = ( +
+

Notifications

+
+
    +
  • +
    +

    Assignment Due Reminder

    + 2 hours ago +
    +

    Calculus Problem Set 3 is due on August 18th

    +
    + Assignment +
    +
  • +
  • +
    +

    New Course Material Available

    + 1 day ago +
    +

    Dr. Sarah Johnson has uploaded new lecture notes for Mathematics 101

    +
    + Course +
    +
  • +
  • +
    +

    Exam Schedule Published

    + 2 days ago +
    +

    Final exam schedule for Semester 1 is now available

    +
    + Exam +
    +
  • +
  • +
    +

    Library Workshop

    + 3 days ago +
    +

    Research Skills Workshop on August 20th at 14:00 in Library Room 101

    +
    + Event +
    +
  • +
+
+
+ ); } return (
-
+
-
-
+
+
{content}
diff --git a/src/app/(dashboard)/components/button.tsx b/src/app/(dashboard)/components/button.tsx index e2964c3..d7ad1dc 100644 --- a/src/app/(dashboard)/components/button.tsx +++ b/src/app/(dashboard)/components/button.tsx @@ -1,3 +1,5 @@ +import "../style/button.css"; + export default function Button({ type, label, onClick, className }: { type: "button" | "submit" | "reset" | undefined, label: string, diff --git a/src/app/(dashboard)/components/header.tsx b/src/app/(dashboard)/components/header.tsx index a6ee822..5c6f34c 100644 --- a/src/app/(dashboard)/components/header.tsx +++ b/src/app/(dashboard)/components/header.tsx @@ -15,7 +15,7 @@ export default function Header() { }; return ( -
+
{/* Left: UOP Logo and Title */}
diff --git a/src/app/(dashboard)/components/sidebar.tsx b/src/app/(dashboard)/components/sidebar.tsx index 82512e7..68fe076 100644 --- a/src/app/(dashboard)/components/sidebar.tsx +++ b/src/app/(dashboard)/components/sidebar.tsx @@ -1,5 +1,6 @@ "use client"; import { useState } from "react"; +import { FaChevronLeft, FaChevronRight } from "react-icons/fa"; export type MenuItem = { id: string; @@ -33,7 +34,7 @@ export default function Sidebar({ menuItems, onMenuSelect, selectedMenu }: Sideb className="mr-2 md:mr-0 mb-0 md:mb-4 p-1 rounded bg-dark3/20 dark:bg-dark3/30 hover:bg-dark3/40 dark:hover:bg-dark3/50 transition" title={isSidebarOpen ? "Collapse sidebar" : "Expand sidebar"} > - {isSidebarOpen ? "<" : ">"} + {isSidebarOpen ? : } {/* Dynamic Menu */} diff --git a/src/app/(dashboard)/style/button.css b/src/app/(dashboard)/style/button.css index 9e24681..4d92de0 100644 --- a/src/app/(dashboard)/style/button.css +++ b/src/app/(dashboard)/style/button.css @@ -4,8 +4,8 @@ .button{ @apply w-full - bg-dark5 text-dark3 py-2 rounded-lg hover:bg-dark3 hover:text-dark5 transition duration-300 - dark:bg-dark3 dark:text-dark5 py-2 rounded-lg dark:hover:bg-dark5 dark:hover:text-dark3 transition duration-300; + bg-dark5/80 text-dark3 px-4 py-2 rounded-lg hover:bg-dark3 hover:text-dark5 transition duration-300 + dark:bg-dark3 dark:text-dark5 px-4 py-2 rounded-lg dark:hover:bg-dark5 dark:hover:text-dark3 transition duration-300; } From 3bb22fce593018424a431e15959f1473692e257d Mon Sep 17 00:00:00 2001 From: Geethanjana Wijesena Date: Wed, 13 Aug 2025 03:25:36 +0530 Subject: [PATCH 2/8] student page update student page update --- src/app/(dashboard)/(pages)/student-dashboard/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx index 4ff98ca..bf98daf 100644 --- a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx @@ -4,7 +4,7 @@ import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; import { useState } from "react"; -import { FaBook, FaCalendarAlt, FaClipboardList, FaUserGraduate, FaChartLine, FaBell, FaGraduationCap } from "react-icons/fa"; +import { FaBook, FaCalendarAlt, FaClipboardList, FaUserGraduate, FaChartLine, FaBell } from "react-icons/fa"; export default function StudentDashboardPage() { const [selectedMenu, setSelectedMenu] = useState("courses"); From 459db7e05ea8f1d183503b433f2e8626c3d061c8 Mon Sep 17 00:00:00 2001 From: Bhathiya Piyathissa Date: Wed, 13 Aug 2025 09:01:47 +0530 Subject: [PATCH 3/8] Display credits alongside current GPA Added a credits count (18) next to the current GPA in the student dashboard for improved clarity on academic progress. --- src/app/(dashboard)/(pages)/student-dashboard/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx index bf98daf..6333fbd 100644 --- a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx @@ -427,7 +427,7 @@ export default function StudentDashboardPage() {

My Grades

-

Current GPA: 3.75

+

Current GPA: 3.75 (Credits: 18)

Mathematics 101 From 745891781d76fb7e1d93d84000241bd4e9f5d279 Mon Sep 17 00:00:00 2001 From: RAVINDU WEERAKOON Date: Wed, 13 Aug 2025 10:33:56 +0530 Subject: [PATCH 4/8] AUTH --- src/app/(auth)/components/loginForm.tsx | 2 +- .../(pages)/academic-dashboard/page.tsx | 21 +- .../(pages)/admin-dashboard/page.tsx | 33 +-- .../(pages)/developer-dashboard/page.tsx | 21 +- .../exam-claim-admin-dashboard/page.tsx | 21 +- .../first-year-admin-dashboard/page.tsx | 21 +- .../lab-allocation-admin-dashboard/page.tsx | 21 +- .../(pages)/non-academic-dashboard/page.tsx | 33 +-- .../(pages)/student-dashboard/page.tsx | 227 ++---------------- .../time-table-admin-dashboard/page.tsx | 21 +- 10 files changed, 127 insertions(+), 294 deletions(-) diff --git a/src/app/(auth)/components/loginForm.tsx b/src/app/(auth)/components/loginForm.tsx index fc22012..ef16c34 100644 --- a/src/app/(auth)/components/loginForm.tsx +++ b/src/app/(auth)/components/loginForm.tsx @@ -21,7 +21,7 @@ export default function LoginForm() { const response = await login(email, password); console.log("Login successful:", response); authLogin(response.access_token, response.user); - router.push("/user-dashboard"); + router.push("/admin-dashboard"); } catch (error) { console.error("Login failed:", error); // Handle login error (e.g., display error message to user) diff --git a/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx b/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx index 7f2c8b6..a902bdc 100644 --- a/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx @@ -1,22 +1,25 @@ import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import React from "react"; import "../../style/page.css"; export default function AcademicDashboardPage() { return ( -
- {/* Middle - Main Content */} -
-
-
- + +
+ {/* Middle - Main Content */} +
+
+
+ +
+ {/* Bottom - Footer */} +
- {/* Bottom - Footer */} -
-
+ ); } diff --git a/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx index 60696b1..d95ac75 100644 --- a/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/admin-dashboard/page.tsx @@ -1,5 +1,6 @@ "use client"; import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; @@ -262,23 +263,25 @@ export default function AdminDashboardPage() { } return ( -
+ +
-
+
-
- -
-
- {content} -
+
+ +
+
+ {content} +
+
-
-
-
+
+
+
); } diff --git a/src/app/(dashboard)/(pages)/developer-dashboard/page.tsx b/src/app/(dashboard)/(pages)/developer-dashboard/page.tsx index 1352511..0355454 100644 --- a/src/app/(dashboard)/(pages)/developer-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/developer-dashboard/page.tsx @@ -1,22 +1,25 @@ import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import React from "react"; import "../../style/page.css"; export default function DeveloperDashboardPage() { return ( -
- {/* Middle - Main Content */} -
-
-
- + +
+ {/* Middle - Main Content */} +
+
+
+ +
+ {/* Bottom - Footer */} +
- {/* Bottom - Footer */} -
-
+ ); } diff --git a/src/app/(dashboard)/(pages)/exam-claim-admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/exam-claim-admin-dashboard/page.tsx index 75a6623..46a2473 100644 --- a/src/app/(dashboard)/(pages)/exam-claim-admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/exam-claim-admin-dashboard/page.tsx @@ -1,22 +1,25 @@ import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import React from "react"; import "../../style/page.css"; export default function ExamClaimAdminDashboardPage() { return ( -
- {/* Middle - Main Content */} -
-
-
- + +
+ {/* Middle - Main Content */} +
+
+
+ +
+ {/* Bottom - Footer */} +
- {/* Bottom - Footer */} -
-
+ ); } diff --git a/src/app/(dashboard)/(pages)/first-year-admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/first-year-admin-dashboard/page.tsx index e1f7a22..1873c5d 100644 --- a/src/app/(dashboard)/(pages)/first-year-admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/first-year-admin-dashboard/page.tsx @@ -1,22 +1,25 @@ import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import React from "react"; import "../../style/page.css"; export default function FirstYearAdminPage() { return ( -
- {/* Middle - Main Content */} -
-
-
- + +
+ {/* Middle - Main Content */} +
+
+
+ +
+ {/* Bottom - Footer */} +
- {/* Bottom - Footer */} -
-
+ ); } diff --git a/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx index ad39799..8100d8a 100644 --- a/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx @@ -1,22 +1,25 @@ import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import React from "react"; import "../../style/page.css"; export default function LabAllocationAdminDashboardPage() { return ( -
- {/* Middle - Main Content */} -
-
-
- + +
+ {/* Middle - Main Content */} +
+
+
+ +
+ {/* Bottom - Footer */} +
- {/* Bottom - Footer */} -
-
+ ); } diff --git a/src/app/(dashboard)/(pages)/non-academic-dashboard/page.tsx b/src/app/(dashboard)/(pages)/non-academic-dashboard/page.tsx index cded5bb..c335016 100644 --- a/src/app/(dashboard)/(pages)/non-academic-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/non-academic-dashboard/page.tsx @@ -1,5 +1,6 @@ "use client"; import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; @@ -30,21 +31,23 @@ export default function StudentDashboardPage() { } return ( -
-
-
- -
-
- {content} -
+ +
+
+
+ +
+
+ {content} +
+
-
-
-
+
+
+ ); } diff --git a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx index 3c54fad..1581204 100644 --- a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx @@ -1,5 +1,6 @@ "use client"; import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; @@ -26,219 +27,27 @@ export default function StudentDashboardPage() { } else if (selectedMenu === "assignments") { content =

All your assignments and due dates will be shown here.

; } else if (selectedMenu === "profile") { -<<<<<<< HEAD - content = ( -
-

Student Profile

-
-
-
- Profile -
-

Alex Morgan

-

Student ID: STU123456

-

Computer Science Major

-
-
- -

Personal Information

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- -

Academic Information

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- ); - } else if (selectedMenu === "grades") { - content = ( -
-

My Grades

-
-
-

Current GPA: 3.75 (Credits: 18)

-
-
- Mathematics 101 - A- -
-
- Physics 202 - B+ -
-
- English - A -
-
- Computer Science - A -
-
- Statistics - B -
-
-
- -
-

Grade Distribution

-
-

Grade Distribution Chart

-
-
-
-
- ); - } else if (selectedMenu === "notifications") { - content = ( -
-

Notifications

-
-
    -
  • -
    -

    Assignment Due Reminder

    - 2 hours ago -
    -

    Calculus Problem Set 3 is due on August 18th

    -
    - Assignment -
    -
  • -
  • -
    -

    New Course Material Available

    - 1 day ago -
    -

    Dr. Sarah Johnson has uploaded new lecture notes for Mathematics 101

    -
    - Course -
    -
  • -
  • -
    -

    Exam Schedule Published

    - 2 days ago -
    -

    Final exam schedule for Semester 1 is now available

    -
    - Exam -
    -
  • -
  • -
    -

    Library Workshop

    - 3 days ago -
    -

    Research Skills Workshop on August 20th at 14:00 in Library Room 101

    -
    - Event -
    -
  • -
-
-
- ); -======= content =

Your student profile information will be here.

; ->>>>>>> 3eb140d4947584180cadc60fa19928ba76d76d72 } return ( -
-
-
- -
-
- {content} -
+ +
+
+
+ +
+
+ {content} +
+
+
+
-
-
-
+ ); } diff --git a/src/app/(dashboard)/(pages)/time-table-admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/time-table-admin-dashboard/page.tsx index 57f865b..86a1f28 100644 --- a/src/app/(dashboard)/(pages)/time-table-admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/time-table-admin-dashboard/page.tsx @@ -1,22 +1,25 @@ import Footer from "@/components/footer"; +import PrivateRoute from "@/components/PrivateRoute"; import React from "react"; import "../../style/page.css"; export default function TimeTableAdminDashboardPage() { return ( -
- {/* Middle - Main Content */} -
-
-
- + +
+ {/* Middle - Main Content */} +
+
+
+ +
+ {/* Bottom - Footer */} +
- {/* Bottom - Footer */} -
-
+ ); } From f806018bace19dbe5c3a703ab909d6a76e708884 Mon Sep 17 00:00:00 2001 From: Geethanjana Wijesena Date: Wed, 13 Aug 2025 10:43:05 +0530 Subject: [PATCH 5/8] Academic Dashboard Update Academic Dashboard Update --- .../(pages)/academic-dashboard/page.tsx | 668 +++++++++++++++++- 1 file changed, 655 insertions(+), 13 deletions(-) diff --git a/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx b/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx index 7f2c8b6..302e7da 100644 --- a/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx @@ -1,22 +1,664 @@ - +"use client"; import Footer from "@/components/footer"; -import React from "react"; import "../../style/page.css"; - +import Header from "../../components/header"; +import Sidebar, { MenuItem } from "../../components/sidebar"; +import { useState } from "react"; +import { + FaTachometerAlt, + FaBook, + FaCalendarAlt, + FaClipboardList, + FaUsers, + FaChartBar, + FaEdit, + FaTrash, + FaPlus, + FaSearch, + FaDownload +} from "react-icons/fa"; export default function AcademicDashboardPage() { - return ( -
- {/* Middle - Main Content */} -
-
-
- -
+ const [selectedMenu, setSelectedMenu] = useState("overview"); + + // Academic-specific menu + const menuItems: MenuItem[] = [ + { id: "overview", label: "Overview", icon: }, + { id: "courses", label: "Courses", icon: }, + { id: "timetable", label: "Timetable", icon: }, + { id: "assignments", label: "Assignments", icon: }, + { id: "students", label: "Students", icon: }, + { id: "reports", label: "Reports", icon: }, + ]; + + // Academic-specific content + let content; + if (selectedMenu === "overview") { + content = ( +
+

Academic Dashboard Overview

+
+
+

Total Courses

+

42

+

8 active this semester

+
+
+

Total Students

+

1,842

+

+12% from last semester

+
+
+

Active Assignments

+

24

+

4 due this week

+
+
+

Pending Reviews

+

8

+

2 require immediate attention

+
+
+
+

Quick Actions

+
+ + + +
+
+
+

Recent Activity

+
+
    +
  • +
    +

    New course created

    + 2 hours ago +
    +

    Advanced Web Development (CS401) added to curriculum

    +
  • +
  • +
    +

    Assignment submitted

    + 4 hours ago
    +

    Database Design Project submitted by John Smith

    +
  • +
  • +
    +

    Grade updated

    + 1 day ago +
    +

    Final exam grades updated for Mathematics 101

    +
  • +
+
+
+
+ ); + } else if (selectedMenu === "courses") { + content = ( +
+
+

Course Management

+
+
+ +
- {/* Bottom - Footer */} -
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CourseCodeInstructorStudentsStatusActions
Advanced MathematicsMATH301Dr. Sarah Johnson87 + Active + + + +
Database SystemsCS202Prof. Michael Chen92 + Active + + + +
Literature & CompositionENG101Dr. Emily Roberts76 + Planned + + + +
Computer NetworksCS305Prof. David Wilson65 + Active + + + +
+
); + } else if (selectedMenu === "timetable") { + content = ( +
+
+

Academic Timetable

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeMondayTuesdayWednesdayThursdayFriday
09:00 - 10:30 +
+
Advanced Mathematics
+
MATH301 - Room 205
+
+
+
+
Database Systems
+
CS202 - Lab 3
+
+
+
+
Literature & Composition
+
ENG101 - Room 102
+
+
+
+
Computer Networks
+
CS305 - Lab 7
+
+
+
+
Statistics
+
STAT201 - Room 301
+
+
11:00 - 12:30 +
+
Database Systems
+
CS202 - Room 108
+
+
+
+
Literature & Composition
+
ENG101 - Room 102
+
+
+
+
Advanced Mathematics
+
MATH301 - Room 205
+
+
+
+
Statistics
+
STAT201 - Room 301
+
+
+
+
Computer Networks
+
CS305 - Lab 7
+
+
14:00 - 15:30 +
+
Computer Networks
+
CS305 - Lab 7
+
+
+
+
Advanced Mathematics
+
MATH301 - Room 205
+
+
+
+
Database Systems
+
CS202 - Lab 3
+
+
+
+
Literature & Composition
+
ENG101 - Room 102
+
+
+
+
Chemistry Lab
+
CHEM101 - Lab 5
+
+
+
+
+ ); + } else if (selectedMenu === "assignments") { + content = ( +
+
+

Assignment Management

+
+
+ + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AssignmentCourseDue DateSubmittedStatusActions
Database Design ProjectDatabase Systems2025-08-18 23:5942/92 + Open + + + +
Literary Analysis EssayLiterature & Composition2025-08-20 23:5938/76 + Open + + + +
Network Security ReportComputer Networks2025-08-25 23:5924/65 + Grading + + + +
Calculus Problem SetAdvanced Mathematics2025-09-01 23:5987/87 + Completed + + + +
+
+
+ ); + } else if (selectedMenu === "students") { + content = ( +
+
+

Student Management

+
+
+ + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StudentStudent IDEmailProgramEnrolled CoursesActions
+
+ Student + John Smith +
+
STU123456 + john.smith@student.university.edu + Computer Science5 + + +
+
+ Student + Emily Johnson +
+
STU234567 + emily.j@student.university.edu + Mathematics4 + + +
+
+ Student + Michael Brown +
+
STU345678 + m.brown@student.university.edu + English Literature6 + + +
+
+ Student + Sarah Davis +
+
STU456789 + sarah.d@student.university.edu + Computer Networks3 + + +
+
+
+ ); + } else if (selectedMenu === "reports") { + content = ( +
+

Academic Reports & Analytics

+
+
+

Course Enrollment

+
+

Course Enrollment Chart

+
+
+
+

Grade Distribution

+
+

Grade Distribution Chart

+
+
+
+
+

Performance Summary

+
+
+

87%

+

Average Attendance

+
+
+

92%

+

Assignment Submission

+
+
+

3.7

+

Average GPA

+
+
+

94%

+

Course Completion

+
+
+
+
+ + + +
+
+ ); + } + + return ( +
+
+
+ +
+
+ {content} +
+
+
+
+
+ ); } From f11ce4645f65b4b33e44e3302f27a268b6377bd5 Mon Sep 17 00:00:00 2001 From: Geethanjana Wijesena Date: Wed, 13 Aug 2025 15:45:49 +0530 Subject: [PATCH 6/8] Student dashboard update Student dashboard update --- .../(pages)/student-dashboard/page.tsx | 512 +++++++++++++++++- 1 file changed, 498 insertions(+), 14 deletions(-) diff --git a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx index 1581204..e6573d1 100644 --- a/src/app/(dashboard)/(pages)/student-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/student-dashboard/page.tsx @@ -5,7 +5,7 @@ import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; import { useState } from "react"; -import { FaBook, FaCalendarAlt, FaClipboardList, FaUserGraduate } from "react-icons/fa"; +import { FaBook, FaCalendarAlt, FaClipboardList, FaUserGraduate, FaChartLine, FaBell } from "react-icons/fa"; export default function StudentDashboardPage() { const [selectedMenu, setSelectedMenu] = useState("courses"); @@ -16,38 +16,522 @@ export default function StudentDashboardPage() { { id: "timetable", label: "Timetable", icon: }, { id: "assignments", label: "Assignments", icon: }, { id: "profile", label: "Profile", icon: }, + { id: "grades", label: "Grades", icon: }, + { id: "notifications", label: "Notifications", icon: }, ]; // Student-specific content let content; if (selectedMenu === "courses") { - content =

List of enrolled courses will be shown here.

; + content = ( +
+

My Courses

+
+
+

Mathematics 101

+

Dr. Sarah Johnson

+

Semester 1

+
+ Core + Active +
+
+
+

Physics 202

+

Prof. Michael Chen

+

Semester 1

+
+ Science + Active +
+
+
+

English Literature

+

Dr. Emily Roberts

+

Semester 1

+
+ Humanities + Active +
+
+
+

Computer Science

+

Prof. David Wilson

+

Semester 2

+
+ Elective + Active +
+
+
+

History

+

Dr. James Miller

+

Semester 2

+
+ Humanities + Active +
+
+
+

Chemistry Lab

+

Prof. Lisa Anderson

+

Semester 1

+
+ Lab + Active +
+
+
+
+

Course Actions

+
+ + + +
+
+
+ ); } else if (selectedMenu === "timetable") { - content =

Your class timetable will appear here.

; + content = ( +
+
+

Weekly Timetable

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeMondayTuesdayWednesdayThursdayFriday
09:00 - 10:30 +
+
Mathematics 101
+
Room 205
+
+
+
+
Physics 202
+
Lab 3
+
+
+
+
English Lit
+
Room 102
+
+
+
+
Computer Sci
+
Lab 7
+
+
+
+
History
+
Room 301
+
+
11:00 - 12:30 +
+
Physics 202
+
Room 108
+
+
+
+
English Lit
+
Room 102
+
+
+
+
Mathematics 101
+
Room 205
+
+
+
+
History
+
Room 301
+
+
+
+
Computer Sci
+
Lab 7
+
+
14:00 - 15:30 +
+
Computer Sci
+
Lab 7
+
+
+
+
Mathematics 101
+
Room 205
+
+
+
+
Physics 202
+
Lab 3
+
+
+
+
English Lit
+
Room 102
+
+
+
+
Chemistry Lab
+
Lab 5
+
+
+
+
+ ); } else if (selectedMenu === "assignments") { - content =

All your assignments and due dates will be shown here.

; + content = ( +
+
+

My Assignments

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AssignmentCourseDue DateStatusActions
Calculus Problem Set 3Mathematics 1012025-08-18 23:59 + Pending + + +
Physics Lab Report 2Physics 2022025-08-20 23:59 + Pending + + +
Literary Analysis EssayEnglish Literature2025-08-25 23:59 + Pending + + +
Programming Project 1Computer Science2025-09-01 23:59 + Submitted + + +
+
+
+ ); } else if (selectedMenu === "profile") { - content =

Your student profile information will be here.

; + content = ( +
+

Student Profile

+
+
+
+ Profile +
+

Alex Morgan

+

Student ID: STU123456

+

Computer Science Major

+
+
+ +

Personal Information

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +

Academic Information

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ ); + } else if (selectedMenu === "grades") { + content = ( +
+

My Grades

+
+
+

Current GPA: 3.75

+
+
+ Mathematics 101 + A- +
+
+ Physics 202 + B+ +
+
+ English Literature + A +
+
+ Computer Science + A +
+
+ History + B +
+
+
+ +
+

Grade Distribution

+
+

Grade Distribution Chart

+
+
+
+
+ ); + } else if (selectedMenu === "notifications") { + content = ( +
+

Notifications

+
+
    +
  • +
    +

    Assignment Due Reminder

    + 2 hours ago +
    +

    Calculus Problem Set 3 is due on August 18th

    +
    + Assignment +
    +
  • +
  • +
    +

    New Course Material Available

    + 1 day ago +
    +

    Dr. Sarah Johnson has uploaded new lecture notes for Mathematics 101

    +
    + Course +
    +
  • +
  • +
    +

    Exam Schedule Published

    + 2 days ago +
    +

    Final exam schedule for Semester 1 is now available

    +
    + Exam +
    +
  • +
  • +
    +

    Library Workshop

    + 3 days ago +
    +

    Research Skills Workshop on August 20th at 14:00 in Library Room 101

    +
    + Event +
    +
  • +
+
+
+ ); } return ( -
+
-
- + -
-
- {content} -
+ /> +
+
+ {content}
+
-
+
); } From e928c74cfb5d8b8f33b549a8dded5126bfdc9a77 Mon Sep 17 00:00:00 2001 From: Geethanjana Wijesena Date: Wed, 13 Aug 2025 16:01:04 +0530 Subject: [PATCH 7/8] Academic Dashboard Update Academic Dashboard Update --- .../(pages)/academic-dashboard/page.tsx | 507 +++++++++++++++++- 1 file changed, 487 insertions(+), 20 deletions(-) diff --git a/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx b/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx index 32c1a04..ed014c4 100644 --- a/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/academic-dashboard/page.tsx @@ -4,7 +4,7 @@ import "../../style/page.css"; import Header from "../../components/header"; import Sidebar, { MenuItem } from "../../components/sidebar"; import { useState } from "react"; -import { FaTachometerAlt, FaCalendarAlt, FaBullhorn, FaClipboardList } from "react-icons/fa"; +import { FaTachometerAlt, FaCalendarAlt, FaBullhorn, FaClipboardList, FaChartBar, FaBook} from "react-icons/fa"; export default function AcademicDashboardPage() { const [selectedMenu, setSelectedMenu] = useState("overview"); @@ -15,51 +15,518 @@ export default function AcademicDashboardPage() { { id: "timetable", label: "Timetable", icon: }, { id: "announcements", label: "Announcements", icon: }, { id: "examclaims", label: "Exam Claims", icon: }, + { id: "courses", label: "My Courses", icon: }, + { id: "analytics", label: "Analytics", icon: }, ]; // Academic dashboard content let content; if (selectedMenu === "overview") { content = ( - <> -

Academic Dashboard Overview

-

Welcome to the academic dashboard. Here you can view your timetable, announcements, and exam claims.

- +
+

Academic Dashboard Overview

+
+
+

Courses

+

8

+

Teaching this semester

+
+
+

Students

+

248

+

Total enrollment

+
+
+

Pending Claims

+

12

+

Exam claims to review

+
+
+

Announcements

+

5

+

Published this month

+
+
+
+

Quick Actions

+
+ + + +
+
+
); } else if (selectedMenu === "timetable") { content = ( - <> -

Timetable

-

Your class timetable will appear here.

- +
+
+

Teaching Timetable

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeMondayTuesdayWednesdayThursdayFriday
09:00 - 10:30 +
+
Mathematics 101
+
Room 205
+
Year 1 Students
+
+
+
+
Physics 202
+
Lab 3
+
Year 2 Students
+
+
+
+
English Lit
+
Room 102
+
Year 1 Students
+
+
+
+
Computer Sci
+
Lab 7
+
Year 3 Students
+
+
+
+
History
+
Room 301
+
Year 1 Students
+
+
11:00 - 12:30 +
+
Physics 202
+
Room 108
+
Year 2 Students
+
+
+
+
English Lit
+
Room 102
+
Year 1 Students
+
+
+
+
Mathematics 101
+
Room 205
+
Year 1 Students
+
+
+
+
History
+
Room 301
+
Year 1 Students
+
+
+
+
Computer Sci
+
Lab 7
+
Year 3 Students
+
+
14:00 - 15:30 +
+
Computer Sci
+
Lab 7
+
Year 3 Students
+
+
+
+
Mathematics 101
+
Room 205
+
Year 1 Students
+
+
+
+
Physics 202
+
Lab 3
+
Year 2 Students
+
+
+
+
English Lit
+
Room 102
+
Year 1 Students
+
+
+
+
Chemistry Lab
+
Lab 5
+
Year 2 Students
+
+
+
+
); } else if (selectedMenu === "announcements") { content = ( - <> -

Announcements

-

View and manage announcements here.

- +
+
+

Announcements

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TitleDateAudienceStatusActions
Midterm Exam Schedule2025-08-10All Students + Published + + + +
Library Closure Notice2025-08-05All Students + Published + + + +
New Course Materials Available2025-08-01Mathematics 101 + Published + + + +
Guest Lecture - Quantum Computing2025-07-28Computer Science + Draft + + + +
+
+
); } else if (selectedMenu === "examclaims") { content = ( - <> -

Exam Claims

-

View and manage exam claims here.

- +
+
+

Exam Claims

+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StudentCourseClaim TypeDate SubmittedStatusActions
John SmithMathematics 101Extension Request2025-08-10 + Pending + + +
Sarah JohnsonPhysics 202Special Arrangements2025-08-08 + Approved + + +
Michael BrownComputer ScienceAlternative Assessment2025-08-05 + Rejected + + +
Emily DavisEnglish LiteratureExtension Request2025-08-03 + Pending + + +
+
+
+ ); + } else if (selectedMenu === "courses") { + content = ( +
+

My Courses

+
+
+

Mathematics 101

+

Semester 1

+

Year 1 Students

+
+ Core + Active +
+
+
+

Physics 202

+

Semester 1

+

Year 2 Students

+
+ Science + Active +
+
+
+

English Literature

+

Semester 1

+

Year 1 Students

+
+ Humanities + Active +
+
+
+

Computer Science

+

Semester 2

+

Year 3 Students

+
+ Elective + Active +
+
+
+

History

+

Semester 2

+

Year 1 Students

+
+ Humanities + Active +
+
+
+

Chemistry Lab

+

Semester 1

+

Year 2 Students

+
+ Lab + Active +
+
+
+
+

Course Actions

+
+ + + +
+
+
+ ); + } else if (selectedMenu === "analytics") { + content = ( +
+

Academic Analytics

+
+
+

Student Performance

+
+

Student Performance Chart

+
+
+
+

Course Enrollment

+
+

Course Enrollment Chart

+
+
+
+
+

Recent Activity

+
    +
  • + New exam claim submitted for Mathematics 101 + 2 hours ago +
  • +
  • + Announcement published for all students + 5 hours ago +
  • +
  • + Grade submissions deadline approaching + 1 day ago +
  • +
  • + New student enrolled in Computer Science + 2 days ago +
  • +
+
+
); } return (
-
+
-
-
+
+
{content}
From de87b116e31b8ffd2067349b8cef0b0f2e70ff1e Mon Sep 17 00:00:00 2001 From: Geethanjana Wijesena Date: Wed, 13 Aug 2025 17:34:13 +0530 Subject: [PATCH 8/8] Lab allocation admin page update Lab allocation admin page update --- .../lab-allocation-admin-dashboard/page.tsx | 569 +++++++++++++++++- 1 file changed, 552 insertions(+), 17 deletions(-) diff --git a/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx b/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx index 8100d8a..8b43ee0 100644 --- a/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx +++ b/src/app/(dashboard)/(pages)/lab-allocation-admin-dashboard/page.tsx @@ -1,25 +1,560 @@ - +"use client"; import Footer from "@/components/footer"; import PrivateRoute from "@/components/PrivateRoute"; -import React from "react"; +import React, { useState } from "react"; import "../../style/page.css"; - +import Header from "../../components/header"; +import Sidebar, { MenuItem } from "../../components/sidebar"; +import { FaTachometerAlt, FaCalendarAlt, FaFlask, FaClipboardList, FaChartBar, FaWrench } from "react-icons/fa"; export default function LabAllocationAdminDashboardPage() { - return ( - -
- {/* Middle - Main Content */} -
-
-
- -
-
-
- {/* Bottom - Footer */} -