feat: Instant seamless transition to Teacher Studio Dashboard after onboarding

This commit is contained in:
Hamza-Ayed
2026-08-26 23:55:29 +03:00
parent fe66f05057
commit 1d78fe8cc1
2 changed files with 6 additions and 5 deletions
@@ -32,7 +32,7 @@ class TeacherController
$decryptedName = 'معلم جديد';
}
$isComplete = !empty($profile) && !empty($profile['specialization']) && $decryptedName !== 'معلم جديد';
$isComplete = !empty($profile) && !empty($profile['specialization']);
$response->json([
'status' => 'success',
+5 -4
View File
@@ -1025,10 +1025,11 @@ class TeacherPortal
});
const data = await res.json();
if (res.ok && data.status === 'success') {
showSuccess('تم توثيق حسابك بنجاح! جاري توجيهك للاستوديو...');
setTimeout(async () => {
await checkTeacherSession(token);
}, 1000);
showSuccess('تم توثيق وتفعيل حسابك بنجاح! أهلاً بك في استوديو صَقِل.');
// Immediate Direct Transition to Studio Dashboard
renderDashboard({ full_name: fullName }, { specialization: spec });
// Sync in background
checkTeacherSession(token);
} else {
showError(data.message || 'فشل حفظ الملف الشخصي.');
}