Update: 2026-06-25 02:28:33

This commit is contained in:
Hamza-Ayed
2026-06-25 02:28:33 +03:00
parent 1ff13f09ac
commit 98a8a2ae3d
43 changed files with 992 additions and 812 deletions

View File

@@ -31,7 +31,7 @@ class NotificationCaptainController extends GetxController {
Get.back();
}));
}
notificationData = jsonDecode(res);
notificationData = res;
// sql.insertData(notificationData['message'], TableName.captainNotification);
isLoading = false;

View File

@@ -26,11 +26,9 @@ class PassengerNotificationController extends GetxController {
Get.back();
});
} else {
final decoded = jsonDecode(res);
// التحقق من وجود البيانات في 'data' أو 'message'
var rawData = decoded['data'] ?? decoded['message'];
var rawData = res['data'] ?? res['message'];
if (decoded['status'] == 'error' || decoded['status'] == 'failure' || rawData == "No notification data found") {
if (res['status'] == 'error' || res['status'] == 'failure' || rawData == "No notification data found") {
notificationData = {'status': 'success', 'message': []}; // قائمة فارغة لمنع الخطأ في UI
} else {
// التأكد أننا نخزن قائمة

View File

@@ -14,7 +14,7 @@ class RideAvailableController extends GetxController {
isLoading = true;
var res = await CRUD().get(link: AppLink.getRideWaiting, payload: {});
if (res != 'failure') {
rideAvailableMap = jsonDecode(res);
rideAvailableMap = res;
isLoading = false;
update();
} else {