Fixes & Updates - 2026-06-01: Integrate Back-End v3 updates, fix call/connection issues across apps

This commit is contained in:
Hamza-Ayed
2026-06-01 23:36:27 +03:00
parent 118781fd66
commit 97945aa362
76 changed files with 19806 additions and 10822 deletions

View File

@@ -4,7 +4,7 @@ import 'package:Intaleq/constant/box_name.dart';
import 'package:Intaleq/constant/links.dart';
import 'package:Intaleq/constant/style.dart';
import 'package:Intaleq/controller/functions/crud.dart';
import 'package:Intaleq/controller/home/map_passenger_controller.dart';
import 'package:Intaleq/controller/home/map/ride_lifecycle_controller.dart';
import 'package:Intaleq/main.dart';
import 'package:Intaleq/views/home/map_page_passenger.dart';
import 'package:Intaleq/views/widgets/elevated_btn.dart';
@@ -45,14 +45,14 @@ class RateController extends GetxController {
confirm: MyElevatedButton(title: 'Ok', onPressed: () => Get.back()));
} else if (Get.find<PaymentController>().isWalletChecked == true) {
double tip = 0;
tip = (Get.find<MapPassengerController>().totalPassenger) *
tip = (Get.find<RideLifecycleController>().totalPassenger) *
(double.parse(box.read(BoxName.tipPercentage).toString()));
if (tip > 0) {
var res = await CRUD().post(link: AppLink.addTips, payload: {
'passengerID': box.read(BoxName.passengerID),
'driverID': Get.find<MapPassengerController>().driverId.toString(),
'rideID': Get.find<MapPassengerController>().rideId.toString(),
'driverID': Get.find<RideLifecycleController>().driverId.toString(),
'rideID': Get.find<RideLifecycleController>().rideId.toString(),
'tipAmount': tip.toString(),
});
await Get.find<PaymentController>()
@@ -62,8 +62,8 @@ class RateController extends GetxController {
? tip.toStringAsFixed(0)
: (tip * 100).toString());
await CRUD().postWallet(link: AppLink.addDriversWalletPoints, payload: {
'driverID': Get.find<MapPassengerController>().driverId.toString(),
'paymentID': '${Get.find<MapPassengerController>().rideId}tip',
'driverID': Get.find<RideLifecycleController>().driverId.toString(),
'paymentID': '${Get.find<RideLifecycleController>().rideId}tip',
'amount': box.read(BoxName.countryCode) == 'Egypt'
? tip.toStringAsFixed(0)
: (tip * 100).toString(),
@@ -73,10 +73,10 @@ class RateController extends GetxController {
if (res != 'failure') {
await NotificationService.sendNotification(
category: 'You Have Tips',
target: Get.find<MapPassengerController>().driverToken.toString(),
target: Get.find<RideLifecycleController>().driverToken.toString(),
title: 'You Have Tips'.tr,
body:
'${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find<MapPassengerController>().totalPassenger)}',
'${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find<RideLifecycleController>().totalPassenger)}',
isTopic: false, // Important: this is a token
tone: 'ding',
driverList: [],
@@ -95,7 +95,7 @@ class RateController extends GetxController {
},
);
Get.find<MapPassengerController>().restCounter();
Get.find<RideLifecycleController>().restCounter();
Get.offAll(const MapPagePassenger());
}
}