diff --git a/backend/app/Controllers/TeacherController.php b/backend/app/Controllers/TeacherController.php index a913b8b..450402c 100644 --- a/backend/app/Controllers/TeacherController.php +++ b/backend/app/Controllers/TeacherController.php @@ -32,7 +32,7 @@ class TeacherController $decryptedName = 'معلم جديد'; } - $isComplete = !empty($profile) && !empty($profile['specialization']) && $decryptedName !== 'معلم جديد'; + $isComplete = !empty($profile) && !empty($profile['specialization']); $response->json([ 'status' => 'success', diff --git a/backend/app/Views/TeacherPortal.php b/backend/app/Views/TeacherPortal.php index 4b6bb72..cb25b87 100644 --- a/backend/app/Views/TeacherPortal.php +++ b/backend/app/Views/TeacherPortal.php @@ -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 || 'فشل حفظ الملف الشخصي.'); }