إصلاح أخطاء شاشة الكباتن من تحديث الذكاء الاصطناعي

This commit is contained in:
Hamza-Ayed
2026-07-26 13:15:45 +03:00
parent 4b5235c35c
commit 330dfc6dba
9 changed files with 1025 additions and 61 deletions
@@ -40,15 +40,14 @@ class RideAdminController extends GetxController {
}
Future getRidesDetails() async {
// isLoading = true;
// update();
isLoading = true;
update();
var res = await CRUD().get(link: AppLink.getRidesDetails, payload: {});
var d = jsonDecode(res);
ridesDetails = d['message'];
// isLoading = false;
// update();
isLoading = false;
update();
}
@override
@@ -176,19 +176,21 @@ class WalletAdminController extends GetxController {
return token;
}
Future getWalletForEachDriverToPay() async {
Future getWalletForEachDriverToPay() async {
isLoading = true;
update();
var res = await CRUD()
.postWallet(link: AppLink.getVisaForEachDriver, payload: {});
var d = (res);
if (d != 'failure') {
driversWalletPoints = d['message'];
driversWalletPoints = d['message'] ?? [];
isLoading = false;
update();
} else {
driversWalletPoints = [];
isLoading = false;
update();
}
driversWalletPoints = [];
isLoading = false;
update();
}
}
}
@@ -5,22 +5,29 @@ import '../../views/widgets/snackbar.dart';
import '../functions/crud.dart';
class DriverController extends GetxController {
bool isLoading = false;
List drivers = [];
Map driverDetails = {};
// جلب السائقين pending
getDriversPending() async {
isLoading = true;
update();
var res = await CRUD().post(
link: AppLink.getDriversPending, // رابط drivers_pending_list.php
link: AppLink.getDriversPending,
payload: {},
);
if (res != 'failure') {
drivers = (res)['message'];
update(['drivers']); // تحديث الـ UI
isLoading = false;
update(['drivers']);
} else {
mySnackbarError('Failed to load drivers');
isLoading = false;
update();
}
}
}
// جلب تفاصيل سائق واحد
getDriverDetails(String driverId) async {