fix: 4 critical bugs — worker argv, student dashboard visibility, teacher onboarding flow, password validation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user