fix: 4 critical bugs — worker argv, student dashboard visibility, teacher onboarding flow, password validation

This commit is contained in:
Hamza-Ayed
2026-08-28 23:08:15 +03:00
parent abe862f04d
commit 1401db11d0
3 changed files with 41 additions and 39 deletions
+2 -8
View File
@@ -637,7 +637,7 @@ class StudentPortal
</div>
<!-- 2. STUDENT DASHBOARD (100% REAL DATABASE DATA) -->
<div id="dashboard_container" style="width: 100%;">
<div id="dashboard_container" style="width: 100%; display: none;">
<!-- Hero & Tawjihi Readiness Score -->
<div class="dashboard-hero">
@@ -1119,15 +1119,9 @@ class StudentPortal
document.addEventListener('DOMContentLoaded', async () => {
const token = localStorage.getItem('saqel_student_jwt');
const cachedUser = localStorage.getItem('saqel_student_user');
if (token) {
if (cachedUser) {
try {
const u = JSON.parse(cachedUser);
renderDashboard(u);
} catch (e) {}
}
// Always verify session with server — don't render from cache directly
initWebSocket(token);
await checkStudentSession(token);
}