diff --git a/package-lock.json b/package-lock.json index 0674289..9bbdf1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -102,6 +102,7 @@ "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", @@ -1636,17 +1637,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@emnapi/runtime": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", - "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", @@ -4432,6 +4422,7 @@ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.101.3.tgz", "integrity": "sha512-ZjgcRwmQUSCythDPj6pE2NKFi9bpQegxIBxgt3hPytXI1ElFHNaa3A7aWW8vFaLCIRjPv467rbREYHbxcdgQbg==", "license": "MIT", + "peer": true, "dependencies": { "@tanstack/query-core": "5.101.3" }, @@ -4517,6 +4508,7 @@ "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.18.0" } @@ -4527,6 +4519,7 @@ "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -4537,6 +4530,7 @@ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "devOptional": true, "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -4612,6 +4606,7 @@ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -4870,6 +4865,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.42", "caniuse-lite": "^1.0.30001803", @@ -6545,7 +6541,8 @@ "version": "1.9.4", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "peer": true }, "node_modules/leven": { "version": "3.1.0", @@ -7173,6 +7170,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", @@ -7216,6 +7214,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -7225,6 +7224,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -7237,6 +7237,7 @@ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.82.0.tgz", "integrity": "sha512-Zw/uFZ2dO+02GHlBn7JFGn8kZJ7LdM33B/0BXOovzFay+CMhf94JMw5BVu+F1tVkUKjNvBuaE3fz5BJhga10Tg==", "license": "MIT", + "peer": true, "engines": { "node": ">=18.0.0" }, @@ -7543,6 +7544,7 @@ "integrity": "sha512-RXOqwaPsBGjMNMa4sQjDjHieHEZDFoj/Rdr46l2MU5DfEs16wHJPC2RPTPHWhNl+M3aI472LLqFkFKut4SblOg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.9" }, @@ -8088,6 +8090,7 @@ "integrity": "sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", @@ -8413,6 +8416,7 @@ "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.5", diff --git a/src/components/Auth/ProtectedRoute.tsx b/src/components/Auth/ProtectedRoute.tsx index 6e71ae1..3a80898 100644 --- a/src/components/Auth/ProtectedRoute.tsx +++ b/src/components/Auth/ProtectedRoute.tsx @@ -53,8 +53,8 @@ export default function ProtectedRoute({

{title}

diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 4a86a45..ccf9f8d 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -89,14 +89,14 @@ export default function Navbar() { const checkIsActive = (linkPath: string) => { if (linkPath === '/') return location.pathname === '/'; - if (linkPath === '/notes') return location.pathname === '/notes'; + if (linkPath === '/notes') return location.pathname === '/notes' && !location.search.includes('portal='); if (linkPath.includes('?')) { return location.pathname + location.search === linkPath; } return location.pathname.startsWith(linkPath); }; - const isMoreActive = MORE_LINKS.some((link) => !link.path.startsWith('/notes') && checkIsActive(link.path)); + const isMoreActive = false; return ( <> @@ -410,12 +410,12 @@ export default function Navbar() { )} - {/* Floating RAISE Incubator Button directly below Sign In at right corner */} + {/* Floating RAISE Incubator Button directly below right side of navbar */} + style={{ fontFamily: 'Plus Jakarta Sans, sans-serif' }}> {q.title} diff --git a/src/pages/Events/Events.tsx b/src/pages/Events/Events.tsx index 53fdf7d..744f787 100644 --- a/src/pages/Events/Events.tsx +++ b/src/pages/Events/Events.tsx @@ -299,7 +299,7 @@ export default function Events() { RIT Official Directory -

+

Student Clubs &{' '} Centers of Excellence @@ -330,7 +330,7 @@ export default function Events() { AI-Powered Matcher Quiz -

+

Find Your Ideal Club or Future Tech Center!

@@ -595,7 +595,7 @@ export default function Events() { {/* Question Header */} -

+

{QUIZ_QUESTIONS_ALL[quizStep].title}

@@ -629,7 +629,7 @@ export default function Events() {
-

+

Your Recommended Matches!

Based on your selections, here are your top recommended RIT entities:

@@ -769,7 +769,7 @@ export default function Events() {
)} -

+

{selectedClub.name}

diff --git a/src/pages/Notes/Notes.tsx b/src/pages/Notes/Notes.tsx index 3419c2e..df6dbf5 100644 --- a/src/pages/Notes/Notes.tsx +++ b/src/pages/Notes/Notes.tsx @@ -1414,6 +1414,42 @@ export default function Notes() { return matchSearch && matchSem && matchDept && matchType && matchSubject; }); + const portalParam = searchParams.get('portal'); + let headerBreadcrumb = 'Notes & PYQs'; + let headerTitle = ( + <> + Notes &{' '} + + PYQs + + + ); + let headerSubtitle = 'Access semester-wise notes, previous year question papers, and study materials.'; + + if (portalParam === 'gatepass') { + headerBreadcrumb = 'Student Gate Pass'; + headerTitle = ( + <> + Student{' '} + + Gate Pass + + + ); + headerSubtitle = 'Official digital campus out-pass system for day scholars and hostellers.'; + } else if (portalParam === 'proficiency') { + headerBreadcrumb = 'Student Proficiency'; + headerTitle = ( + <> + Student{' '} + + Proficiency + + + ); + headerSubtitle = 'Official RIT skill evaluation platform for tracking domain competencies and certifications.'; + } + return (
{/* Header */} @@ -1424,16 +1460,13 @@ export default function Notes() {
Home - Notes & PYQs + {headerBreadcrumb}
-

- Notes &{' '} - - PYQs - +

+ {headerTitle}

- Access semester-wise notes, previous year question papers, and study materials. + {headerSubtitle}

@@ -1493,7 +1526,7 @@ export default function Notes() { : 'Back to Toolkit'} -

+

{selectedTool !== null ? ( <> {selectedTool.name}{' '} @@ -1555,7 +1588,7 @@ export default function Notes() {
-

+

{selectedTool.name}

-

+

{PROGRAMMING_LANGUAGES_GUIDES[selectedLanguage].name}

Official RIT Learning Management System
-

+

Access Academic Notes & Study Materials on{' '} Moodle @@ -2044,7 +2077,7 @@ export default function Notes() { Official RIT Campus Gate Pass Portal

-

+

Request & Manage Out-Passes on{' '} Student Gate Pass @@ -2142,7 +2175,7 @@ export default function Notes() { Official RIT Skill Evaluation & Readiness System

-

+

Track Skill Milestones & Credentials on{' '} Student Proficiency diff --git a/src/pages/StudentDashboard/StudentDashboard.tsx b/src/pages/StudentDashboard/StudentDashboard.tsx index 451b639..2a39c3b 100644 --- a/src/pages/StudentDashboard/StudentDashboard.tsx +++ b/src/pages/StudentDashboard/StudentDashboard.tsx @@ -4,7 +4,7 @@ import { GraduationCap, Clock, MapPin, Users, Calendar, Building, ShieldCheck, Sparkles, KeyRound, ArrowRight, LogOut, - AlertCircle, User, HelpCircle, Compass, ExternalLink + AlertCircle, User, HelpCircle, Compass, ExternalLink, ChevronRight } from 'lucide-react'; import { Link } from 'react-router-dom'; import { useAuth } from '@/context/AuthContext'; @@ -50,11 +50,11 @@ export default function StudentDashboard() { setIsLoading(true); setError(null); try { - const result = await fetchStudentDashboard(imsSession.student.regNumber, user?.email); - setData(result); + const res = await fetchStudentDashboard(imsSession.student.regNumber); + setData(res); } catch (err: any) { console.error('Error loading student dashboard:', err); - setError(err?.message || 'Unable to fetch student records from IMS.'); + setError(err.message || 'Failed to fetch timetable and classroom location.'); } finally { setIsLoading(false); } @@ -63,30 +63,21 @@ export default function StudentDashboard() { useEffect(() => { if (imsSession) { loadDashboard(); - } else { - setData(null); } }, [imsSession]); - const handleImsLogin = async (e?: React.FormEvent) => { - if (e) e.preventDefault(); - if (!regNumberInput.trim() || !passwordInput.trim()) { - setLoginError('Please enter both Register Number and Password.'); - return; - } + const handleImsLogin = async (e: React.FormEvent) => { + e.preventDefault(); + if (!regNumberInput.trim() || !passwordInput.trim()) return; setIsLoggingIn(true); setLoginError(null); try { - const res = await loginWithIms(regNumberInput.trim(), passwordInput.trim()); - if (res.success && res.token && res.student) { - setImsSession({ token: res.token, student: res.student }); - } else { - setLoginError(res.message || 'Invalid Register Number or Password.'); - } + const session = await loginWithIms(regNumberInput.trim(), passwordInput.trim()); + setImsSession(session); } catch (err: any) { - setLoginError(err?.message || 'Failed to authenticate with IMS server.'); + setLoginError(err.message || 'Invalid credentials or Register Number not found.'); } finally { setIsLoggingIn(false); } @@ -108,126 +99,151 @@ export default function StudentDashboard() { // ───────────────────────────────────────────────────────────── if (!imsSession) { return ( -
-
- -
-
-
+
+ {/* Header */} +
+
+ +
+ Home + + Student Dashboard +
+

+ IMS Student{' '} + + Portal + +

+

+ Enter your official college Register Number and Password to access your timetable and assigned classroom venue. +

+
+
+
+ + {/* Login Form Container */} +
+
+ +
+
+

+ Sign In to Student Portal +

+

+ Enter your official college credentials below +

-

- IMS Student Portal Sign In -

-

- Enter your official college Register Number and Password to access your timetable and assigned classroom venue. -

+ + {/* Login Form Card */} + + {loginError && ( +
+ + {loginError} +
+ )} + +
+
+ + setRegNumberInput(e.target.value)} + placeholder="e.g. 2114251001" + className="w-full bg-[#F8FAFC] border border-[#E5E7EB] rounded-xl px-4 py-3 text-sm text-[#1E293B] placeholder-[#94A3B8] outline-none focus:border-[#F97316] focus:bg-white transition-colors font-mono" + required + /> +
+ +
+ + setPasswordInput(e.target.value)} + placeholder="••••••••" + className="w-full bg-[#F8FAFC] border border-[#E5E7EB] rounded-xl px-4 py-3 text-sm text-[#1E293B] placeholder-[#94A3B8] outline-none focus:border-[#F97316] focus:bg-white transition-colors font-mono" + required + /> +
+ + +
+ + {/* Expandable Demo Helper */} +
+ + + + {showDemoBox && ( + +

+ Click any sample student below to auto-fill the login form: +

+
+ {mockUsers.map((mock) => ( + + ))} +
+
+ )} +
+
+
- - {/* Login Form Card */} - - {loginError && ( -
- - {loginError} -
- )} - -
-
- - setRegNumberInput(e.target.value)} - placeholder="e.g. 2114251001" - className="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-3 text-sm text-white placeholder-slate-500 outline-none focus:border-orange-500 transition-colors font-mono" - required - /> -
- -
- - setPasswordInput(e.target.value)} - placeholder="••••••••" - className="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-3 text-sm text-white placeholder-slate-500 outline-none focus:border-orange-500 transition-colors font-mono" - required - /> -
- - -
- - {/* Expandable Demo Helper */} -
- - - - {showDemoBox && ( - -

- Click any sample student below to auto-fill the login form: -

-
- {mockUsers.map((mock) => ( - - ))} -
-
- )} -
-
-
); @@ -239,114 +255,114 @@ export default function StudentDashboard() { const classInchargeMember = data?.facultyList.find((f) => f.isClassIncharge); return ( -
-
- - {/* ─── Top Banner ─── */} -
-
-
- -
-
-
+
+ {/* Header */} +
+
+
+
+
-
-
-
-

- {data?.student.name || imsSession.student.name} -

- - Authenticated Student - -
+
+
+

+ {data?.student.name || imsSession.student.name} +

+ + Authenticated Student + +
-
- Reg No: {data?.student.regNumber || imsSession.student.regNumber} - • - {data?.student.degree} {data?.student.department} - • - Year {data?.student.year}, Sem {data?.student.semester} ({data?.student.section}) +
+ Reg No: {data?.student.regNumber || imsSession.student.regNumber} + • + {data?.student.degree} {data?.student.department} + • + Year {data?.student.year}, Sem {data?.student.semester} ({data?.student.section}) +
-
-
- - Faculty Directory - - - +
+ + Faculty Directory + + + +
+
+
{/* ─── Key Stats Quick Bar ─── */} {data && (
-
-
+
+
-

Assigned Room

-

{data.classLocation.roomNumber}

-

{data.classLocation.floor}

+

Assigned Room

+

{data.classLocation.roomNumber}

+

{data.classLocation.floor}

-
-
+
+
-

Class Incharge

-

+

Class Incharge

+

{classInchargeMember?.facultyName.split(' ')[0] || 'Assigned'}

-

+

{classInchargeMember?.officeLocation || 'Staff Cabin'}

-
-
+
+
-

Branch & Section

-

{data.student.departmentCode} ({data.student.section})

-

Semester {data.student.semester}

+

Branch & Section

+

{data.student.departmentCode} ({data.student.section})

+

Semester {data.student.semester}

-
-
+
+
-

Academic Batch

-

{data.student.batch}

-

{data.student.regulation}

+

Academic Batch

+

{data.student.batch}

+

{data.student.regulation}

)} {/* ─── Navigation Tabs ─── */} -
+
{[ { id: 'timetable', label: "Today's Timetable", icon: Clock }, @@ -361,8 +377,9 @@ export default function StudentDashboard() { className={`flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs sm:text-sm font-bold transition-all cursor-pointer whitespace-nowrap ${ isActive ? 'bg-gradient-to-r from-[#FF6B00] to-[#F97316] text-white shadow-md shadow-orange-500/20' - : 'bg-slate-900/60 hover:bg-slate-800 text-slate-300 hover:text-white border border-white/10' + : 'bg-white hover:bg-slate-50 text-[#475569] hover:text-[#1E293B] border border-[#E5E7EB]' }`} + style={{ fontFamily: 'Plus Jakarta Sans, sans-serif' }} > {tab.label} @@ -374,11 +391,12 @@ export default function StudentDashboard() { {data && ( - + View {data.student.departmentCode} Faculty Directory - + )}
@@ -386,16 +404,16 @@ export default function StudentDashboard() { {/* ─── Main Content Tabs ─── */} {isLoading ? (
-
-

Connecting to IMS services...

+
+

Connecting to IMS services...

) : error ? ( -
-

Error connecting to IMS Gateway

-

{error}

+
+

Error connecting to IMS Gateway

+

{error}

@@ -405,16 +423,16 @@ export default function StudentDashboard() { {/* ─── 1. TIMETABLE TAB ─── */} {activeTab === 'timetable' && (
-
+
- - + + {data.todaySchedule.dayOfWeek} SCHEDULE ({data.todaySchedule.date})
- - + + Live Status Active
@@ -432,20 +450,20 @@ export default function StudentDashboard() { animate={{ opacity: 1, y: 0 }} className={`relative rounded-2xl p-5 border transition-all ${ isOngoing - ? 'bg-gradient-to-b from-orange-500/15 to-slate-900 border-orange-500/50 shadow-xl shadow-orange-500/10 ring-1 ring-orange-500/40' + ? 'bg-gradient-to-b from-orange-500/10 via-white to-white border-[#F97316] shadow-md ring-1 ring-orange-400/30' : isCompleted - ? 'bg-slate-950/40 border-white/5 opacity-60' - : 'bg-slate-900/50 border-white/10 hover:border-white/20' + ? 'bg-slate-50/80 border-[#E5E7EB] opacity-60' + : 'bg-white border-[#E5E7EB] hover:border-slate-300 shadow-sm' }`} > {/* Header Badge */}
- + P{period.periodNumber} - - + + {period.timeSlot}
@@ -453,10 +471,10 @@ export default function StudentDashboard() { {period.status} @@ -466,23 +484,23 @@ export default function StudentDashboard() { {/* Subject Details */}
- + {period.subjectCode} - + {period.type}
-

+

{period.subjectName}

{/* Footer / Instructor & Venue */} -
- {period.facultyName} - - +
+ {period.facultyName} + + {period.venue}
@@ -496,78 +514,78 @@ export default function StudentDashboard() { {/* ─── 2. CLASS LOCATION TAB ─── */} {activeTab === 'location' && (
-
+
-

- +

+ Classroom & Section Venue

-

+

Official lecture hall allocation from Academic Registrar.

-
+
-

Room Number

-

{data.classLocation.roomNumber}

+

Room Number

+

{data.classLocation.roomNumber}

- + {data.student.section} Section
-
- Building Block: - {data.classLocation.buildingName} +
+ Building Block: + {data.classLocation.buildingName}
-
- Floor & Wing: - {data.classLocation.floor}, {data.classLocation.wing} +
+ Floor & Wing: + {data.classLocation.floor}, {data.classLocation.wing}
- Landmark Directions: - {data.classLocation.landmark} + Landmark Directions: + {data.classLocation.landmark}
-
+
-

- +

+ Academic Department Details

-

+

Official department profile, curriculum regulation, and academic guidelines for batch {data.student.batch}.

-
-

Degree & Branch

-

{data.student.degree} {data.student.departmentCode}

+
+

Degree & Branch

+

{data.student.degree} {data.student.departmentCode}

-
-

Regulation

-

{data.student.regulation}

+
+

Regulation

+

{data.student.regulation}

-
-

Academic Year

-

Year {data.student.year} (Sem {data.student.semester})

+
+

Academic Year

+

Year {data.student.year} (Sem {data.student.semester})

-
-

Batch Cohort

-

{data.student.batch}

+
+

Batch Cohort

+

{data.student.batch}

-
- -

+

+ +

Need classroom adjustment? Contact your Class Incharge or Head of Department.