7/31/1
This commit is contained in:
@@ -229,7 +229,7 @@ class HomeCaptainController extends GetxController {
|
||||
getAllPayment();
|
||||
startPeriodicExecution();
|
||||
onMapCreated(mapHomeCaptainController!);
|
||||
totalPoints = Get.find<CaptainWalletController>().totalPoints;
|
||||
totalPoints = Get.find<CaptainWalletController>().totalPoints.toString();
|
||||
getRefusedOrderByCaptain();
|
||||
// LocationController().getLocation();
|
||||
super.onInit();
|
||||
|
||||
@@ -26,8 +26,10 @@ class MapDriverController extends GetxController {
|
||||
bool isLoading = true;
|
||||
final formKey1 = GlobalKey<FormState>();
|
||||
final formKey2 = GlobalKey<FormState>();
|
||||
final formKeyCancel = GlobalKey<FormState>();
|
||||
final messageToPassenger = TextEditingController();
|
||||
final sosEmergincyNumberCotroller = TextEditingController();
|
||||
final cancelTripCotroller = TextEditingController();
|
||||
List data = [];
|
||||
List dataDestination = [];
|
||||
LatLngBounds? boundsData;
|
||||
@@ -165,6 +167,30 @@ class MapDriverController extends GetxController {
|
||||
update();
|
||||
}
|
||||
|
||||
cancelTripFromDriverAfterApplied() async {
|
||||
if (formKeyCancel.currentState!.validate()) {
|
||||
await CRUD().post(link: AppLink.updateRides, payload: {
|
||||
"id": rideId.toString(), // Convert to String
|
||||
"status": 'CancelFromDriverAfterApply'
|
||||
});
|
||||
await CRUD().post(link: AppLink.addCancelRideFromPassenger, payload: {
|
||||
"rideID": rideId.toString(),
|
||||
"driverID": box.read(BoxName.driverID).toString(),
|
||||
"passengerID": passengerId.toString(),
|
||||
"note": cancelTripCotroller.text.toString()
|
||||
});
|
||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||
"Cancel Trip from driver".tr,
|
||||
"Trip Cancelled from driver. We are looking for a new driver. Please wait."
|
||||
.tr,
|
||||
tokenPassenger,
|
||||
[],
|
||||
'cancel.wav',
|
||||
);
|
||||
Get.offAll(HomeCaptain());
|
||||
}
|
||||
}
|
||||
|
||||
void startTimerToShowPassengerInfoWindowFromDriver() async {
|
||||
if (box.read(BoxName.rideStatus) == 'Begin') {
|
||||
isPassengerInfoWindow = false;
|
||||
|
||||
@@ -33,6 +33,12 @@ class OrderRequestController extends GetxController {
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
getRideDEtailsForBackgroundOrder() async {
|
||||
await CRUD().get(link: AppLink.getRidesDetails, payload: {
|
||||
'id': box.read(BoxName.myList)[2].toString(),
|
||||
});
|
||||
}
|
||||
|
||||
void addCustomStartIcon() async {
|
||||
// Create the marker with the resized image
|
||||
|
||||
|
||||
Reference in New Issue
Block a user