Spaces:
Sleeping
Sleeping
Hkoradiya123 commited on
Commit ·
dcc6a5e
1
Parent(s): 825f6d1
feat: Enhance Student Profile Page with Modern UI and Improved Layout
Browse files- Refactored StudentProfile component to display user information dynamically.
- Added new sections for Academic Information, Contact Information, and Face Recognition Status.
- Implemented responsive design for better usability on various devices.
- Updated styles for a modern look, including new CSS for student dashboard and profile.
- Improved navigation structure by modifying studentNav constants.
- Removed unnecessary API proxy configurations in vite.config.js.
- backend/app/routes/api_routes.py +8 -0
- backend/app/routes/student_routes.py +110 -0
- frontend/src/App.jsx +1 -5
- frontend/src/components/Shared.jsx +70 -23
- frontend/src/pages/admin/AdminReports.jsx +12 -8
- frontend/src/pages/faculty/FacultyReports.jsx +10 -6
- frontend/src/pages/student/StudentDashboard.jsx +276 -34
- frontend/src/pages/student/StudentProfile.jsx +188 -31
- frontend/src/styles.css +1 -0
- frontend/src/styles/01-base.css +66 -6
- frontend/src/styles/07-reports-theme-dark.css +1 -1
- frontend/src/styles/08-responsive.css +3 -0
- frontend/src/styles/pages/student-dashboard.css +1018 -0
- frontend/src/utils/constants.js +1 -3
- frontend/vite.config.js +0 -4
backend/app/routes/api_routes.py
CHANGED
|
@@ -452,6 +452,10 @@ def faculty_login_api():
|
|
| 452 |
if not isinstance(hashed, (bytes, bytearray)) or not bcrypt.checkpw(password.encode('utf-8'), hashed):
|
| 453 |
return json_error('Invalid email or password', status=401)
|
| 454 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 455 |
role = str(user.get('role', 'teacher') or 'teacher')
|
| 456 |
session['faculty_email'] = email
|
| 457 |
session['faculty_name'] = user.get('name', 'Faculty')
|
|
@@ -489,6 +493,10 @@ def student_login_api():
|
|
| 489 |
if not isinstance(hashed, (bytes, bytearray)) or not bcrypt.checkpw(password.encode('utf-8'), hashed):
|
| 490 |
return json_error('Invalid roll number or password', status=401)
|
| 491 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 492 |
session['student_roll_no'] = roll_no
|
| 493 |
session['student_name'] = user.get('name', 'Student')
|
| 494 |
session['role'] = 'student'
|
|
|
|
| 452 |
if not isinstance(hashed, (bytes, bytearray)) or not bcrypt.checkpw(password.encode('utf-8'), hashed):
|
| 453 |
return json_error('Invalid email or password', status=401)
|
| 454 |
|
| 455 |
+
# Ensure prior student session does not override role resolution in current_session_user().
|
| 456 |
+
session.pop('student_roll_no', None)
|
| 457 |
+
session.pop('student_name', None)
|
| 458 |
+
|
| 459 |
role = str(user.get('role', 'teacher') or 'teacher')
|
| 460 |
session['faculty_email'] = email
|
| 461 |
session['faculty_name'] = user.get('name', 'Faculty')
|
|
|
|
| 493 |
if not isinstance(hashed, (bytes, bytearray)) or not bcrypt.checkpw(password.encode('utf-8'), hashed):
|
| 494 |
return json_error('Invalid roll number or password', status=401)
|
| 495 |
|
| 496 |
+
# Ensure prior faculty session does not remain active when switching to student.
|
| 497 |
+
session.pop('faculty_email', None)
|
| 498 |
+
session.pop('faculty_name', None)
|
| 499 |
+
|
| 500 |
session['student_roll_no'] = roll_no
|
| 501 |
session['student_name'] = user.get('name', 'Student')
|
| 502 |
session['role'] = 'student'
|
backend/app/routes/student_routes.py
CHANGED
|
@@ -209,6 +209,116 @@ def student_dashboard():
|
|
| 209 |
)
|
| 210 |
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
@bp.route('/student/timetable')
|
| 213 |
def student_timetable():
|
| 214 |
roll_no = _require_student_session()
|
|
|
|
| 209 |
)
|
| 210 |
|
| 211 |
|
| 212 |
+
@bp.route('/api/student/dashboard', methods=['GET'])
|
| 213 |
+
def student_dashboard_api():
|
| 214 |
+
roll_no = _require_student_session()
|
| 215 |
+
if not roll_no:
|
| 216 |
+
return jsonify({'success': False, 'error': 'Unauthorized'}), 401
|
| 217 |
+
|
| 218 |
+
cols = get_collections()
|
| 219 |
+
student = _get_student_doc(roll_no)
|
| 220 |
+
if not student:
|
| 221 |
+
return jsonify({'success': False, 'error': 'Student not found'}), 404
|
| 222 |
+
|
| 223 |
+
branch = student.get('branch', '')
|
| 224 |
+
semester = str(student.get('semester', ''))
|
| 225 |
+
section = student.get('section', 'A')
|
| 226 |
+
|
| 227 |
+
timetable_path = current_app.config.get('TIMETABLE_FILE', 'timetable.csv')
|
| 228 |
+
if not os.path.exists(timetable_path) and os.path.exists('timetable.csv'):
|
| 229 |
+
timetable_path = 'timetable.csv'
|
| 230 |
+
|
| 231 |
+
df = pd.read_csv(timetable_path) if os.path.exists(timetable_path) else pd.DataFrame()
|
| 232 |
+
|
| 233 |
+
student_timetable = pd.DataFrame()
|
| 234 |
+
if not df.empty:
|
| 235 |
+
student_timetable = df[
|
| 236 |
+
(df['branch'] == branch)
|
| 237 |
+
& (df['semester'].astype(str) == semester)
|
| 238 |
+
& (df['section'] == section)
|
| 239 |
+
].copy()
|
| 240 |
+
|
| 241 |
+
# Build today's classes.
|
| 242 |
+
today_classes = []
|
| 243 |
+
if not student_timetable.empty:
|
| 244 |
+
today = pd.Timestamp.now().strftime('%A')
|
| 245 |
+
day_df = student_timetable[student_timetable['day'] == today].copy()
|
| 246 |
+
if 'start_time' in day_df.columns:
|
| 247 |
+
day_df = day_df.sort_values(by='start_time')
|
| 248 |
+
for row in day_df.to_dict(orient='records'):
|
| 249 |
+
today_classes.append({
|
| 250 |
+
'time': f"{row.get('start_time', '-') } - {row.get('end_time', '-') }",
|
| 251 |
+
'subject': row.get('subject', ''),
|
| 252 |
+
'faculty': row.get('faculty_name', row.get('faculty_email', '')),
|
| 253 |
+
})
|
| 254 |
+
|
| 255 |
+
# Build recent attendance.
|
| 256 |
+
recent_attendance = []
|
| 257 |
+
recent_cursor = cols['attendance'].find({"student.roll_no": roll_no}).sort("_id", -1).limit(10)
|
| 258 |
+
for record in recent_cursor:
|
| 259 |
+
recent_attendance.append({
|
| 260 |
+
'subject': record.get('subject', ''),
|
| 261 |
+
'date': record.get('date', ''),
|
| 262 |
+
'status': record.get('student', {}).get('status', ''),
|
| 263 |
+
})
|
| 264 |
+
|
| 265 |
+
# Build attendance summary.
|
| 266 |
+
total = cols['attendance'].count_documents({"student.roll_no": roll_no})
|
| 267 |
+
present = cols['attendance'].count_documents({"student.roll_no": roll_no, "student.status": "Present"})
|
| 268 |
+
absent = max(total - present, 0)
|
| 269 |
+
|
| 270 |
+
# Build weekly timetable matrix (real data) for frontend table.
|
| 271 |
+
default_headers = ['09:00', '10:00', '11:00', '12:00', '02:00']
|
| 272 |
+
weekly_headers = default_headers
|
| 273 |
+
weekly_rows = []
|
| 274 |
+
days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']
|
| 275 |
+
|
| 276 |
+
if not student_timetable.empty:
|
| 277 |
+
if 'start_time' in student_timetable.columns:
|
| 278 |
+
slots = [str(value) for value in student_timetable['start_time'].dropna().astype(str).unique().tolist()]
|
| 279 |
+
slots = sorted(slots)
|
| 280 |
+
if slots:
|
| 281 |
+
weekly_headers = slots[:5]
|
| 282 |
+
|
| 283 |
+
for day in days:
|
| 284 |
+
day_df = student_timetable[student_timetable['day'] == day].copy()
|
| 285 |
+
if 'start_time' in day_df.columns:
|
| 286 |
+
day_df = day_df.sort_values(by='start_time')
|
| 287 |
+
|
| 288 |
+
subject_by_slot = {}
|
| 289 |
+
for _, row in day_df.iterrows():
|
| 290 |
+
key = str(row.get('start_time', ''))
|
| 291 |
+
if key and key not in subject_by_slot:
|
| 292 |
+
subject_by_slot[key] = row.get('subject', '')
|
| 293 |
+
|
| 294 |
+
row_cells = [day]
|
| 295 |
+
for slot in weekly_headers:
|
| 296 |
+
row_cells.append(subject_by_slot.get(slot, '-'))
|
| 297 |
+
weekly_rows.append(row_cells)
|
| 298 |
+
|
| 299 |
+
if not weekly_rows:
|
| 300 |
+
weekly_rows = [
|
| 301 |
+
['Monday', '-', '-', '-', '-', '-'],
|
| 302 |
+
['Tuesday', '-', '-', '-', '-', '-'],
|
| 303 |
+
['Wednesday', '-', '-', '-', '-', '-'],
|
| 304 |
+
['Thursday', '-', '-', '-', '-', '-'],
|
| 305 |
+
['Friday', '-', '-', '-', '-', '-'],
|
| 306 |
+
]
|
| 307 |
+
|
| 308 |
+
return jsonify({
|
| 309 |
+
'success': True,
|
| 310 |
+
'todayClasses': today_classes,
|
| 311 |
+
'attendanceSummary': {
|
| 312 |
+
'present': int(present),
|
| 313 |
+
'absent': int(absent),
|
| 314 |
+
'total': int(total),
|
| 315 |
+
},
|
| 316 |
+
'recentAttendance': recent_attendance,
|
| 317 |
+
'weeklyHeaders': weekly_headers,
|
| 318 |
+
'weeklyTimetable': weekly_rows,
|
| 319 |
+
})
|
| 320 |
+
|
| 321 |
+
|
| 322 |
@bp.route('/student/timetable')
|
| 323 |
def student_timetable():
|
| 324 |
roll_no = _require_student_session()
|
frontend/src/App.jsx
CHANGED
|
@@ -11,11 +11,9 @@ import { getDashboardPath, getStoredAuthRole } from "./utils/auth";
|
|
| 11 |
import { THEME_KEY } from "./utils/constants";
|
| 12 |
import { RequireAdminAuth, RequireFacultyAuth } from "./components/Shared";
|
| 13 |
import StudentDashboard from "./pages/student/StudentDashboard";
|
| 14 |
-
import StudentTimetable from "./pages/student/StudentTimetable";
|
| 15 |
import StudentAttendance from "./pages/student/StudentAttendance";
|
| 16 |
import StudentProfile from "./pages/student/StudentProfile";
|
| 17 |
import StudentChangePassword from "./pages/student/StudentChangePassword";
|
| 18 |
-
import RegisterStudentFace from "./pages/student/RegisterStudentFace";
|
| 19 |
import AdminDashboard from "./pages/admin/AdminDashboard";
|
| 20 |
import AdminManageFaculty from "./pages/admin/AdminManageFaculty";
|
| 21 |
import AdminManageStudents from "./pages/admin/AdminManageStudents";
|
|
@@ -45,7 +43,7 @@ import LoginPage from "./pages/LoginPage";
|
|
| 45 |
|
| 46 |
function App() {
|
| 47 |
return (
|
| 48 |
-
<BrowserRouter>
|
| 49 |
<AppShell />
|
| 50 |
</BrowserRouter>
|
| 51 |
);
|
|
@@ -200,11 +198,9 @@ function AppShell() {
|
|
| 200 |
}
|
| 201 |
/>
|
| 202 |
<Route path="/student/dashboard" element={<StudentDashboard />} />
|
| 203 |
-
<Route path="/student/timetable" element={<StudentTimetable />} />
|
| 204 |
<Route path="/student/attendance" element={<StudentAttendance />} />
|
| 205 |
<Route path="/student/profile" element={<StudentProfile />} />
|
| 206 |
<Route path="/student/change-password" element={<StudentChangePassword />} />
|
| 207 |
-
<Route path="/student/register-face" element={<RegisterStudentFace />} />
|
| 208 |
<Route path="*" element={<Navigate to={defaultRoute} replace />} />
|
| 209 |
</Routes>
|
| 210 |
);
|
|
|
|
| 11 |
import { THEME_KEY } from "./utils/constants";
|
| 12 |
import { RequireAdminAuth, RequireFacultyAuth } from "./components/Shared";
|
| 13 |
import StudentDashboard from "./pages/student/StudentDashboard";
|
|
|
|
| 14 |
import StudentAttendance from "./pages/student/StudentAttendance";
|
| 15 |
import StudentProfile from "./pages/student/StudentProfile";
|
| 16 |
import StudentChangePassword from "./pages/student/StudentChangePassword";
|
|
|
|
| 17 |
import AdminDashboard from "./pages/admin/AdminDashboard";
|
| 18 |
import AdminManageFaculty from "./pages/admin/AdminManageFaculty";
|
| 19 |
import AdminManageStudents from "./pages/admin/AdminManageStudents";
|
|
|
|
| 43 |
|
| 44 |
function App() {
|
| 45 |
return (
|
| 46 |
+
<BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
|
| 47 |
<AppShell />
|
| 48 |
</BrowserRouter>
|
| 49 |
);
|
|
|
|
| 198 |
}
|
| 199 |
/>
|
| 200 |
<Route path="/student/dashboard" element={<StudentDashboard />} />
|
|
|
|
| 201 |
<Route path="/student/attendance" element={<StudentAttendance />} />
|
| 202 |
<Route path="/student/profile" element={<StudentProfile />} />
|
| 203 |
<Route path="/student/change-password" element={<StudentChangePassword />} />
|
|
|
|
| 204 |
<Route path="*" element={<Navigate to={defaultRoute} replace />} />
|
| 205 |
</Routes>
|
| 206 |
);
|
frontend/src/components/Shared.jsx
CHANGED
|
@@ -400,30 +400,29 @@ function SkeletonBlock({ className = "" }) {
|
|
| 400 |
}
|
| 401 |
|
| 402 |
function TableSkeleton({ rows = 5, columns = 4 }) {
|
|
|
|
|
|
|
| 403 |
return (
|
| 404 |
<div className="table-wrap skeleton-table-wrap">
|
| 405 |
-
<
|
| 406 |
-
<
|
| 407 |
-
|
| 408 |
-
{
|
| 409 |
-
<
|
| 410 |
-
|
| 411 |
-
</th>
|
| 412 |
-
))}
|
| 413 |
-
</tr>
|
| 414 |
-
</thead>
|
| 415 |
-
<tbody>
|
| 416 |
-
{Array.from({ length: rows }, (_, rowIndex) => (
|
| 417 |
-
<tr key={`row-${rowIndex}`}>
|
| 418 |
-
{Array.from({ length: columns }, (_, colIndex) => (
|
| 419 |
-
<td key={`cell-${rowIndex}-${colIndex}`}>
|
| 420 |
-
<SkeletonBlock className={`skeleton-line skeleton-cell${colIndex === 0 ? " short" : ""}`} />
|
| 421 |
-
</td>
|
| 422 |
-
))}
|
| 423 |
-
</tr>
|
| 424 |
))}
|
| 425 |
-
</
|
| 426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 427 |
</div>
|
| 428 |
);
|
| 429 |
}
|
|
@@ -441,9 +440,57 @@ function FilterSkeleton({ fields = 6 }) {
|
|
| 441 |
);
|
| 442 |
}
|
| 443 |
|
| 444 |
-
function DashboardSkeleton() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
return (
|
| 446 |
-
<div className="dashboard-skeleton">
|
| 447 |
<div className="dashboard-skeleton-grid">
|
| 448 |
<div className="dashboard-skeleton-card hero">
|
| 449 |
<SkeletonBlock className="skeleton-line skeleton-title" />
|
|
|
|
| 400 |
}
|
| 401 |
|
| 402 |
function TableSkeleton({ rows = 5, columns = 4 }) {
|
| 403 |
+
const rowStyle = { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` };
|
| 404 |
+
|
| 405 |
return (
|
| 406 |
<div className="table-wrap skeleton-table-wrap">
|
| 407 |
+
<div className="table-skeleton-grid" role="presentation">
|
| 408 |
+
<div className="table-skeleton-row table-skeleton-row-head" style={rowStyle}>
|
| 409 |
+
{Array.from({ length: columns }, (_, index) => (
|
| 410 |
+
<div key={`head-${index}`} className="table-skeleton-cell">
|
| 411 |
+
<SkeletonBlock className="skeleton-line skeleton-cell-head" />
|
| 412 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
))}
|
| 414 |
+
</div>
|
| 415 |
+
|
| 416 |
+
{Array.from({ length: rows }, (_, rowIndex) => (
|
| 417 |
+
<div key={`row-${rowIndex}`} className="table-skeleton-row" style={rowStyle}>
|
| 418 |
+
{Array.from({ length: columns }, (_, colIndex) => (
|
| 419 |
+
<div key={`cell-${rowIndex}-${colIndex}`} className="table-skeleton-cell">
|
| 420 |
+
<SkeletonBlock className={`skeleton-line skeleton-cell${colIndex === 0 ? " short" : ""}`} />
|
| 421 |
+
</div>
|
| 422 |
+
))}
|
| 423 |
+
</div>
|
| 424 |
+
))}
|
| 425 |
+
</div>
|
| 426 |
</div>
|
| 427 |
);
|
| 428 |
}
|
|
|
|
| 440 |
);
|
| 441 |
}
|
| 442 |
|
| 443 |
+
function DashboardSkeleton({ variant = "faculty" }) {
|
| 444 |
+
if (variant === "student") {
|
| 445 |
+
return (
|
| 446 |
+
<div className="dashboard-skeleton student">
|
| 447 |
+
<div className="dashboard-skeleton-stats">
|
| 448 |
+
{Array.from({ length: 4 }, (_, index) => (
|
| 449 |
+
<div key={`student-stat-${index}`} className="dashboard-skeleton-card stat">
|
| 450 |
+
<SkeletonBlock className="skeleton-line skeleton-title short" />
|
| 451 |
+
<SkeletonBlock className="skeleton-line skeleton-text short" />
|
| 452 |
+
</div>
|
| 453 |
+
))}
|
| 454 |
+
</div>
|
| 455 |
+
|
| 456 |
+
<div className="dashboard-skeleton-grid student-grid">
|
| 457 |
+
<div className="dashboard-skeleton-card schedule">
|
| 458 |
+
<SkeletonBlock className="skeleton-line skeleton-title" />
|
| 459 |
+
<SkeletonBlock className="skeleton-table-bars" />
|
| 460 |
+
<SkeletonBlock className="skeleton-table-bars" />
|
| 461 |
+
<SkeletonBlock className="skeleton-table-bars short" />
|
| 462 |
+
</div>
|
| 463 |
+
|
| 464 |
+
<div className="dashboard-skeleton-card attendance">
|
| 465 |
+
<SkeletonBlock className="skeleton-line skeleton-title" />
|
| 466 |
+
<SkeletonBlock className="skeleton-chart" />
|
| 467 |
+
</div>
|
| 468 |
+
|
| 469 |
+
<div className="dashboard-skeleton-card timetable">
|
| 470 |
+
<SkeletonBlock className="skeleton-line skeleton-title" />
|
| 471 |
+
<SkeletonBlock className="skeleton-chart" />
|
| 472 |
+
</div>
|
| 473 |
+
|
| 474 |
+
<div className="dashboard-skeleton-card actions">
|
| 475 |
+
<SkeletonBlock className="skeleton-line skeleton-title short" />
|
| 476 |
+
<SkeletonBlock className="skeleton-line skeleton-text" />
|
| 477 |
+
<SkeletonBlock className="skeleton-line skeleton-text" />
|
| 478 |
+
<SkeletonBlock className="skeleton-line skeleton-text short" />
|
| 479 |
+
</div>
|
| 480 |
+
|
| 481 |
+
<div className="dashboard-skeleton-card summary">
|
| 482 |
+
<SkeletonBlock className="skeleton-line skeleton-title" />
|
| 483 |
+
<SkeletonBlock className="skeleton-table-bars" />
|
| 484 |
+
<SkeletonBlock className="skeleton-table-bars" />
|
| 485 |
+
<SkeletonBlock className="skeleton-table-bars short" />
|
| 486 |
+
</div>
|
| 487 |
+
</div>
|
| 488 |
+
</div>
|
| 489 |
+
);
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
return (
|
| 493 |
+
<div className="dashboard-skeleton faculty">
|
| 494 |
<div className="dashboard-skeleton-grid">
|
| 495 |
<div className="dashboard-skeleton-card hero">
|
| 496 |
<SkeletonBlock className="skeleton-line skeleton-title" />
|
frontend/src/pages/admin/AdminReports.jsx
CHANGED
|
@@ -193,16 +193,20 @@ function AdminReports() {
|
|
| 193 |
</div>
|
| 194 |
|
| 195 |
<SectionCard title="Summary" className="report-card report-main-table-card">
|
| 196 |
-
|
| 197 |
-
<
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
| 199 |
<tbody>
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
</tbody>
|
| 204 |
-
|
| 205 |
-
|
|
|
|
| 206 |
</SectionCard>
|
| 207 |
</div>
|
| 208 |
</PageShell>
|
|
|
|
| 193 |
</div>
|
| 194 |
|
| 195 |
<SectionCard title="Summary" className="report-card report-main-table-card">
|
| 196 |
+
{loading ? (
|
| 197 |
+
<TableSkeleton rows={4} columns={8} />
|
| 198 |
+
) : (
|
| 199 |
+
<div className="table-wrap">
|
| 200 |
+
<table className="admin-table">
|
| 201 |
+
<thead><tr><th>Roll No</th><th>Name</th><th>Branch</th><th>Sem</th><th>Sec</th><th>Present</th><th>Absent</th><th>%</th></tr></thead>
|
| 202 |
<tbody>
|
| 203 |
+
{report.summary_rows.length ? report.summary_rows.map((row) => (
|
| 204 |
+
<tr key={row.roll_no}><td>{row.roll_no}</td><td>{row.name}</td><td>{row.branch}</td><td>{row.semester}</td><td>{row.section}</td><td>{row.present}</td><td>{row.absent}</td><td>{row.percentage}</td></tr>
|
| 205 |
+
)) : <tr><td colSpan="8">No records found</td></tr>}
|
| 206 |
</tbody>
|
| 207 |
+
</table>
|
| 208 |
+
</div>
|
| 209 |
+
)}
|
| 210 |
</SectionCard>
|
| 211 |
</div>
|
| 212 |
</PageShell>
|
frontend/src/pages/faculty/FacultyReports.jsx
CHANGED
|
@@ -191,16 +191,20 @@ function FacultyReports() {
|
|
| 191 |
</div>
|
| 192 |
|
| 193 |
<SectionCard title="Summary" className="report-card report-main-table-card">
|
| 194 |
-
|
| 195 |
-
<
|
| 196 |
-
|
|
|
|
|
|
|
|
|
|
| 197 |
<tbody>
|
| 198 |
-
{
|
| 199 |
-
|
| 200 |
-
|
| 201 |
</tbody>
|
| 202 |
</table>
|
| 203 |
</div>
|
|
|
|
| 204 |
</SectionCard>
|
| 205 |
</div>
|
| 206 |
</PageShell>
|
|
|
|
| 191 |
</div>
|
| 192 |
|
| 193 |
<SectionCard title="Summary" className="report-card report-main-table-card">
|
| 194 |
+
{loading ? (
|
| 195 |
+
<TableSkeleton rows={4} columns={8} />
|
| 196 |
+
) : (
|
| 197 |
+
<div className="table-wrap">
|
| 198 |
+
<table className="admin-table">
|
| 199 |
+
<thead><tr><th>Roll No</th><th>Name</th><th>Branch</th><th>Sem</th><th>Sec</th><th>Present</th><th>Absent</th><th>%</th></tr></thead>
|
| 200 |
<tbody>
|
| 201 |
+
{report.summary_rows.length ? report.summary_rows.map((row) => (
|
| 202 |
+
<tr key={row.roll_no}><td>{row.roll_no}</td><td>{row.name}</td><td>{row.branch}</td><td>{row.semester}</td><td>{row.section}</td><td>{row.present}</td><td>{row.absent}</td><td>{row.percentage}</td></tr>
|
| 203 |
+
)) : <tr><td colSpan="8">No records found</td></tr>}
|
| 204 |
</tbody>
|
| 205 |
</table>
|
| 206 |
</div>
|
| 207 |
+
)}
|
| 208 |
</SectionCard>
|
| 209 |
</div>
|
| 210 |
</PageShell>
|
frontend/src/pages/student/StudentDashboard.jsx
CHANGED
|
@@ -1,50 +1,292 @@
|
|
| 1 |
import React, { Fragment, useEffect, useMemo, useState } from "react";
|
| 2 |
-
import {
|
| 3 |
-
import { Responsive, WidthProvider } from "react-grid-layout";
|
| 4 |
import {
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
FaUserGear, FaUserGraduate, FaUserPen, FaUsers, FaVideo, FaPlay
|
| 8 |
} from "react-icons/fa6";
|
| 9 |
|
| 10 |
-
import { apiUrl,
|
| 11 |
-
import {
|
| 12 |
-
import {
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
function StudentDashboard() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
</div>
|
| 36 |
</SectionCard>
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
<span
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
</SectionCard>
|
| 49 |
</div>
|
| 50 |
</PageShell>
|
|
|
|
| 1 |
import React, { Fragment, useEffect, useMemo, useState } from "react";
|
| 2 |
+
import { Link } from "react-router-dom";
|
|
|
|
| 3 |
import {
|
| 4 |
+
FaCalendarDays, FaChartLine, FaClock, FaCircleCheck, FaCircleXmark,
|
| 5 |
+
FaBook, FaUserCheck, FaArrowRight
|
|
|
|
| 6 |
} from "react-icons/fa6";
|
| 7 |
|
| 8 |
+
import { apiUrl, getStoredAuthUser, useSessionProfile } from "../../utils/auth";
|
| 9 |
+
import { studentNav, todaysClasses, recentAttendance, weeklyTimetable } from "../../utils/constants";
|
| 10 |
+
import { PageShell, SectionCard, StatGrid, SimpleTable, DashboardSkeleton } from "../../components/Shared";
|
| 11 |
+
|
| 12 |
+
const DEFAULT_WEEKLY_HEADERS = ["09:00", "10:00", "11:00", "12:00", "02:00"];
|
| 13 |
|
| 14 |
function StudentDashboard() {
|
| 15 |
+
const profile = useSessionProfile("student");
|
| 16 |
+
const [loading, setLoading] = useState(true);
|
| 17 |
+
const [dashboardData, setDashboardData] = useState({
|
| 18 |
+
todayClasses: [],
|
| 19 |
+
upcomingClasses: [],
|
| 20 |
+
attendanceSummary: { present: 0, absent: 0, total: 0 },
|
| 21 |
+
recentAttendance: [],
|
| 22 |
+
weeklyHeaders: DEFAULT_WEEKLY_HEADERS,
|
| 23 |
+
weeklyTimetable: [],
|
| 24 |
+
});
|
| 25 |
+
const [usingFallbackData, setUsingFallbackData] = useState(false);
|
| 26 |
+
|
| 27 |
+
useEffect(() => {
|
| 28 |
+
async function fetchDashboardData() {
|
| 29 |
+
try {
|
| 30 |
+
setLoading(true);
|
| 31 |
+
const webResponse = await fetch(apiUrl("/api/student/dashboard"), {
|
| 32 |
+
method: "GET",
|
| 33 |
+
credentials: "include",
|
| 34 |
+
headers: { "Content-Type": "application/json" },
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
if (webResponse.ok) {
|
| 38 |
+
const data = await webResponse.json();
|
| 39 |
+
const summary = data.attendanceSummary || { present: 0, absent: 0, total: 0 };
|
| 40 |
+
setDashboardData({
|
| 41 |
+
todayClasses: data.todayClasses || data.todayAttendance || [],
|
| 42 |
+
upcomingClasses: data.upcomingClasses || [],
|
| 43 |
+
attendanceSummary: summary,
|
| 44 |
+
recentAttendance: data.recentAttendance || [],
|
| 45 |
+
weeklyHeaders: data.weeklyHeaders || DEFAULT_WEEKLY_HEADERS,
|
| 46 |
+
weeklyTimetable: data.weeklyTimetable || [],
|
| 47 |
+
});
|
| 48 |
+
setUsingFallbackData(false);
|
| 49 |
+
return;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
setUsingFallbackData(true);
|
| 53 |
+
} catch (error) {
|
| 54 |
+
console.error("Failed to fetch dashboard data:", error);
|
| 55 |
+
setUsingFallbackData(true);
|
| 56 |
+
} finally {
|
| 57 |
+
setLoading(false);
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
fetchDashboardData();
|
| 62 |
+
}, []);
|
| 63 |
+
|
| 64 |
+
if (loading) {
|
| 65 |
+
return <DashboardSkeleton variant="student" />;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
const storedUser = getStoredAuthUser();
|
| 69 |
+
const displayName = storedUser?.name || storedUser?.roll_no || "Student";
|
| 70 |
+
const displayMeta = storedUser?.branch ? `${storedUser.branch} / ${storedUser.semester || "Semester"}` : "Student";
|
| 71 |
+
|
| 72 |
+
const effectiveRecentAttendance = dashboardData.recentAttendance.length > 0 ? dashboardData.recentAttendance : recentAttendance;
|
| 73 |
+
const effectiveTodayClasses = dashboardData.todayClasses.length > 0 ? dashboardData.todayClasses : todaysClasses;
|
| 74 |
+
const effectiveWeeklyTimetable = dashboardData.weeklyTimetable.length > 0 ? dashboardData.weeklyTimetable : weeklyTimetable;
|
| 75 |
+
const effectiveWeeklyHeaders = dashboardData.weeklyHeaders.length > 0 ? dashboardData.weeklyHeaders : DEFAULT_WEEKLY_HEADERS;
|
| 76 |
+
|
| 77 |
+
const derivedPresent = dashboardData.attendanceSummary.present || effectiveRecentAttendance.filter((row) => String(row.status).toLowerCase() === "present").length;
|
| 78 |
+
const derivedAbsent = dashboardData.attendanceSummary.absent || effectiveRecentAttendance.filter((row) => String(row.status).toLowerCase() === "absent").length;
|
| 79 |
+
const derivedTotal = dashboardData.attendanceSummary.total || (derivedPresent + derivedAbsent);
|
| 80 |
+
const derivedPercentage = derivedTotal > 0 ? Math.round((derivedPresent / derivedTotal) * 100) : 0;
|
| 81 |
+
|
| 82 |
+
const enhancedStats = [
|
| 83 |
+
{
|
| 84 |
+
label: "Present",
|
| 85 |
+
value: derivedPresent,
|
| 86 |
+
tone: "success",
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
label: "Absent",
|
| 90 |
+
value: derivedAbsent,
|
| 91 |
+
tone: "danger",
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
label: "Total Classes",
|
| 95 |
+
value: derivedTotal,
|
| 96 |
+
tone: "info",
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
label: "Attendance %",
|
| 100 |
+
value: derivedPercentage,
|
| 101 |
+
tone: "warning",
|
| 102 |
+
},
|
| 103 |
+
];
|
| 104 |
+
|
| 105 |
return (
|
| 106 |
<PageShell
|
| 107 |
variant="student"
|
| 108 |
nav={studentNav}
|
| 109 |
+
title={`Welcome back, ${displayName}!`}
|
| 110 |
+
subtitle="Here's your attendance overview and schedule."
|
| 111 |
+
profile={{
|
| 112 |
+
avatar: displayName.charAt(0).toUpperCase(),
|
| 113 |
+
name: displayName,
|
| 114 |
+
meta: displayMeta,
|
| 115 |
+
}}
|
| 116 |
>
|
| 117 |
+
<StatGrid stats={enhancedStats} />
|
| 118 |
+
{usingFallbackData ? (
|
| 119 |
+
<p className="dashboard-data-note">Showing fallback sample data because live dashboard API data is unavailable right now.</p>
|
| 120 |
+
) : null}
|
| 121 |
+
|
| 122 |
+
<div className="student-dashboard-grid">
|
| 123 |
+
{/* Weekly Timetable */}
|
| 124 |
+
<SectionCard
|
| 125 |
+
title={
|
| 126 |
+
<span className="section-title-with-icon">
|
| 127 |
+
<FaBook />
|
| 128 |
+
<span>Weekly Timetable</span>
|
| 129 |
+
</span>
|
| 130 |
+
}
|
| 131 |
+
className="student-card timetable-card"
|
| 132 |
+
>
|
| 133 |
+
<p className="timetable-mobile-hint">Swipe left/right to view all columns.</p>
|
| 134 |
+
<div className="timetable-wrap">
|
| 135 |
+
<table className="modern-timetable">
|
| 136 |
+
<thead>
|
| 137 |
+
<tr>
|
| 138 |
+
<th>Day</th>
|
| 139 |
+
{effectiveWeeklyHeaders.map((slot) => (
|
| 140 |
+
<th key={`slot-${slot}`}>{slot}</th>
|
| 141 |
+
))}
|
| 142 |
+
</tr>
|
| 143 |
+
</thead>
|
| 144 |
+
<tbody>
|
| 145 |
+
{effectiveWeeklyTimetable && effectiveWeeklyTimetable.map((row, rowIdx) => (
|
| 146 |
+
<tr key={rowIdx}>
|
| 147 |
+
{row.map((cell, cellIdx) => (
|
| 148 |
+
<td key={`${rowIdx}-${cellIdx}`} className={cellIdx === 0 ? "day-cell" : cell === "Break" ? "break-cell" : "class-cell"}>
|
| 149 |
+
{cell}
|
| 150 |
+
</td>
|
| 151 |
+
))}
|
| 152 |
+
</tr>
|
| 153 |
+
))}
|
| 154 |
+
</tbody>
|
| 155 |
+
</table>
|
| 156 |
+
</div>
|
| 157 |
+
</SectionCard>
|
| 158 |
+
|
| 159 |
+
{/* Recent Attendance */}
|
| 160 |
+
<SectionCard
|
| 161 |
+
title={
|
| 162 |
+
<span className="section-title-with-icon">
|
| 163 |
+
<FaChartLine />
|
| 164 |
+
<span>Recent Attendance</span>
|
| 165 |
+
</span>
|
| 166 |
+
}
|
| 167 |
+
action={<Link to="/student/attendance" className="view-all-link">View All</Link>}
|
| 168 |
+
className="student-card attendance-card"
|
| 169 |
+
>
|
| 170 |
+
{effectiveRecentAttendance && effectiveRecentAttendance.length > 0 ? (
|
| 171 |
+
<SimpleTable
|
| 172 |
+
columns={["Date", "Subject", "Status"]}
|
| 173 |
+
rows={effectiveRecentAttendance.slice(0, 5).map((row) => [
|
| 174 |
+
row.date,
|
| 175 |
+
row.subject,
|
| 176 |
+
<span
|
| 177 |
+
key={row.date}
|
| 178 |
+
className={`attendance-badge ${row.status === "Present" ? "present" : "absent"}`}
|
| 179 |
+
>
|
| 180 |
+
{row.status === "Present" ? <FaCircleCheck /> : <FaCircleXmark />}
|
| 181 |
+
{row.status}
|
| 182 |
+
</span>,
|
| 183 |
+
])}
|
| 184 |
+
/>
|
| 185 |
+
) : (
|
| 186 |
+
<div className="empty-state">
|
| 187 |
+
<FaChartLine size={48} />
|
| 188 |
+
<p>No attendance records available</p>
|
| 189 |
+
</div>
|
| 190 |
+
)}
|
| 191 |
+
</SectionCard>
|
| 192 |
+
|
| 193 |
+
{/* Today's Schedule */}
|
| 194 |
+
<SectionCard
|
| 195 |
+
title={
|
| 196 |
+
<span className="section-title-with-icon">
|
| 197 |
+
<FaCalendarDays />
|
| 198 |
+
<span>Today's Schedule</span>
|
| 199 |
+
</span>
|
| 200 |
+
}
|
| 201 |
+
className="student-card schedule-card"
|
| 202 |
+
>
|
| 203 |
+
{effectiveTodayClasses && effectiveTodayClasses.length > 0 ? (
|
| 204 |
+
<div className="schedule-timeline">
|
| 205 |
+
{effectiveTodayClasses.map((item) => (
|
| 206 |
+
<div key={`${item.time}-${item.subject}`} className="timeline-item modern">
|
| 207 |
+
<div className="timeline-marker">
|
| 208 |
+
<FaClock size={14} />
|
| 209 |
+
</div>
|
| 210 |
+
<div className="timeline-content">
|
| 211 |
+
<div className="timeline-time">{item.time}</div>
|
| 212 |
+
<div className="timeline-subject">{item.subject}</div>
|
| 213 |
+
<div className="timeline-faculty">
|
| 214 |
+
<FaUserCheck size={12} /> Prof. {item.faculty}
|
| 215 |
+
</div>
|
| 216 |
+
</div>
|
| 217 |
+
</div>
|
| 218 |
+
))}
|
| 219 |
+
</div>
|
| 220 |
+
) : (
|
| 221 |
+
<div className="empty-state">
|
| 222 |
+
<FaCalendarDays size={48} />
|
| 223 |
+
<p>No classes scheduled for today</p>
|
| 224 |
+
</div>
|
| 225 |
+
)}
|
| 226 |
+
</SectionCard>
|
| 227 |
+
|
| 228 |
+
{/* Quick Actions */}
|
| 229 |
+
<SectionCard
|
| 230 |
+
title={
|
| 231 |
+
<span className="section-title-with-icon">
|
| 232 |
+
<FaArrowRight />
|
| 233 |
+
<span>Quick Actions</span>
|
| 234 |
+
</span>
|
| 235 |
+
}
|
| 236 |
+
className="student-card actions-card"
|
| 237 |
+
>
|
| 238 |
+
<div className="quick-actions">
|
| 239 |
+
<Link to="/student/attendance" className="action-button">
|
| 240 |
+
<FaChartLine /> View Attendance
|
| 241 |
+
</Link>
|
| 242 |
+
<Link to="/student/profile" className="action-button">
|
| 243 |
+
<FaUserCheck /> My Profile
|
| 244 |
+
</Link>
|
| 245 |
+
<Link to="/student/change-password" className="action-button">
|
| 246 |
+
<FaUserCheck /> Change Password
|
| 247 |
+
</Link>
|
| 248 |
</div>
|
| 249 |
</SectionCard>
|
| 250 |
+
|
| 251 |
+
{/* Attendance Summary Chart */}
|
| 252 |
+
<SectionCard
|
| 253 |
+
title={
|
| 254 |
+
<span className="section-title-with-icon">
|
| 255 |
+
<FaChartLine />
|
| 256 |
+
<span>Attendance Overview</span>
|
| 257 |
+
</span>
|
| 258 |
+
}
|
| 259 |
+
className="student-card summary-card"
|
| 260 |
+
>
|
| 261 |
+
<div className="attendance-summary-widget">
|
| 262 |
+
<div className="summary-stat">
|
| 263 |
+
<div className="summary-icon success">
|
| 264 |
+
<FaCircleCheck />
|
| 265 |
+
</div>
|
| 266 |
+
<div className="summary-text">
|
| 267 |
+
<strong>{derivedPresent}</strong>
|
| 268 |
+
<small>Classes Attended</small>
|
| 269 |
+
</div>
|
| 270 |
+
</div>
|
| 271 |
+
<div className="summary-stat">
|
| 272 |
+
<div className="summary-icon danger">
|
| 273 |
+
<FaCircleXmark />
|
| 274 |
+
</div>
|
| 275 |
+
<div className="summary-text">
|
| 276 |
+
<strong>{derivedAbsent}</strong>
|
| 277 |
+
<small>Classes Missed</small>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
<div className="summary-stat">
|
| 281 |
+
<div className="summary-icon info">
|
| 282 |
+
<FaBook />
|
| 283 |
+
</div>
|
| 284 |
+
<div className="summary-text">
|
| 285 |
+
<strong>{derivedPercentage}%</strong>
|
| 286 |
+
<small>Attendance Rate</small>
|
| 287 |
+
</div>
|
| 288 |
+
</div>
|
| 289 |
+
</div>
|
| 290 |
</SectionCard>
|
| 291 |
</div>
|
| 292 |
</PageShell>
|
frontend/src/pages/student/StudentProfile.jsx
CHANGED
|
@@ -1,46 +1,203 @@
|
|
| 1 |
import React, { Fragment, useEffect, useMemo, useState } from "react";
|
| 2 |
-
import {
|
| 3 |
-
import { Responsive, WidthProvider } from "react-grid-layout";
|
| 4 |
import {
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
FaUserGear, FaUserGraduate, FaUserPen, FaUsers, FaVideo, FaPlay
|
| 8 |
} from "react-icons/fa6";
|
| 9 |
|
| 10 |
-
import {
|
| 11 |
-
import {
|
| 12 |
-
import {
|
| 13 |
-
import { PageShell, SectionCard, StatGrid, SimpleTable, ProfileFields, FormGrid } from "../../components/Shared";
|
| 14 |
|
| 15 |
function StudentProfile() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
return (
|
| 17 |
<PageShell
|
| 18 |
variant="student"
|
| 19 |
nav={studentNav}
|
| 20 |
-
title="
|
| 21 |
-
subtitle="
|
| 22 |
-
profile={{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
>
|
| 24 |
-
<div className="
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
</SectionCard>
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
</SectionCard>
|
| 45 |
</div>
|
| 46 |
</PageShell>
|
|
|
|
| 1 |
import React, { Fragment, useEffect, useMemo, useState } from "react";
|
| 2 |
+
import { Link } from "react-router-dom";
|
|
|
|
| 3 |
import {
|
| 4 |
+
FaUser, FaEnvelope, FaPhone, FaMapPin, FaAward, FaBook, FaCamera,
|
| 5 |
+
FaGraduationCap, FaCalendarDays, FaPencil, FaCircleCheck, FaChartLine
|
|
|
|
| 6 |
} from "react-icons/fa6";
|
| 7 |
|
| 8 |
+
import { getStoredAuthUser, useSessionProfile } from "../../utils/auth";
|
| 9 |
+
import { studentNav } from "../../utils/constants";
|
| 10 |
+
import { PageShell, SectionCard, ProfileFields } from "../../components/Shared";
|
|
|
|
| 11 |
|
| 12 |
function StudentProfile() {
|
| 13 |
+
const profile = useSessionProfile("student");
|
| 14 |
+
const storedUser = getStoredAuthUser() || {};
|
| 15 |
+
const [isEditing, setIsEditing] = useState(false);
|
| 16 |
+
|
| 17 |
+
const displayName = storedUser?.name || storedUser?.roll_no || "Student";
|
| 18 |
+
const displayMeta = storedUser?.roll_no || "Roll No Not Available";
|
| 19 |
+
|
| 20 |
return (
|
| 21 |
<PageShell
|
| 22 |
variant="student"
|
| 23 |
nav={studentNav}
|
| 24 |
+
title="My Profile"
|
| 25 |
+
subtitle="View and manage your student information."
|
| 26 |
+
profile={{
|
| 27 |
+
avatar: displayName.charAt(0).toUpperCase(),
|
| 28 |
+
name: displayName,
|
| 29 |
+
meta: displayMeta,
|
| 30 |
+
}}
|
| 31 |
+
actions={
|
| 32 |
+
<Link to="/student/dashboard" className="btn-secondary">
|
| 33 |
+
← Back to Dashboard
|
| 34 |
+
</Link>
|
| 35 |
+
}
|
| 36 |
>
|
| 37 |
+
<div className="student-profile-grid">
|
| 38 |
+
{/* Profile Header Card */}
|
| 39 |
+
<SectionCard className="student-profile-header">
|
| 40 |
+
<div className="profile-header-content">
|
| 41 |
+
<div className="profile-avatar-large">
|
| 42 |
+
{storedUser?.photoPath ? (
|
| 43 |
+
<img src={storedUser.photoPath} alt={displayName} />
|
| 44 |
+
) : (
|
| 45 |
+
<span>{displayName.charAt(0).toUpperCase()}</span>
|
| 46 |
+
)}
|
| 47 |
+
</div>
|
| 48 |
+
<div className="profile-header-info">
|
| 49 |
+
<h2>{displayName}</h2>
|
| 50 |
+
<p className="profile-role">
|
| 51 |
+
<FaGraduationCap /> Student
|
| 52 |
+
</p>
|
| 53 |
+
<p className="profile-roll">{storedUser?.roll_no || "Roll No Not Set"}</p>
|
| 54 |
+
<div className="profile-badges">
|
| 55 |
+
{storedUser?.faceRegistered && (
|
| 56 |
+
<span className="badge badge-success">
|
| 57 |
+
<FaCircleCheck /> Face Registered
|
| 58 |
+
</span>
|
| 59 |
+
)}
|
| 60 |
+
<span className="badge badge-info">
|
| 61 |
+
<FaBook /> Active
|
| 62 |
+
</span>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
</SectionCard>
|
| 67 |
+
|
| 68 |
+
{/* Academic Information */}
|
| 69 |
+
<SectionCard
|
| 70 |
+
title={
|
| 71 |
+
<span className="section-title-with-icon">
|
| 72 |
+
<FaGraduationCap />
|
| 73 |
+
<span>Academic Information</span>
|
| 74 |
+
</span>
|
| 75 |
+
}
|
| 76 |
+
className="student-profile-card"
|
| 77 |
+
>
|
| 78 |
+
<div className="profile-info-grid three">
|
| 79 |
+
<div className="info-item">
|
| 80 |
+
<div className="info-label">
|
| 81 |
+
<FaGraduationCap /> Branch
|
| 82 |
+
</div>
|
| 83 |
+
<div className="info-value">{storedUser?.branch || "Not Specified"}</div>
|
| 84 |
+
</div>
|
| 85 |
+
<div className="info-item">
|
| 86 |
+
<div className="info-label">
|
| 87 |
+
<FaCalendarDays /> Semester
|
| 88 |
+
</div>
|
| 89 |
+
<div className="info-value">{storedUser?.semester || "Not Specified"}</div>
|
| 90 |
+
</div>
|
| 91 |
+
<div className="info-item">
|
| 92 |
+
<div className="info-label">
|
| 93 |
+
<FaAward /> Section
|
| 94 |
+
</div>
|
| 95 |
+
<div className="info-value">{storedUser?.section || "Not Specified"}</div>
|
| 96 |
+
</div>
|
| 97 |
+
</div>
|
| 98 |
+
</SectionCard>
|
| 99 |
+
|
| 100 |
+
{/* Contact Information */}
|
| 101 |
+
<SectionCard
|
| 102 |
+
title={
|
| 103 |
+
<span className="section-title-with-icon">
|
| 104 |
+
<FaEnvelope />
|
| 105 |
+
<span>Contact Information</span>
|
| 106 |
+
</span>
|
| 107 |
+
}
|
| 108 |
+
className="student-profile-card"
|
| 109 |
+
>
|
| 110 |
+
<div className="profile-info-grid two">
|
| 111 |
+
<div className="info-item full-width">
|
| 112 |
+
<div className="info-label">
|
| 113 |
+
<FaEnvelope /> Email Address
|
| 114 |
+
</div>
|
| 115 |
+
<div className="info-value">{storedUser?.email || "Not Provided"}</div>
|
| 116 |
+
</div>
|
| 117 |
+
<div className="info-item">
|
| 118 |
+
<div className="info-label">
|
| 119 |
+
<FaPhone /> Phone Number
|
| 120 |
+
</div>
|
| 121 |
+
<div className="info-value">{storedUser?.phone || "Not Provided"}</div>
|
| 122 |
+
</div>
|
| 123 |
+
<div className="info-item">
|
| 124 |
+
<div className="info-label">
|
| 125 |
+
<FaMapPin /> Address
|
| 126 |
+
</div>
|
| 127 |
+
<div className="info-value">{storedUser?.address || "Not Provided"}</div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</SectionCard>
|
| 131 |
+
|
| 132 |
+
{/* Face Recognition Status */}
|
| 133 |
+
<SectionCard
|
| 134 |
+
title={
|
| 135 |
+
<span className="section-title-with-icon">
|
| 136 |
+
<FaCamera />
|
| 137 |
+
<span>Face Recognition</span>
|
| 138 |
+
</span>
|
| 139 |
+
}
|
| 140 |
+
className="student-profile-card"
|
| 141 |
+
>
|
| 142 |
+
<div className="face-recognition-section">
|
| 143 |
+
<div className="face-status">
|
| 144 |
+
{storedUser?.faceRegistered ? (
|
| 145 |
+
<>
|
| 146 |
+
<div className="status-icon success">
|
| 147 |
+
<FaCircleCheck />
|
| 148 |
+
</div>
|
| 149 |
+
<div className="status-text">
|
| 150 |
+
<h4>Face Registered</h4>
|
| 151 |
+
<p>Your face is registered in the system for attendance marking.</p>
|
| 152 |
+
</div>
|
| 153 |
+
</>
|
| 154 |
+
) : (
|
| 155 |
+
<>
|
| 156 |
+
<div className="status-icon warning">
|
| 157 |
+
<FaCamera />
|
| 158 |
+
</div>
|
| 159 |
+
<div className="status-text">
|
| 160 |
+
<h4>Face Not Registered</h4>
|
| 161 |
+
<p>Please register your face to enable automated attendance marking.</p>
|
| 162 |
+
</div>
|
| 163 |
+
</>
|
| 164 |
+
)}
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
</SectionCard>
|
| 168 |
+
|
| 169 |
+
{/* Account Actions */}
|
| 170 |
+
<SectionCard
|
| 171 |
+
title={
|
| 172 |
+
<span className="section-title-with-icon">
|
| 173 |
+
<FaPencil />
|
| 174 |
+
<span>Account Settings</span>
|
| 175 |
+
</span>
|
| 176 |
+
}
|
| 177 |
+
className="student-profile-card"
|
| 178 |
+
>
|
| 179 |
+
<div className="account-actions">
|
| 180 |
+
<Link to="/student/change-password" className="action-link">
|
| 181 |
+
<div className="action-icon">
|
| 182 |
+
<FaPencil />
|
| 183 |
+
</div>
|
| 184 |
+
<div className="action-text">
|
| 185 |
+
<h4>Change Password</h4>
|
| 186 |
+
<p>Update your password to keep your account secure</p>
|
| 187 |
+
</div>
|
| 188 |
+
<span className="action-arrow">→</span>
|
| 189 |
+
</Link>
|
| 190 |
+
<Link to="/student/attendance" className="action-link">
|
| 191 |
+
<div className="action-icon">
|
| 192 |
+
<FaChartLine />
|
| 193 |
+
</div>
|
| 194 |
+
<div className="action-text">
|
| 195 |
+
<h4>View Attendance</h4>
|
| 196 |
+
<p>Check your attendance records and statistics</p>
|
| 197 |
+
</div>
|
| 198 |
+
<span className="action-arrow">→</span>
|
| 199 |
+
</Link>
|
| 200 |
+
</div>
|
| 201 |
</SectionCard>
|
| 202 |
</div>
|
| 203 |
</PageShell>
|
frontend/src/styles.css
CHANGED
|
@@ -6,3 +6,4 @@
|
|
| 6 |
@import "./styles/06-admin-shared.css";
|
| 7 |
@import "./styles/07-reports-theme-dark.css";
|
| 8 |
@import "./styles/08-responsive.css";
|
|
|
|
|
|
| 6 |
@import "./styles/06-admin-shared.css";
|
| 7 |
@import "./styles/07-reports-theme-dark.css";
|
| 8 |
@import "./styles/08-responsive.css";
|
| 9 |
+
@import "./styles/pages/student-dashboard.css";
|
frontend/src/styles/01-base.css
CHANGED
|
@@ -115,8 +115,8 @@ img {
|
|
| 115 |
background: var(--ui-sidebar-bg);
|
| 116 |
}
|
| 117 |
.portal-shell.student .portal-sidebar {
|
| 118 |
-
background:
|
| 119 |
-
color:
|
| 120 |
}
|
| 121 |
|
| 122 |
.sidebar-brand,
|
|
@@ -193,7 +193,7 @@ img {
|
|
| 193 |
display: block;
|
| 194 |
}
|
| 195 |
.portal-shell.student .profile-photo {
|
| 196 |
-
background: rgba(
|
| 197 |
}
|
| 198 |
.brand-title {
|
| 199 |
display: flex;
|
|
@@ -500,12 +500,49 @@ body.dark .portal-skeleton-calendar {
|
|
| 500 |
.skeleton-table {
|
| 501 |
width: 100%;
|
| 502 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 503 |
.skeleton-filter-item {
|
| 504 |
pointer-events: none;
|
| 505 |
}
|
| 506 |
.dashboard-skeleton {
|
| 507 |
margin-bottom: 18px;
|
| 508 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 509 |
.dashboard-skeleton-grid {
|
| 510 |
display: grid;
|
| 511 |
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -535,6 +572,17 @@ body.dark .portal-skeleton-calendar {
|
|
| 535 |
.skeleton-table-bars.short {
|
| 536 |
width: 65%;
|
| 537 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 538 |
.sidebar-top-action-row {
|
| 539 |
display: grid;
|
| 540 |
grid-template-columns: minmax(0, 1fr) auto;
|
|
@@ -570,11 +618,13 @@ body.dark .portal-skeleton-calendar {
|
|
| 570 |
height: 18px;
|
| 571 |
}
|
| 572 |
.portal-shell.student .nav-link {
|
| 573 |
-
color:
|
| 574 |
}
|
| 575 |
.portal-shell.student .nav-link.active,
|
| 576 |
.portal-shell.student .nav-link:hover {
|
| 577 |
-
background:
|
|
|
|
|
|
|
| 578 |
transform: translateX(4px);
|
| 579 |
}
|
| 580 |
.portal-shell.admin .nav-link.active,
|
|
@@ -595,18 +645,28 @@ body.dark .portal-skeleton-calendar {
|
|
| 595 |
color: #374151;
|
| 596 |
}
|
| 597 |
.portal-shell.admin .nav-link.active .nav-icon,
|
| 598 |
-
.portal-shell.faculty .nav-link.active .nav-icon
|
|
|
|
| 599 |
color: #fff;
|
| 600 |
}
|
| 601 |
.portal-shell.faculty .nav-links {
|
| 602 |
position: relative;
|
| 603 |
padding: 10px 6px 0;
|
| 604 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 605 |
.portal-shell.faculty .nav-link {
|
| 606 |
padding: 13px 16px;
|
| 607 |
color: var(--ui-text);
|
| 608 |
font-weight: 500;
|
| 609 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 610 |
.portal-shell.faculty .nav-link:not(.active) {
|
| 611 |
background: transparent;
|
| 612 |
box-shadow: none;
|
|
|
|
| 115 |
background: var(--ui-sidebar-bg);
|
| 116 |
}
|
| 117 |
.portal-shell.student .portal-sidebar {
|
| 118 |
+
background: var(--ui-sidebar-bg);
|
| 119 |
+
color: var(--ui-text);
|
| 120 |
}
|
| 121 |
|
| 122 |
.sidebar-brand,
|
|
|
|
| 193 |
display: block;
|
| 194 |
}
|
| 195 |
.portal-shell.student .profile-photo {
|
| 196 |
+
background: rgba(25, 118, 210, 0.1);
|
| 197 |
}
|
| 198 |
.brand-title {
|
| 199 |
display: flex;
|
|
|
|
| 500 |
.skeleton-table {
|
| 501 |
width: 100%;
|
| 502 |
}
|
| 503 |
+
.table-skeleton-grid {
|
| 504 |
+
display: grid;
|
| 505 |
+
gap: 10px;
|
| 506 |
+
}
|
| 507 |
+
.table-skeleton-row {
|
| 508 |
+
display: grid;
|
| 509 |
+
gap: 12px;
|
| 510 |
+
align-items: center;
|
| 511 |
+
}
|
| 512 |
+
.table-skeleton-row-head {
|
| 513 |
+
margin-bottom: 2px;
|
| 514 |
+
}
|
| 515 |
+
.table-skeleton-cell {
|
| 516 |
+
min-width: 0;
|
| 517 |
+
}
|
| 518 |
.skeleton-filter-item {
|
| 519 |
pointer-events: none;
|
| 520 |
}
|
| 521 |
.dashboard-skeleton {
|
| 522 |
margin-bottom: 18px;
|
| 523 |
}
|
| 524 |
+
.dashboard-skeleton-stats {
|
| 525 |
+
display: grid;
|
| 526 |
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
| 527 |
+
gap: 16px;
|
| 528 |
+
margin-bottom: 16px;
|
| 529 |
+
}
|
| 530 |
+
.dashboard-skeleton.student .dashboard-skeleton-grid.student-grid {
|
| 531 |
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
| 532 |
+
gap: 18px;
|
| 533 |
+
}
|
| 534 |
+
.dashboard-skeleton.student .dashboard-skeleton-card.stat {
|
| 535 |
+
min-height: 112px;
|
| 536 |
+
}
|
| 537 |
+
.dashboard-skeleton.student .dashboard-skeleton-card.schedule,
|
| 538 |
+
.dashboard-skeleton.student .dashboard-skeleton-card.timetable,
|
| 539 |
+
.dashboard-skeleton.student .dashboard-skeleton-card.attendance {
|
| 540 |
+
min-height: 220px;
|
| 541 |
+
}
|
| 542 |
+
.dashboard-skeleton.student .dashboard-skeleton-card.actions,
|
| 543 |
+
.dashboard-skeleton.student .dashboard-skeleton-card.summary {
|
| 544 |
+
min-height: 176px;
|
| 545 |
+
}
|
| 546 |
.dashboard-skeleton-grid {
|
| 547 |
display: grid;
|
| 548 |
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
| 572 |
.skeleton-table-bars.short {
|
| 573 |
width: 65%;
|
| 574 |
}
|
| 575 |
+
@media (max-width: 1024px) {
|
| 576 |
+
.dashboard-skeleton-stats {
|
| 577 |
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
| 578 |
+
}
|
| 579 |
+
}
|
| 580 |
+
@media (max-width: 768px) {
|
| 581 |
+
.dashboard-skeleton.student .dashboard-skeleton-grid.student-grid,
|
| 582 |
+
.dashboard-skeleton-grid {
|
| 583 |
+
grid-template-columns: 1fr;
|
| 584 |
+
}
|
| 585 |
+
}
|
| 586 |
.sidebar-top-action-row {
|
| 587 |
display: grid;
|
| 588 |
grid-template-columns: minmax(0, 1fr) auto;
|
|
|
|
| 618 |
height: 18px;
|
| 619 |
}
|
| 620 |
.portal-shell.student .nav-link {
|
| 621 |
+
color: var(--ui-text);
|
| 622 |
}
|
| 623 |
.portal-shell.student .nav-link.active,
|
| 624 |
.portal-shell.student .nav-link:hover {
|
| 625 |
+
background: linear-gradient(135deg, #4d98db 0%, #2d7ed2 100%);
|
| 626 |
+
color: #374151;
|
| 627 |
+
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.24);
|
| 628 |
transform: translateX(4px);
|
| 629 |
}
|
| 630 |
.portal-shell.admin .nav-link.active,
|
|
|
|
| 645 |
color: #374151;
|
| 646 |
}
|
| 647 |
.portal-shell.admin .nav-link.active .nav-icon,
|
| 648 |
+
.portal-shell.faculty .nav-link.active .nav-icon,
|
| 649 |
+
.portal-shell.student .nav-link.active .nav-icon {
|
| 650 |
color: #fff;
|
| 651 |
}
|
| 652 |
.portal-shell.faculty .nav-links {
|
| 653 |
position: relative;
|
| 654 |
padding: 10px 6px 0;
|
| 655 |
}
|
| 656 |
+
.portal-shell.student .nav-links {
|
| 657 |
+
position: relative;
|
| 658 |
+
padding: 10px 6px 0;
|
| 659 |
+
}
|
| 660 |
.portal-shell.faculty .nav-link {
|
| 661 |
padding: 13px 16px;
|
| 662 |
color: var(--ui-text);
|
| 663 |
font-weight: 500;
|
| 664 |
}
|
| 665 |
+
.portal-shell.student .nav-link {
|
| 666 |
+
padding: 13px 16px;
|
| 667 |
+
color: var(--ui-text);
|
| 668 |
+
font-weight: 500;
|
| 669 |
+
}
|
| 670 |
.portal-shell.faculty .nav-link:not(.active) {
|
| 671 |
background: transparent;
|
| 672 |
box-shadow: none;
|
frontend/src/styles/07-reports-theme-dark.css
CHANGED
|
@@ -455,7 +455,7 @@ body.dark .source-badge {
|
|
| 455 |
}
|
| 456 |
|
| 457 |
body.dark .portal-shell.student .portal-sidebar {
|
| 458 |
-
background:
|
| 459 |
}
|
| 460 |
|
| 461 |
body.dark .portal-shell.admin .nav-link.active,
|
|
|
|
| 455 |
}
|
| 456 |
|
| 457 |
body.dark .portal-shell.student .portal-sidebar {
|
| 458 |
+
background: var(--ui-sidebar-bg);
|
| 459 |
}
|
| 460 |
|
| 461 |
body.dark .portal-shell.admin .nav-link.active,
|
frontend/src/styles/08-responsive.css
CHANGED
|
@@ -8,6 +8,9 @@
|
|
| 8 |
inset: auto;
|
| 9 |
min-height: auto;
|
| 10 |
border-radius: 0 0 20px 20px;
|
|
|
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
.portal-loading-screen .portal-main-skeleton {
|
| 13 |
margin-left: 0;
|
|
|
|
| 8 |
inset: auto;
|
| 9 |
min-height: auto;
|
| 10 |
border-radius: 0 0 20px 20px;
|
| 11 |
+
transform: none;
|
| 12 |
+
opacity: 1;
|
| 13 |
+
visibility: visible;
|
| 14 |
}
|
| 15 |
.portal-loading-screen .portal-main-skeleton {
|
| 16 |
margin-left: 0;
|
frontend/src/styles/pages/student-dashboard.css
ADDED
|
@@ -0,0 +1,1018 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* ============================================
|
| 2 |
+
STUDENT DASHBOARD & PROFILE - MODERN STYLING
|
| 3 |
+
============================================ */
|
| 4 |
+
|
| 5 |
+
/* ============================================
|
| 6 |
+
STUDENT DASHBOARD GRID LAYOUT
|
| 7 |
+
============================================ */
|
| 8 |
+
|
| 9 |
+
.student-dashboard-grid {
|
| 10 |
+
display: grid;
|
| 11 |
+
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
| 12 |
+
gap: 24px;
|
| 13 |
+
padding: 24px 0;
|
| 14 |
+
animation: fadeIn 0.3s ease-in;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
@keyframes fadeIn {
|
| 18 |
+
from {
|
| 19 |
+
opacity: 0;
|
| 20 |
+
transform: translateY(8px);
|
| 21 |
+
}
|
| 22 |
+
to {
|
| 23 |
+
opacity: 1;
|
| 24 |
+
transform: translateY(0);
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.student-card {
|
| 29 |
+
animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
|
| 30 |
+
transition: transform 0.3s var(--motion-base), box-shadow 0.3s var(--motion-base);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.student-card:hover {
|
| 34 |
+
transform: translateY(-4px);
|
| 35 |
+
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.section-title-with-icon {
|
| 39 |
+
display: inline-flex;
|
| 40 |
+
align-items: center;
|
| 41 |
+
gap: 8px;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.section-title-with-icon svg {
|
| 45 |
+
width: 16px;
|
| 46 |
+
height: 16px;
|
| 47 |
+
color: #1976d2;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
@keyframes slideUp {
|
| 51 |
+
from {
|
| 52 |
+
opacity: 0;
|
| 53 |
+
transform: translateY(24px);
|
| 54 |
+
}
|
| 55 |
+
to {
|
| 56 |
+
opacity: 1;
|
| 57 |
+
transform: translateY(0);
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
/* Schedule Card */
|
| 62 |
+
.schedule-card {
|
| 63 |
+
grid-column: span 1;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
/* Attendance Card */
|
| 67 |
+
.attendance-card {
|
| 68 |
+
grid-column: span 1;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/* Actions Card */
|
| 72 |
+
.actions-card {
|
| 73 |
+
grid-column: span 1;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
/* Timetable Card */
|
| 77 |
+
.timetable-card {
|
| 78 |
+
grid-column: 1 / -1;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
/* Summary Card */
|
| 82 |
+
.summary-card {
|
| 83 |
+
grid-column: span 1;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
/* ============================================
|
| 87 |
+
TIMELINE STYLING
|
| 88 |
+
============================================ */
|
| 89 |
+
|
| 90 |
+
.schedule-timeline {
|
| 91 |
+
display: flex;
|
| 92 |
+
flex-direction: column;
|
| 93 |
+
gap: 16px;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.timeline-item {
|
| 97 |
+
display: flex;
|
| 98 |
+
gap: 12px;
|
| 99 |
+
padding: 12px 0;
|
| 100 |
+
border-left: 3px solid #e2e8f0;
|
| 101 |
+
transition: all 0.3s var(--motion-base);
|
| 102 |
+
overflow: hidden;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.timeline-item:hover {
|
| 106 |
+
border-left-color: #1976d2;
|
| 107 |
+
padding-left: 8px;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.timeline-item.modern {
|
| 111 |
+
border-left: 3px solid transparent;
|
| 112 |
+
background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(25, 118, 210, 0.02) 100%);
|
| 113 |
+
padding: 12px 12px 12px 14px;
|
| 114 |
+
border-radius: 10px;
|
| 115 |
+
position: relative;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.timeline-item.modern::before {
|
| 119 |
+
content: "";
|
| 120 |
+
position: absolute;
|
| 121 |
+
left: 0;
|
| 122 |
+
top: 50%;
|
| 123 |
+
transform: translateY(-50%);
|
| 124 |
+
width: 3px;
|
| 125 |
+
height: 60%;
|
| 126 |
+
background: linear-gradient(180deg, #1976d2 0%, rgba(25, 118, 210, 0.3) 100%);
|
| 127 |
+
border-radius: 2px;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.timeline-marker {
|
| 131 |
+
display: flex;
|
| 132 |
+
align-items: center;
|
| 133 |
+
justify-content: center;
|
| 134 |
+
width: 32px;
|
| 135 |
+
height: 32px;
|
| 136 |
+
background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
|
| 137 |
+
border-radius: 50%;
|
| 138 |
+
color: white;
|
| 139 |
+
flex-shrink: 0;
|
| 140 |
+
box-shadow: 0 4px 12px rgba(25, 118, 210, 0.25);
|
| 141 |
+
position: relative;
|
| 142 |
+
z-index: 1;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.timeline-content {
|
| 146 |
+
flex: 1;
|
| 147 |
+
display: flex;
|
| 148 |
+
flex-direction: column;
|
| 149 |
+
gap: 4px;
|
| 150 |
+
min-width: 0;
|
| 151 |
+
position: relative;
|
| 152 |
+
z-index: 2;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.timeline-time {
|
| 156 |
+
font-size: 12px;
|
| 157 |
+
font-weight: 600;
|
| 158 |
+
color: #1976d2;
|
| 159 |
+
text-transform: uppercase;
|
| 160 |
+
letter-spacing: 0.5px;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.timeline-subject {
|
| 164 |
+
font-size: 15px;
|
| 165 |
+
font-weight: 600;
|
| 166 |
+
color: var(--ui-text);
|
| 167 |
+
line-height: 1.4;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.timeline-faculty {
|
| 171 |
+
font-size: 13px;
|
| 172 |
+
color: var(--ui-text-muted);
|
| 173 |
+
display: flex;
|
| 174 |
+
align-items: center;
|
| 175 |
+
gap: 4px;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
/* Empty State */
|
| 179 |
+
.empty-state {
|
| 180 |
+
display: flex;
|
| 181 |
+
flex-direction: column;
|
| 182 |
+
align-items: center;
|
| 183 |
+
justify-content: center;
|
| 184 |
+
gap: 12px;
|
| 185 |
+
padding: 48px 24px;
|
| 186 |
+
text-align: center;
|
| 187 |
+
color: var(--ui-text-muted);
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
.empty-state svg {
|
| 191 |
+
opacity: 0.4;
|
| 192 |
+
margin-bottom: 12px;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
.empty-state p {
|
| 196 |
+
font-size: 14px;
|
| 197 |
+
margin: 0;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
/* ============================================
|
| 201 |
+
QUICK ACTIONS
|
| 202 |
+
============================================ */
|
| 203 |
+
|
| 204 |
+
.quick-actions {
|
| 205 |
+
display: grid;
|
| 206 |
+
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
| 207 |
+
gap: 12px;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
.action-button {
|
| 211 |
+
display: flex;
|
| 212 |
+
flex-direction: column;
|
| 213 |
+
align-items: center;
|
| 214 |
+
justify-content: center;
|
| 215 |
+
gap: 8px;
|
| 216 |
+
padding: 16px 12px;
|
| 217 |
+
background: linear-gradient(135deg, #f5f7fb 0%, #f0f4fb 100%);
|
| 218 |
+
border: 1px solid #e2e8f0;
|
| 219 |
+
border-radius: 12px;
|
| 220 |
+
color: var(--ui-text);
|
| 221 |
+
text-decoration: none;
|
| 222 |
+
font-size: 13px;
|
| 223 |
+
font-weight: 600;
|
| 224 |
+
text-align: center;
|
| 225 |
+
transition: all 0.3s var(--motion-base);
|
| 226 |
+
cursor: pointer;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.action-button:hover {
|
| 230 |
+
background: linear-gradient(135deg, #eff6ff 0%, #e6f0ff 100%);
|
| 231 |
+
border-color: #1976d2;
|
| 232 |
+
color: #1976d2;
|
| 233 |
+
transform: translateY(-2px);
|
| 234 |
+
box-shadow: 0 8px 16px rgba(25, 118, 210, 0.12);
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.action-button:active {
|
| 238 |
+
transform: translateY(0);
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.action-button svg {
|
| 242 |
+
font-size: 18px;
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
/* ============================================
|
| 246 |
+
ATTENDANCE SUMMARY WIDGET
|
| 247 |
+
============================================ */
|
| 248 |
+
|
| 249 |
+
.attendance-summary-widget {
|
| 250 |
+
display: grid;
|
| 251 |
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
| 252 |
+
gap: 16px;
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
.summary-stat {
|
| 256 |
+
display: flex;
|
| 257 |
+
align-items: center;
|
| 258 |
+
gap: 12px;
|
| 259 |
+
padding: 16px;
|
| 260 |
+
background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(25, 118, 210, 0.02) 100%);
|
| 261 |
+
border: 1px solid rgba(25, 118, 210, 0.1);
|
| 262 |
+
border-radius: 12px;
|
| 263 |
+
transition: all 0.3s var(--motion-base);
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
.summary-stat:hover {
|
| 267 |
+
background: linear-gradient(135deg, rgba(25, 118, 210, 0.08) 0%, rgba(25, 118, 210, 0.04) 100%);
|
| 268 |
+
transform: translateY(-2px);
|
| 269 |
+
box-shadow: 0 8px 16px rgba(25, 118, 210, 0.08);
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
.summary-icon {
|
| 273 |
+
display: flex;
|
| 274 |
+
align-items: center;
|
| 275 |
+
justify-content: center;
|
| 276 |
+
width: 48px;
|
| 277 |
+
height: 48px;
|
| 278 |
+
border-radius: 50%;
|
| 279 |
+
font-size: 24px;
|
| 280 |
+
flex-shrink: 0;
|
| 281 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
.summary-icon.success {
|
| 285 |
+
background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
|
| 286 |
+
color: white;
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
.summary-icon.danger {
|
| 290 |
+
background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
|
| 291 |
+
color: white;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.summary-icon.info {
|
| 295 |
+
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
|
| 296 |
+
color: white;
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
.summary-text {
|
| 300 |
+
display: flex;
|
| 301 |
+
flex-direction: column;
|
| 302 |
+
gap: 2px;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
.summary-text strong {
|
| 306 |
+
font-size: 18px;
|
| 307 |
+
color: var(--ui-text);
|
| 308 |
+
line-height: 1;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.summary-text small {
|
| 312 |
+
font-size: 12px;
|
| 313 |
+
color: var(--ui-text-muted);
|
| 314 |
+
font-weight: 500;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
/* ============================================
|
| 318 |
+
ATTENDANCE BADGE
|
| 319 |
+
============================================ */
|
| 320 |
+
|
| 321 |
+
.attendance-badge {
|
| 322 |
+
display: inline-flex;
|
| 323 |
+
align-items: center;
|
| 324 |
+
gap: 6px;
|
| 325 |
+
padding: 6px 12px;
|
| 326 |
+
border-radius: 8px;
|
| 327 |
+
font-size: 12px;
|
| 328 |
+
font-weight: 600;
|
| 329 |
+
text-transform: capitalize;
|
| 330 |
+
transition: all 0.3s var(--motion-base);
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
.attendance-badge.present {
|
| 334 |
+
background: rgba(52, 211, 153, 0.1);
|
| 335 |
+
color: #059669;
|
| 336 |
+
border: 1px solid rgba(52, 211, 153, 0.3);
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
.attendance-badge.present:hover {
|
| 340 |
+
background: rgba(52, 211, 153, 0.15);
|
| 341 |
+
border-color: rgba(52, 211, 153, 0.5);
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
.attendance-badge.absent {
|
| 345 |
+
background: rgba(248, 113, 113, 0.1);
|
| 346 |
+
color: #dc2626;
|
| 347 |
+
border: 1px solid rgba(248, 113, 113, 0.3);
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.attendance-badge.absent:hover {
|
| 351 |
+
background: rgba(248, 113, 113, 0.15);
|
| 352 |
+
border-color: rgba(248, 113, 113, 0.5);
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
/* ============================================
|
| 356 |
+
STUDENT PROFILE STYLING
|
| 357 |
+
============================================ */
|
| 358 |
+
|
| 359 |
+
.student-profile-grid {
|
| 360 |
+
display: grid;
|
| 361 |
+
grid-template-columns: 1fr;
|
| 362 |
+
gap: 24px;
|
| 363 |
+
padding: 24px 0;
|
| 364 |
+
animation: fadeIn 0.3s ease-in;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
.student-profile-card {
|
| 368 |
+
animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
|
| 369 |
+
transition: transform 0.3s var(--motion-base), box-shadow 0.3s var(--motion-base);
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
.student-profile-card:hover {
|
| 373 |
+
transform: translateY(-2px);
|
| 374 |
+
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
/* Profile Header */
|
| 378 |
+
.student-profile-header {
|
| 379 |
+
background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
|
| 380 |
+
color: white;
|
| 381 |
+
padding: 32px !important;
|
| 382 |
+
border-radius: 18px !important;
|
| 383 |
+
border: none !important;
|
| 384 |
+
box-shadow: 0 12px 40px rgba(25, 118, 210, 0.2) !important;
|
| 385 |
+
margin-bottom: 12px;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.profile-header-content {
|
| 389 |
+
display: flex;
|
| 390 |
+
gap: 24px;
|
| 391 |
+
align-items: flex-start;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.profile-avatar-large {
|
| 395 |
+
width: 120px;
|
| 396 |
+
height: 120px;
|
| 397 |
+
min-width: 120px;
|
| 398 |
+
border-radius: 16px;
|
| 399 |
+
background: rgba(255, 255, 255, 0.2);
|
| 400 |
+
border: 3px solid rgba(255, 255, 255, 0.4);
|
| 401 |
+
display: flex;
|
| 402 |
+
align-items: center;
|
| 403 |
+
justify-content: center;
|
| 404 |
+
font-size: 48px;
|
| 405 |
+
font-weight: 700;
|
| 406 |
+
color: white;
|
| 407 |
+
overflow: hidden;
|
| 408 |
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
.profile-avatar-large img {
|
| 412 |
+
width: 100%;
|
| 413 |
+
height: 100%;
|
| 414 |
+
object-fit: cover;
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
.profile-header-info {
|
| 418 |
+
flex: 1;
|
| 419 |
+
display: flex;
|
| 420 |
+
flex-direction: column;
|
| 421 |
+
gap: 8px;
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
.profile-header-info h2 {
|
| 425 |
+
font-size: 28px;
|
| 426 |
+
font-weight: 800;
|
| 427 |
+
margin: 0 0 4px 0;
|
| 428 |
+
line-height: 1.2;
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
.profile-role {
|
| 432 |
+
font-size: 14px;
|
| 433 |
+
display: flex;
|
| 434 |
+
align-items: center;
|
| 435 |
+
gap: 6px;
|
| 436 |
+
margin: 0;
|
| 437 |
+
opacity: 0.95;
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
.profile-roll {
|
| 441 |
+
font-size: 13px;
|
| 442 |
+
opacity: 0.85;
|
| 443 |
+
margin: 0;
|
| 444 |
+
font-family: "Courier New", monospace;
|
| 445 |
+
font-weight: 600;
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
.profile-badges {
|
| 449 |
+
display: flex;
|
| 450 |
+
flex-wrap: wrap;
|
| 451 |
+
gap: 8px;
|
| 452 |
+
margin-top: 4px;
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
.badge {
|
| 456 |
+
display: inline-flex;
|
| 457 |
+
align-items: center;
|
| 458 |
+
gap: 4px;
|
| 459 |
+
padding: 6px 12px;
|
| 460 |
+
border-radius: 8px;
|
| 461 |
+
font-size: 12px;
|
| 462 |
+
font-weight: 600;
|
| 463 |
+
background: rgba(255, 255, 255, 0.2);
|
| 464 |
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
| 465 |
+
color: white;
|
| 466 |
+
text-transform: capitalize;
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
.badge.badge-success {
|
| 470 |
+
background: rgba(52, 211, 153, 0.2);
|
| 471 |
+
border-color: rgba(52, 211, 153, 0.4);
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
.badge.badge-info {
|
| 475 |
+
background: rgba(96, 165, 250, 0.2);
|
| 476 |
+
border-color: rgba(96, 165, 250, 0.4);
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
/* Info Grid */
|
| 480 |
+
.profile-info-grid {
|
| 481 |
+
display: grid;
|
| 482 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 483 |
+
gap: 20px;
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
.profile-info-grid.two {
|
| 487 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
.profile-info-grid.three {
|
| 491 |
+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
.info-item {
|
| 495 |
+
display: flex;
|
| 496 |
+
flex-direction: column;
|
| 497 |
+
gap: 8px;
|
| 498 |
+
padding: 16px;
|
| 499 |
+
background: linear-gradient(135deg, #f5f7fb 0%, #f0f4fb 100%);
|
| 500 |
+
border: 1px solid #e2e8f0;
|
| 501 |
+
border-radius: 12px;
|
| 502 |
+
transition: all 0.3s var(--motion-base);
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
.info-item:hover {
|
| 506 |
+
background: linear-gradient(135deg, #eff6ff 0%, #e6f0ff 100%);
|
| 507 |
+
border-color: #1976d2;
|
| 508 |
+
transform: translateY(-2px);
|
| 509 |
+
box-shadow: 0 8px 16px rgba(25, 118, 210, 0.08);
|
| 510 |
+
}
|
| 511 |
+
|
| 512 |
+
.info-item.full-width {
|
| 513 |
+
grid-column: 1 / -1;
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
.info-label {
|
| 517 |
+
font-size: 12px;
|
| 518 |
+
font-weight: 700;
|
| 519 |
+
color: #1976d2;
|
| 520 |
+
text-transform: uppercase;
|
| 521 |
+
letter-spacing: 0.5px;
|
| 522 |
+
display: flex;
|
| 523 |
+
align-items: center;
|
| 524 |
+
gap: 6px;
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
.info-value {
|
| 528 |
+
font-size: 15px;
|
| 529 |
+
font-weight: 600;
|
| 530 |
+
color: var(--ui-text);
|
| 531 |
+
line-height: 1.4;
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
/* Face Recognition Section */
|
| 535 |
+
.face-recognition-section {
|
| 536 |
+
display: flex;
|
| 537 |
+
flex-direction: column;
|
| 538 |
+
gap: 16px;
|
| 539 |
+
align-items: flex-start;
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
.face-status {
|
| 543 |
+
display: flex;
|
| 544 |
+
gap: 16px;
|
| 545 |
+
align-items: flex-start;
|
| 546 |
+
padding: 20px;
|
| 547 |
+
background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(25, 118, 210, 0.02) 100%);
|
| 548 |
+
border: 1px solid rgba(25, 118, 210, 0.1);
|
| 549 |
+
border-radius: 12px;
|
| 550 |
+
width: 100%;
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
.status-icon {
|
| 554 |
+
display: flex;
|
| 555 |
+
align-items: center;
|
| 556 |
+
justify-content: center;
|
| 557 |
+
width: 56px;
|
| 558 |
+
height: 56px;
|
| 559 |
+
border-radius: 50%;
|
| 560 |
+
font-size: 24px;
|
| 561 |
+
flex-shrink: 0;
|
| 562 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
.status-icon.success {
|
| 566 |
+
background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
|
| 567 |
+
color: white;
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
.status-icon.warning {
|
| 571 |
+
background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
|
| 572 |
+
color: white;
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
.status-text {
|
| 576 |
+
display: flex;
|
| 577 |
+
flex-direction: column;
|
| 578 |
+
gap: 4px;
|
| 579 |
+
flex: 1;
|
| 580 |
+
}
|
| 581 |
+
|
| 582 |
+
.status-text h4 {
|
| 583 |
+
font-size: 15px;
|
| 584 |
+
font-weight: 700;
|
| 585 |
+
margin: 0;
|
| 586 |
+
color: var(--ui-text);
|
| 587 |
+
}
|
| 588 |
+
|
| 589 |
+
.status-text p {
|
| 590 |
+
font-size: 13px;
|
| 591 |
+
color: var(--ui-text-muted);
|
| 592 |
+
margin: 0;
|
| 593 |
+
line-height: 1.4;
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
/* Account Actions */
|
| 597 |
+
.account-actions {
|
| 598 |
+
display: flex;
|
| 599 |
+
flex-direction: column;
|
| 600 |
+
gap: 12px;
|
| 601 |
+
}
|
| 602 |
+
|
| 603 |
+
.action-link {
|
| 604 |
+
display: flex;
|
| 605 |
+
align-items: center;
|
| 606 |
+
gap: 16px;
|
| 607 |
+
padding: 16px;
|
| 608 |
+
background: linear-gradient(135deg, #f5f7fb 0%, #f0f4fb 100%);
|
| 609 |
+
border: 1px solid #e2e8f0;
|
| 610 |
+
border-radius: 12px;
|
| 611 |
+
text-decoration: none;
|
| 612 |
+
color: var(--ui-text);
|
| 613 |
+
transition: all 0.3s var(--motion-base);
|
| 614 |
+
cursor: pointer;
|
| 615 |
+
}
|
| 616 |
+
|
| 617 |
+
.action-link:hover {
|
| 618 |
+
background: linear-gradient(135deg, #eff6ff 0%, #e6f0ff 100%);
|
| 619 |
+
border-color: #1976d2;
|
| 620 |
+
transform: translateX(4px);
|
| 621 |
+
box-shadow: 0 8px 16px rgba(25, 118, 210, 0.08);
|
| 622 |
+
}
|
| 623 |
+
|
| 624 |
+
.action-icon {
|
| 625 |
+
font-size: 24px;
|
| 626 |
+
flex-shrink: 0;
|
| 627 |
+
}
|
| 628 |
+
|
| 629 |
+
.action-text {
|
| 630 |
+
flex: 1;
|
| 631 |
+
display: flex;
|
| 632 |
+
flex-direction: column;
|
| 633 |
+
gap: 2px;
|
| 634 |
+
}
|
| 635 |
+
|
| 636 |
+
.action-text h4 {
|
| 637 |
+
font-size: 14px;
|
| 638 |
+
font-weight: 700;
|
| 639 |
+
margin: 0;
|
| 640 |
+
}
|
| 641 |
+
|
| 642 |
+
.action-text p {
|
| 643 |
+
font-size: 12px;
|
| 644 |
+
color: var(--ui-text-muted);
|
| 645 |
+
margin: 0;
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
.action-arrow {
|
| 649 |
+
font-size: 18px;
|
| 650 |
+
color: #1976d2;
|
| 651 |
+
flex-shrink: 0;
|
| 652 |
+
opacity: 0.6;
|
| 653 |
+
transition: all 0.3s var(--motion-base);
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
.action-link:hover .action-arrow {
|
| 657 |
+
opacity: 1;
|
| 658 |
+
transform: translateX(4px);
|
| 659 |
+
}
|
| 660 |
+
|
| 661 |
+
/* ============================================
|
| 662 |
+
BUTTON STYLES
|
| 663 |
+
============================================ */
|
| 664 |
+
|
| 665 |
+
.btn-primary,
|
| 666 |
+
.btn-secondary {
|
| 667 |
+
display: inline-flex;
|
| 668 |
+
align-items: center;
|
| 669 |
+
gap: 8px;
|
| 670 |
+
padding: 10px 20px;
|
| 671 |
+
border-radius: 10px;
|
| 672 |
+
border: none;
|
| 673 |
+
font-size: 14px;
|
| 674 |
+
font-weight: 600;
|
| 675 |
+
cursor: pointer;
|
| 676 |
+
transition: all 0.3s var(--motion-base);
|
| 677 |
+
text-decoration: none;
|
| 678 |
+
}
|
| 679 |
+
|
| 680 |
+
.btn-primary {
|
| 681 |
+
background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
|
| 682 |
+
color: white;
|
| 683 |
+
box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
|
| 684 |
+
}
|
| 685 |
+
|
| 686 |
+
.btn-primary:hover {
|
| 687 |
+
transform: translateY(-2px);
|
| 688 |
+
box-shadow: 0 8px 20px rgba(25, 118, 210, 0.4);
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
.btn-secondary {
|
| 692 |
+
background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
|
| 693 |
+
color: var(--ui-text);
|
| 694 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
.btn-secondary:hover {
|
| 698 |
+
background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
|
| 699 |
+
transform: translateY(-2px);
|
| 700 |
+
}
|
| 701 |
+
|
| 702 |
+
.view-all-link {
|
| 703 |
+
color: #1976d2;
|
| 704 |
+
font-size: 13px;
|
| 705 |
+
font-weight: 600;
|
| 706 |
+
text-decoration: none;
|
| 707 |
+
transition: all 0.2s var(--motion-base);
|
| 708 |
+
padding: 4px 8px;
|
| 709 |
+
border-radius: 6px;
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
.view-all-link:hover {
|
| 713 |
+
background: rgba(25, 118, 210, 0.1);
|
| 714 |
+
transform: translateX(2px);
|
| 715 |
+
}
|
| 716 |
+
|
| 717 |
+
/* ============================================
|
| 718 |
+
RESPONSIVE BREAKPOINTS
|
| 719 |
+
============================================ */
|
| 720 |
+
|
| 721 |
+
@media (max-width: 1024px) {
|
| 722 |
+
.student-dashboard-grid {
|
| 723 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| 724 |
+
gap: 20px;
|
| 725 |
+
}
|
| 726 |
+
|
| 727 |
+
.profile-header-content {
|
| 728 |
+
flex-direction: column;
|
| 729 |
+
align-items: center;
|
| 730 |
+
text-align: center;
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
.profile-info-grid {
|
| 734 |
+
grid-template-columns: repeat(2, 1fr);
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
.profile-info-grid.two {
|
| 738 |
+
grid-template-columns: 1fr;
|
| 739 |
+
}
|
| 740 |
+
}
|
| 741 |
+
|
| 742 |
+
@media (max-width: 768px) {
|
| 743 |
+
.student-dashboard-grid {
|
| 744 |
+
grid-template-columns: 1fr;
|
| 745 |
+
gap: 16px;
|
| 746 |
+
padding: 16px 0;
|
| 747 |
+
}
|
| 748 |
+
|
| 749 |
+
.student-card {
|
| 750 |
+
grid-column: span 1 !important;
|
| 751 |
+
}
|
| 752 |
+
|
| 753 |
+
.profile-info-grid {
|
| 754 |
+
grid-template-columns: 1fr;
|
| 755 |
+
}
|
| 756 |
+
|
| 757 |
+
.attendance-summary-widget {
|
| 758 |
+
grid-template-columns: 1fr;
|
| 759 |
+
}
|
| 760 |
+
|
| 761 |
+
.quick-actions {
|
| 762 |
+
grid-template-columns: repeat(2, 1fr);
|
| 763 |
+
}
|
| 764 |
+
|
| 765 |
+
.profile-header-content {
|
| 766 |
+
gap: 16px;
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
.profile-avatar-large {
|
| 770 |
+
width: 100px;
|
| 771 |
+
height: 100px;
|
| 772 |
+
font-size: 40px;
|
| 773 |
+
}
|
| 774 |
+
|
| 775 |
+
.profile-header-info h2 {
|
| 776 |
+
font-size: 24px;
|
| 777 |
+
}
|
| 778 |
+
}
|
| 779 |
+
|
| 780 |
+
@media (max-width: 560px) {
|
| 781 |
+
.quick-actions {
|
| 782 |
+
grid-template-columns: 1fr;
|
| 783 |
+
}
|
| 784 |
+
|
| 785 |
+
.timeline-item.modern {
|
| 786 |
+
padding-left: 10px;
|
| 787 |
+
}
|
| 788 |
+
|
| 789 |
+
.face-status {
|
| 790 |
+
flex-direction: column;
|
| 791 |
+
align-items: center;
|
| 792 |
+
text-align: center;
|
| 793 |
+
}
|
| 794 |
+
|
| 795 |
+
.profile-info-grid.three {
|
| 796 |
+
grid-template-columns: 1fr;
|
| 797 |
+
}
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
/* ============================================
|
| 801 |
+
TIMETABLE STYLING
|
| 802 |
+
============================================ */
|
| 803 |
+
|
| 804 |
+
.timetable-wrap {
|
| 805 |
+
overflow-x: auto;
|
| 806 |
+
-webkit-overflow-scrolling: touch;
|
| 807 |
+
scrollbar-width: thin;
|
| 808 |
+
border-radius: 8px;
|
| 809 |
+
background: transparent;
|
| 810 |
+
padding: 0;
|
| 811 |
+
margin: 0;
|
| 812 |
+
}
|
| 813 |
+
|
| 814 |
+
.timetable-wrap::-webkit-scrollbar {
|
| 815 |
+
height: 6px;
|
| 816 |
+
}
|
| 817 |
+
|
| 818 |
+
.timetable-wrap::-webkit-scrollbar-track {
|
| 819 |
+
background: rgba(148, 163, 184, 0.2);
|
| 820 |
+
border-radius: 999px;
|
| 821 |
+
}
|
| 822 |
+
|
| 823 |
+
.timetable-wrap::-webkit-scrollbar-thumb {
|
| 824 |
+
background: rgba(25, 118, 210, 0.55);
|
| 825 |
+
border-radius: 999px;
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
+
.modern-timetable {
|
| 829 |
+
width: 100%;
|
| 830 |
+
min-width: 860px;
|
| 831 |
+
max-width: 100%;
|
| 832 |
+
border-collapse: collapse;
|
| 833 |
+
table-layout: auto;
|
| 834 |
+
background: white;
|
| 835 |
+
border-radius: 8px;
|
| 836 |
+
overflow: hidden;
|
| 837 |
+
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
.modern-timetable thead {
|
| 841 |
+
background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
|
| 842 |
+
color: white;
|
| 843 |
+
}
|
| 844 |
+
|
| 845 |
+
.modern-timetable th {
|
| 846 |
+
padding: 14px 12px;
|
| 847 |
+
text-align: center;
|
| 848 |
+
font-size: 13px;
|
| 849 |
+
font-weight: 600;
|
| 850 |
+
white-space: nowrap;
|
| 851 |
+
line-height: 1.2;
|
| 852 |
+
text-transform: uppercase;
|
| 853 |
+
letter-spacing: 0.5px;
|
| 854 |
+
border-right: 1px solid rgba(255, 255, 255, 0.1);
|
| 855 |
+
}
|
| 856 |
+
|
| 857 |
+
.modern-timetable th:last-child {
|
| 858 |
+
border-right: none;
|
| 859 |
+
}
|
| 860 |
+
|
| 861 |
+
.modern-timetable td {
|
| 862 |
+
padding: 12px;
|
| 863 |
+
text-align: center;
|
| 864 |
+
font-size: 13px;
|
| 865 |
+
white-space: normal;
|
| 866 |
+
word-break: break-word;
|
| 867 |
+
line-height: 1.2;
|
| 868 |
+
border: 1px solid #e2e8f0;
|
| 869 |
+
background: white;
|
| 870 |
+
transition: all 0.2s;
|
| 871 |
+
}
|
| 872 |
+
|
| 873 |
+
.modern-timetable th:first-child,
|
| 874 |
+
.modern-timetable td.day-cell {
|
| 875 |
+
position: sticky;
|
| 876 |
+
left: 0;
|
| 877 |
+
z-index: 2;
|
| 878 |
+
}
|
| 879 |
+
|
| 880 |
+
.modern-timetable td.day-cell {
|
| 881 |
+
background: linear-gradient(135deg, #eff6ff 0%, #e6f0ff 100%);
|
| 882 |
+
font-weight: 600;
|
| 883 |
+
color: #1976d2;
|
| 884 |
+
border-right: 2px solid #1976d2;
|
| 885 |
+
}
|
| 886 |
+
|
| 887 |
+
.modern-timetable td.break-cell {
|
| 888 |
+
background: linear-gradient(135deg, #f0fdf4 0%, #f0fdf4 100%);
|
| 889 |
+
color: #16a34a;
|
| 890 |
+
font-style: italic;
|
| 891 |
+
font-weight: 500;
|
| 892 |
+
}
|
| 893 |
+
|
| 894 |
+
.modern-timetable td.class-cell {
|
| 895 |
+
background: white;
|
| 896 |
+
color: var(--ui-text);
|
| 897 |
+
font-weight: 500;
|
| 898 |
+
}
|
| 899 |
+
|
| 900 |
+
.modern-timetable tbody tr:hover td {
|
| 901 |
+
background: linear-gradient(135deg, #f5f7fb 0%, #f0f4fb 100%);
|
| 902 |
+
}
|
| 903 |
+
|
| 904 |
+
.modern-timetable tbody tr:hover td.day-cell {
|
| 905 |
+
background: linear-gradient(135deg, #e6f0ff 0%, #dce9ff 100%);
|
| 906 |
+
}
|
| 907 |
+
|
| 908 |
+
/* Dark Mode - Timetable */
|
| 909 |
+
body.dark .modern-timetable {
|
| 910 |
+
background: var(--ui-card);
|
| 911 |
+
}
|
| 912 |
+
|
| 913 |
+
body.dark .modern-timetable td {
|
| 914 |
+
background: var(--ui-card);
|
| 915 |
+
border-color: var(--ui-border);
|
| 916 |
+
color: var(--ui-text);
|
| 917 |
+
}
|
| 918 |
+
|
| 919 |
+
body.dark .modern-timetable td.day-cell {
|
| 920 |
+
background: rgba(25, 118, 210, 0.1);
|
| 921 |
+
color: #60a5fa;
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
@media (max-width: 768px) {
|
| 925 |
+
.modern-timetable {
|
| 926 |
+
min-width: 680px;
|
| 927 |
+
}
|
| 928 |
+
|
| 929 |
+
.modern-timetable th,
|
| 930 |
+
.modern-timetable td {
|
| 931 |
+
padding: 9px 7px;
|
| 932 |
+
font-size: 11px;
|
| 933 |
+
}
|
| 934 |
+
|
| 935 |
+
.modern-timetable td.day-cell {
|
| 936 |
+
min-width: 88px;
|
| 937 |
+
font-size: 11px;
|
| 938 |
+
}
|
| 939 |
+
|
| 940 |
+
.timetable-wrap {
|
| 941 |
+
border-bottom: 1px solid rgba(148, 163, 184, 0.28);
|
| 942 |
+
padding-bottom: 4px;
|
| 943 |
+
}
|
| 944 |
+
}
|
| 945 |
+
|
| 946 |
+
.timetable-mobile-hint {
|
| 947 |
+
display: none;
|
| 948 |
+
margin: 0 0 8px;
|
| 949 |
+
font-size: 11px;
|
| 950 |
+
color: var(--ui-text-muted);
|
| 951 |
+
}
|
| 952 |
+
|
| 953 |
+
@media (max-width: 768px) {
|
| 954 |
+
.timetable-mobile-hint {
|
| 955 |
+
display: block;
|
| 956 |
+
}
|
| 957 |
+
}
|
| 958 |
+
|
| 959 |
+
.dashboard-data-note {
|
| 960 |
+
margin: 8px 0 0;
|
| 961 |
+
color: var(--ui-text-muted);
|
| 962 |
+
font-size: 12px;
|
| 963 |
+
}
|
| 964 |
+
|
| 965 |
+
body.dark .modern-timetable td.break-cell {
|
| 966 |
+
background: rgba(16, 185, 129, 0.1);
|
| 967 |
+
color: #34d399;
|
| 968 |
+
}
|
| 969 |
+
|
| 970 |
+
body.dark .timetable-wrap::-webkit-scrollbar-track {
|
| 971 |
+
background: rgba(100, 116, 139, 0.35);
|
| 972 |
+
}
|
| 973 |
+
|
| 974 |
+
body.dark .timetable-wrap::-webkit-scrollbar-thumb {
|
| 975 |
+
background: rgba(96, 165, 250, 0.7);
|
| 976 |
+
}
|
| 977 |
+
|
| 978 |
+
body.dark .modern-timetable tbody tr:hover td {
|
| 979 |
+
background: rgba(100, 116, 139, 0.15);
|
| 980 |
+
}
|
| 981 |
+
|
| 982 |
+
/* ============================================
|
| 983 |
+
DARK MODE SUPPORT
|
| 984 |
+
============================================ */
|
| 985 |
+
|
| 986 |
+
body.dark .student-card,
|
| 987 |
+
body.dark .student-profile-card {
|
| 988 |
+
background: var(--ui-card);
|
| 989 |
+
border-color: var(--ui-border);
|
| 990 |
+
}
|
| 991 |
+
|
| 992 |
+
body.dark .action-button,
|
| 993 |
+
body.dark .info-item,
|
| 994 |
+
body.dark .action-link {
|
| 995 |
+
background: var(--ui-card-muted);
|
| 996 |
+
border-color: var(--ui-border);
|
| 997 |
+
}
|
| 998 |
+
|
| 999 |
+
body.dark .action-button:hover,
|
| 1000 |
+
body.dark .info-item:hover,
|
| 1001 |
+
body.dark .action-link:hover {
|
| 1002 |
+
background: rgba(25, 118, 210, 0.08);
|
| 1003 |
+
border-color: rgba(25, 118, 210, 0.3);
|
| 1004 |
+
}
|
| 1005 |
+
|
| 1006 |
+
body.dark .summary-stat {
|
| 1007 |
+
background: rgba(25, 118, 210, 0.08);
|
| 1008 |
+
border-color: rgba(25, 118, 210, 0.2);
|
| 1009 |
+
}
|
| 1010 |
+
|
| 1011 |
+
body.dark .face-status {
|
| 1012 |
+
background: rgba(25, 118, 210, 0.08);
|
| 1013 |
+
border-color: rgba(25, 118, 210, 0.2);
|
| 1014 |
+
}
|
| 1015 |
+
|
| 1016 |
+
body.dark .timeline-item.modern {
|
| 1017 |
+
background: rgba(25, 118, 210, 0.08);
|
| 1018 |
+
}
|
frontend/src/utils/constants.js
CHANGED
|
@@ -60,12 +60,10 @@ export const facultyNav = [
|
|
| 60 |
];
|
| 61 |
|
| 62 |
export const studentNav = [
|
| 63 |
-
{ label: "
|
| 64 |
{ label: "Attendance", to: "/student/attendance", icon: "chart" },
|
| 65 |
{ label: "Profile", to: "/student/profile", icon: "user" },
|
| 66 |
{ label: "Change Password", to: "/student/change-password", icon: "key" },
|
| 67 |
-
{ label: "Register Face", to: "/student/register-face", icon: "camera" },
|
| 68 |
-
{ label: "Dashboard", to: "/student/dashboard", icon: "home" },
|
| 69 |
];
|
| 70 |
|
| 71 |
export const iconMap = {
|
|
|
|
| 60 |
];
|
| 61 |
|
| 62 |
export const studentNav = [
|
| 63 |
+
{ label: "Dashboard", to: "/student/dashboard", icon: "home" },
|
| 64 |
{ label: "Attendance", to: "/student/attendance", icon: "chart" },
|
| 65 |
{ label: "Profile", to: "/student/profile", icon: "user" },
|
| 66 |
{ label: "Change Password", to: "/student/change-password", icon: "key" },
|
|
|
|
|
|
|
| 67 |
];
|
| 68 |
|
| 69 |
export const iconMap = {
|
frontend/vite.config.js
CHANGED
|
@@ -31,10 +31,6 @@ export default defineConfig(({ mode }) => {
|
|
| 31 |
target: backendTarget,
|
| 32 |
changeOrigin: true,
|
| 33 |
},
|
| 34 |
-
"/faculty": {
|
| 35 |
-
target: backendTarget,
|
| 36 |
-
changeOrigin: true,
|
| 37 |
-
},
|
| 38 |
"/register_student_face": {
|
| 39 |
target: backendTarget,
|
| 40 |
changeOrigin: true,
|
|
|
|
| 31 |
target: backendTarget,
|
| 32 |
changeOrigin: true,
|
| 33 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
"/register_student_face": {
|
| 35 |
target: backendTarget,
|
| 36 |
changeOrigin: true,
|