Update: 2026-06-26 17:29:23

This commit is contained in:
Hamza-Ayed
2026-06-26 17:29:23 +03:00
parent a323da29aa
commit 9ded734e38
139 changed files with 1815 additions and 2676 deletions

View File

@@ -37,12 +37,12 @@ class OtpHelper extends GetxController {
mySnackbarSuccess('تم إرسال رمز التحقق إلى رقمك عبر WhatsApp');
return true;
} else {
mySnackeBarError('حدث خطأ من الخادم. حاول مجددًا.');
mySnackbarError('حدث خطأ من الخادم. حاول مجددًا.');
return false;
}
} catch (e) {
Log.print('OTP SEND ERROR: $e');
mySnackeBarError('حدث خطأ أثناء الإرسال: $e');
mySnackbarError('حدث خطأ أثناء الإرسال: $e');
return false;
}
}
@@ -68,14 +68,14 @@ class OtpHelper extends GetxController {
mySnackbarSuccess('تم التحقق من الرقم بنجاح');
await checkAdminLogin();
} else {
mySnackeBarError(response['message'] ?? 'فشل في التحقق.');
mySnackbarError(response['message'] ?? 'فشل في التحقق.');
}
} else {
mySnackeBarError('فشل من الخادم. حاول مرة أخرى.');
mySnackbarError('فشل من الخادم. حاول مرة أخرى.');
}
} catch (e) {
Log.print('OTP VERIFY ERROR: $e');
mySnackeBarError('خطأ في التحقق: $e');
mySnackbarError('خطأ في التحقق: $e');
}
}
@@ -110,7 +110,7 @@ class OtpHelper extends GetxController {
}
} catch (e) {
Log.print('LOGIN ERROR: $e');
mySnackeBarError('حدث خطأ أثناء تسجيل الدخول: $e');
mySnackbarError('حدث خطأ أثناء تسجيل الدخول: $e');
return false;
}
}
@@ -141,7 +141,7 @@ class OtpHelper extends GetxController {
}
} catch (e) {
Log.print('OTP VERIFY LOGIN ERROR: $e');
mySnackeBarError('خطأ في التحقق من الرمز: $e');
mySnackbarError('خطأ في التحقق من الرمز: $e');
}
}
@@ -161,8 +161,9 @@ class OtpHelper extends GetxController {
await box.write('admin_role', role);
Log.print('Admin role saved: $role');
}
if (data['phone'] != null)
if (data['phone'] != null) {
await box.write(BoxName.adminPhone, data['phone']);
}
}
await box.write(BoxName.phoneVerified, true);
@@ -197,7 +198,7 @@ class OtpHelper extends GetxController {
Get.back();
verifyLoginOtp(phone, otpCode, password, fingerprint);
} else {
mySnackeBarError('الرجاء إدخال رمز صحيح');
mySnackbarError('الرجاء إدخال رمز صحيح');
}
},
);