9/24/1-backLocation

This commit is contained in:
Hamza-Ayed
2024-09-24 13:32:36 +03:00
parent 3313cb0203
commit f5b7307f86
27 changed files with 880 additions and 343 deletions

View File

@@ -240,6 +240,18 @@ class HomeCaptainController extends GetxController {
'token': box.read(BoxName.tokenDriver),
'captain_id': box.read(BoxName.driverID).toString()
});
CRUD().post(
link: "${AppLink.seferAlexandriaServer}/ride/firebase/addDriver.php",
payload: {
'token': box.read(BoxName.tokenDriver),
'captain_id': box.read(BoxName.driverID).toString()
});
CRUD().post(
link: "${AppLink.seferGizaServer}/ride/firebase/addDriver.php",
payload: {
'token': box.read(BoxName.tokenDriver),
'captain_id': box.read(BoxName.driverID).toString()
});
MapDriverController().driverCallPassenger();
// box.write(BoxName.statusDriverLocation, 'off');
}

View File

@@ -184,6 +184,20 @@ class OrderRequestController extends GetxController {
'status': 'Refused',
'driver_id': box.read(BoxName.driverID),
});
CRUD().post(
link: '${AppLink.seferAlexandriaServer}/rides/update.php',
payload: {
'id': orderID,
// 'rideTimeStart': DateTime.now().toString(),
'status': 'Refused',
'driver_id': box.read(BoxName.driverID),
});
CRUD().post(link: '${AppLink.seferGizaServer}/rides/update.php', payload: {
'id': orderID,
// 'rideTimeStart': DateTime.now().toString(),
'status': 'Refused',
'driver_id': box.read(BoxName.driverID),
});
// applied = true;
// if (box.read(BoxName.gender).toString() != 'Female') {
@@ -229,5 +243,41 @@ class OrderRequestController extends GetxController {
'distance': distance,
'duration': duration,
});
CRUD().post(
link:
'${AppLink.seferAlexandriaServer}/notificationCaptain/addWaitingRide.php',
payload: {
'id': orderID,
'start_location': startLocation,
'end_location': endLocation,
'date': date,
'time': time,
'price': price,
'passenger_id': passengerId,
'status': status,
'carType': carType,
'passengerRate': passengerRate,
'price_for_passenger': priceForPassenger,
'distance': distance,
'duration': duration,
});
CRUD().post(
link:
'${AppLink.seferGizaServer}/notificationCaptain/addWaitingRide.php',
payload: {
'id': orderID,
'start_location': startLocation,
'end_location': endLocation,
'date': date,
'time': time,
'price': price,
'passenger_id': passengerId,
'status': status,
'carType': carType,
'passengerRate': passengerRate,
'price_for_passenger': priceForPassenger,
'distance': distance,
'duration': duration,
});
}
}