This commit is contained in:
Hamza-Ayed
2024-07-01 12:06:34 +03:00
parent d423cc0831
commit 475ba12cde
11 changed files with 444 additions and 58 deletions

View File

@@ -17,6 +17,7 @@ import 'package:SEFER/views/auth/captin/verify_email_captain.dart';
import 'package:SEFER/views/home/Captin/home_captain/home_captin.dart';
import 'package:location/location.dart';
import '../../../views/auth/captin/cards/egypt_card_a_i.dart';
import '../../firebase/firbase_messge.dart';
class LoginDriverController extends GetxController {
@@ -58,7 +59,12 @@ class LoginDriverController extends GetxController {
});
if (res == 'Failure') {
//Failure
Get.offAll(() => SmsSignupEgypt());
if (box.read(BoxName.phoneVerified) == '1') {
Get.offAll(() => EgyptCardAI());
} else {
Get.offAll(() => SmsSignupEgypt());
}
isloading = false;
update();
// Get.snackbar('Failure', '', backgroundColor: Colors.red);

View File

@@ -223,7 +223,7 @@ class CRUD {
);
print(response.request);
print(response.body);
print(response.statusCode);
// print(response.statusCode);
var jsonData = jsonDecode(response.body);
if (response.statusCode == 200) {
if (jsonData['status'] == 'success') {

View File

@@ -511,7 +511,7 @@ class AI extends GetxController {
},
body: requestBody,
);
print(response.body);
if (response.statusCode == 200) {
var responseData = jsonDecode(utf8.decode(response.bodyBytes));
// Process the responseData as needed

View File

@@ -113,7 +113,7 @@ class CaptainWalletController extends GetxController {
if (res != 'failure') {
walletDate = jsonDecode(res);
totalAmount = walletDate['message'][0]['total_amount'] ?? '0';
update();
var res1 = await CRUD().get(
link: AppLink.getAllPaymentVisa,
payload: {'driverID': box.read(BoxName.driverID)});
@@ -269,9 +269,7 @@ class CaptainWalletController extends GetxController {
await Get.find<HomeCaptainController>().getKazanPercent();
kazan = Get.find<HomeCaptainController>().kazan;
getCaptainWalletFromRide();
getCaptainWalletFromBuyPoints();
// checkAccountCaptainBank();
await refreshCaptainWallet();
super.onInit();
}
}

View File

@@ -4,6 +4,14 @@ class MyTranslation extends Translations {
@override
Map<String, Map<String, String>> get keys => {
"ar": {
"Morning Promo": "عرض الصباح",
"this is count of your all trips in the morning promo today from 7:00am-10:00am":
"هذا عدد جميع رحلاتك في عرض الصباح اليوم من الساعة 7:00 صباحًا حتى 10:00 صباحًا",
"Morning Promo Rides": "رحلات عرض الصباح",
"Afternoon Promo": "عرض بعد الظهر",
"this is count of your all trips in the Afternoon promo today from 3:00pm-6:00 pm":
"هذا عدد جميع رحلاتك في عرض بعد الظهر اليوم من الساعة 3:00 مساءً حتى 6:00 مساءً",
"Afternoon Promo Rides": "رحلات عرض بعد الظهر",
"Heading your way now. Please be ready.":
"في طريقي إليك الآن. يرجى الاستعداد.",
"Approaching your area. Should be there in 3 minutes.":