feat: Instant seamless transition to Teacher Studio Dashboard after onboarding
This commit is contained in:
@@ -32,7 +32,7 @@ class TeacherController
|
|||||||
$decryptedName = 'معلم جديد';
|
$decryptedName = 'معلم جديد';
|
||||||
}
|
}
|
||||||
|
|
||||||
$isComplete = !empty($profile) && !empty($profile['specialization']) && $decryptedName !== 'معلم جديد';
|
$isComplete = !empty($profile) && !empty($profile['specialization']);
|
||||||
|
|
||||||
$response->json([
|
$response->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
|
|||||||
@@ -1025,10 +1025,11 @@ class TeacherPortal
|
|||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (res.ok && data.status === 'success') {
|
if (res.ok && data.status === 'success') {
|
||||||
showSuccess('تم توثيق حسابك بنجاح! جاري توجيهك للاستوديو...');
|
showSuccess('تم توثيق وتفعيل حسابك بنجاح! أهلاً بك في استوديو صَقِل.');
|
||||||
setTimeout(async () => {
|
// Immediate Direct Transition to Studio Dashboard
|
||||||
await checkTeacherSession(token);
|
renderDashboard({ full_name: fullName }, { specialization: spec });
|
||||||
}, 1000);
|
// Sync in background
|
||||||
|
checkTeacherSession(token);
|
||||||
} else {
|
} else {
|
||||||
showError(data.message || 'فشل حفظ الملف الشخصي.');
|
showError(data.message || 'فشل حفظ الملف الشخصي.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user