From 5586c34c3d1f07d0d897f8602a67d2abfddbca1f Mon Sep 17 00:00:00 2001 From: Unchanted Date: Tue, 2 Sep 2025 17:20:16 +0530 Subject: [PATCH] feat(student): fixed profile css --- .../(main)/students/student-details-modal.tsx | 167 +++++++++++------- 1 file changed, 103 insertions(+), 64 deletions(-) diff --git a/apps/admin/app/(main)/students/student-details-modal.tsx b/apps/admin/app/(main)/students/student-details-modal.tsx index 34224fb..2dcd790 100644 --- a/apps/admin/app/(main)/students/student-details-modal.tsx +++ b/apps/admin/app/(main)/students/student-details-modal.tsx @@ -28,7 +28,7 @@ import { X, Edit, Download, - Share2 + Share2, } from 'lucide-react'; import { Switch } from '@workspace/ui/components/switch'; @@ -39,19 +39,22 @@ interface StudentDetailsModalProps { markoutAction: (state: boolean) => void; } -export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: StudentDetailsModalProps) { - const fullName = [ - student.firstName, - student.middleName, - student.lastName - ].filter(Boolean).join(' ') || 'Name not provided'; +export function StudentDetailsModal({ + student, + isOpen, + onClose, + markoutAction, +}: StudentDetailsModalProps) { + const fullName = + [student.firstName, student.middleName, student.lastName].filter(Boolean).join(' ') || + 'Name not provided'; const formatDate = (date: Date | null) => { if (!date) return 'Not provided'; return new Date(date).toLocaleDateString('en-US', { year: 'numeric', month: 'long', - day: 'numeric' + day: 'numeric', }); }; @@ -76,9 +79,7 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }:
- - Student Details - + Student Details
Close -
+
@@ -110,22 +111,25 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: - {student.firstName ? student.firstName.charAt(0).toUpperCase() : - student.email ? student.email.charAt(0).toUpperCase() : 'S'} + {student.firstName + ? student.firstName.charAt(0).toUpperCase() + : student.email + ? student.email.charAt(0).toUpperCase() + : 'S'} - +

{fullName}

- {student.verified ? 'Verified' : 'Pending Verification'}
- +
ID: #{student.id} {student.rollNumber && ( @@ -135,6 +139,45 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: Joined: {formatDate(new Date(Number(student.createdAt)))}
+ {/* Skills & Expertise */} + {student.skills && student.skills.length > 0 && ( +
+

+ + Skills & Expertise +

+
+ {student.skills.map((skill, index) => ( + + {skill} + + ))} +
+
+ )} + {/* Professional Links */} + {(student.linkedin || student.github) && ( +
+

+ + Professional Links +

+
+ {student.linkedin && ( + + )} + {student.github && ( + + )} +
+
+ )}
@@ -156,7 +199,7 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: Personal Information - +
@@ -234,7 +277,7 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: Academic Information - +
{student.degree && (
@@ -280,7 +323,7 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: {/* Academic Scores */}

Academic Scores

- +

SSC Score

@@ -288,7 +331,7 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: {formatPercentage(Number(student.ssc))}

- +

HSC Score

@@ -297,50 +340,45 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }:

+ + {/* Semester-wise Performance */} + {student.grades && student.grades.length > 0 && ( +
+

Semester-wise Performance

+
+ + + + + + + + + + + {student.grades + .slice() + .sort((a, b) => (a.sem ?? 0) - (b.sem ?? 0)) + .map((grade) => ( + + + + + + + ))} + +
SemesterSGPIKTDead KT
{grade.sem}{String(grade.sgpi)}{grade.isKT ? 'Yes' : 'No'}{grade.deadKT ? 'Yes' : 'No'}
+
+
+ )} + {/* Skills Section */}
+ + +
- {/* Skills Section */} - {student.skills && student.skills.length > 0 && ( -
-

- - Skills & Expertise -

-
- {student.skills.map((skill, index) => ( - - {skill} - - ))} -
-
- )} - - {/* Professional Links */} - {(student.linkedin || student.github) && ( -
-

- - Professional Links -

-
- {student.linkedin && ( - - )} - {student.github && ( - - )} -
-
- )} - {/* Footer Actions */}
@@ -352,4 +390,5 @@ export function StudentDetailsModal({ student, isOpen, onClose, markoutAction }: ); -} \ No newline at end of file +} +