Update Saqel Platform: 2026-09-08 18:44:36
This commit is contained in:
@@ -77,21 +77,29 @@ class _TeacherAuthScreenState extends State<TeacherAuthScreen> {
|
||||
SaqelToast.showError(context, 'يرجى إدخال رمز التحقق المكون من 6 أرقام');
|
||||
return;
|
||||
}
|
||||
if (_fullNameController.text.trim().isEmpty ||
|
||||
_selectedSubject == null ||
|
||||
_schoolController.text.trim().isEmpty ||
|
||||
_selectedGrades.isEmpty) {
|
||||
final hasAnyProfileData = _fullNameController.text.trim().isNotEmpty ||
|
||||
_selectedSubject != null ||
|
||||
_schoolController.text.trim().isNotEmpty ||
|
||||
_selectedGrades.isNotEmpty;
|
||||
final hasCompleteProfileData = _fullNameController.text.trim().isNotEmpty &&
|
||||
_selectedSubject != null &&
|
||||
_schoolController.text.trim().isNotEmpty &&
|
||||
_selectedGrades.isNotEmpty;
|
||||
if (hasAnyProfileData && !hasCompleteProfileData) {
|
||||
SaqelToast.showError(context,
|
||||
'أكمل الاسم والمادة والمدرسة وصفًا واحدًا على الأقل قبل التحقق');
|
||||
'إما اترك بيانات الملف فارغة لتسجيل الدخول، أو أكملها كلها لإنشاء ملف معلم جديد');
|
||||
return;
|
||||
}
|
||||
context.read<TeacherAuthCubit>().verifyOtp(
|
||||
phone,
|
||||
otp,
|
||||
fullName: _fullNameController.text.trim(),
|
||||
specialization: _selectedSubject,
|
||||
schoolName: _schoolController.text.trim(),
|
||||
gradesTaught: _selectedGrades.toList(),
|
||||
fullName:
|
||||
hasCompleteProfileData ? _fullNameController.text.trim() : null,
|
||||
specialization: hasCompleteProfileData ? _selectedSubject : null,
|
||||
schoolName:
|
||||
hasCompleteProfileData ? _schoolController.text.trim() : null,
|
||||
gradesTaught:
|
||||
hasCompleteProfileData ? _selectedGrades.toList() : null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user