This commit is contained in:
Hamza-Ayed
2024-07-31 21:19:19 +03:00
parent dea83d970c
commit 2bc71355c3
106 changed files with 4600 additions and 727 deletions

View File

@@ -106,18 +106,18 @@ class CaptainWalletController extends GetxController {
update();
var res = await CRUD().get(
link: AppLink.getAllPaymentFromRide,
payload: {'driverID': box.read(BoxName.driverID)},
payload: {'driverID': box.read(BoxName.driverID).toString()},
);
// isLoading = false;
if (res != 'failure') {
walletDate = jsonDecode(res);
totalAmount = walletDate['message'][0]['total_amount'] ?? '0';
totalAmount = walletDate['message'][0]['total_amount'].toString();
update();
var res1 = await CRUD().get(
link: AppLink.getAllPaymentVisa,
payload: {'driverID': box.read(BoxName.driverID)});
payload: {'driverID': box.read(BoxName.driverID).toString()});
walletDateVisa = jsonDecode(res1);
totalAmountVisa = walletDateVisa['message'][0]['diff'] ?? '0';
totalAmountVisa = walletDateVisa['message'][0]['diff'].toString();
update();
} else {
@@ -132,12 +132,13 @@ class CaptainWalletController extends GetxController {
var res = await CRUD().get(
link: AppLink.getDriverPaymentPoints,
payload: {'driverID': box.read(BoxName.driverID)},
payload: {'driverID': box.read(BoxName.driverID).toString()},
);
isLoading = false;
// update();
walletDriverPointsDate = jsonDecode(res);
if (res != 'failure') {
walletDriverPointsDate = jsonDecode(res);
double totalPointsDouble = double.parse(
walletDriverPointsDate['message'][0]['total_amount'].toString());
totalPoints = totalPointsDouble.toStringAsFixed(0);
@@ -283,7 +284,7 @@ class CaptainWalletController extends GetxController {
);
if (res != 'failure') {
var json = jsonDecode(res);
kazan = double.parse(json['message'][0]['kazan']);
kazan = double.parse(json['message'][0]['kazan'].toString());
// naturePrice = double.parse(json['message'][0]['naturePrice']);
// heavyPrice = double.parse(json['message'][0]['heavyPrice']);
// latePrice = double.parse(json['message'][0]['latePrice']);