Update Saqel Platform: 2026-08-28 18:21:58
This commit is contained in:
@@ -1219,13 +1219,19 @@ class TeacherPortal
|
||||
const user = data.data.user;
|
||||
const profile = data.data.profile || {};
|
||||
localStorage.setItem('saqel_teacher_jwt', token);
|
||||
if (user) {
|
||||
localStorage.setItem('saqel_teacher_user', JSON.stringify({ ...user, ...profile }));
|
||||
}
|
||||
document.cookie = "saqel_teacher_jwt=" + token + "; path=/; max-age=2592000; SameSite=Lax";
|
||||
initWebSocket(token);
|
||||
renderDashboard(user, profile);
|
||||
await checkTeacherSession(token);
|
||||
|
||||
const isNewTeacher = user?.is_new || user?.full_name === 'معلم جديد' || user?.name === 'معلم جديد' || user?.name === 'الأستاذ المعتمد';
|
||||
if (isNewTeacher) {
|
||||
switchToOnboardingStep();
|
||||
} else {
|
||||
if (user) {
|
||||
localStorage.setItem('saqel_teacher_user', JSON.stringify({ ...user, ...profile }));
|
||||
}
|
||||
renderDashboard(user, profile);
|
||||
await checkTeacherSession(token);
|
||||
}
|
||||
} else {
|
||||
showError(data.message || 'رمز التحقق غير صحيح');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user