Merge branch 'development_v3.3' of http://34.17.52.79/Haroon6138/diplomatic-quarter into dev_v3.13.6

# Conflicts:
#	lib/config/config.dart
#	lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
#	lib/pages/BookAppointment/BookSuccess.dart
#	lib/pages/Covid-DriveThru/covid-payment-summary.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart
#	lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart
#	lib/pages/ErService/OrderLogPage.dart
#	lib/pages/ErService/rapid-response-team/rrt-request-page.dart
#	lib/pages/ToDoList/ToDo.dart
#	lib/pages/livecare/widgets/clinic_list.dart
#	lib/pages/medical/balance/confirm_payment_page.dart
#	lib/services/payfort_services/payfort_service.dart
#	lib/services/payfort_services/payfort_view_model.dart
#	lib/splashPage.dart
#	pubspec.yaml
dev_v3.13.6_voipcall
Sultan khan 9 months ago
commit a4ed832147

@ -56,6 +56,8 @@ var PHARMACY_REDIRECT_URL = 'https://bit.ly/AlhabibPharmacy';
// RC API URL
var RC_BASE_URL = 'https://rc.hmg.com/';
// var RC_BASE_URL = 'https://rc.hmg.com/test/';
// var RC_BASE_URL = 'https://ms.hmg.com/rc/';
var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -659,8 +661,6 @@ var PLACE_MEAL_PLAN_ORDER = 'Services/MOP.svc/REST/UpdateOrMakeNewOrder';
var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity';
var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany';
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
@ -669,7 +669,6 @@ var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
static var context;

@ -326,7 +326,7 @@ const Map localizedValues = {
"nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "Location", "ar": "الموقع"},
"call_now": {"en": "Call now", "ar": "اتصل الان"},
"ambulancerequest": {"en": "Ambulance", "ar": "خدمات النقل "},
"ambulancerequest": {"en": "Ambulance", "ar": "طلب النقل "},
"requestA": {"en": "Request", "ar": "الاسعافي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
@ -1338,7 +1338,7 @@ const Map localizedValues = {
"covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"},
"covid-alert-info": {
"en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically",
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة"
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة"
},
"covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"},
"back": {"en": "Back", "ar": "رجوع"},
@ -1942,6 +1942,7 @@ const Map localizedValues = {
"habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."},
"cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please make sure that you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
"onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"},

@ -104,14 +104,6 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
),
Container(
height: 200,
// child: GoogleMap(
// mapType: MapType.normal,
// markers: markers,
// initialCameraPosition: _kGooglePlex,
// onMapCreated: (GoogleMapController controller) {
// _controller.complete(controller);
// },
// ),
decoration: containerColorRadiusBorderWidth(Colors.transparent, 12,Colors.transparent,0.5),
clipBehavior: Clip.antiAlias,
child: Image.network(

@ -618,23 +618,23 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = 0;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = 0;
applePayInsertRequest.projectID = widget.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = null;
applePayInsertRequest.appointmentNo = 0;
applePayInsertRequest.orderDescription = "Advance Payment";
applePayInsertRequest.appointmentNo = widget.appoNo;
applePayInsertRequest.orderDescription = "Ancillary Order Payment";
applePayInsertRequest.liveServiceID = "0";
applePayInsertRequest.latitude = "0.0";
applePayInsertRequest.longitude = "0.0";
@ -642,7 +642,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay";
@ -659,21 +659,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!,
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com",
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Ancillary Order Payment",
orderAmount: double.parse(getTotalValue()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult);
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList());
},
projectId: widget.projectID,

@ -768,24 +768,20 @@ class _BookSuccessState extends State<BookSuccess> {
applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel!.authenticatedUserObject.user!.lastName!;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID =
ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID =
projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.patientTypeID =
projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA =
projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "Appointment Payment";
@ -797,12 +793,9 @@ class _BookSuccessState extends State<BookSuccess> {
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName =
projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.responseContinueURL =
"http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl =
"http://hmg.com/Documents/success.html";
applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay";
applePayInsertRequest.isMobSDK = true;
@ -822,21 +815,21 @@ class _BookSuccessState extends State<BookSuccess> {
service.applePayInsertRequest(applePayInsertRequest, context).then((
res) async {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel!.authenticatedUserObject.user!.lastName!,
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com",
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult);
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
@ -912,13 +905,13 @@ class _BookSuccessState extends State<BookSuccess> {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
try {
if (selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo);
// } else {
// updateTamaraRequestStatus(
// "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo);
// }
checkTamaraPaymentStatus(transID!, appo);
if (tamaraPaymentStatus != null && tamaraPaymentStatus!.toLowerCase() == "approved") {
updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID!, num.parse(selectedInstallments!), appo);
} else {
updateTamaraRequestStatus(
"Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID! != null ? tamaraOrderID! : "", num.parse(selectedInstallments!), appo);
}
} else {
checkPaymentStatus(appo);
}
@ -954,7 +947,7 @@ class _BookSuccessState extends State<BookSuccess> {
});
}
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) {
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
try {
DoctorsListService service = new DoctorsListService();

@ -31,7 +31,6 @@ class CovidPaymentSummary extends StatefulWidget {
MyInAppBrowser? browser;
AuthenticatedUser? authenticatedUser;
AppSharedPreferences sharedPref = AppSharedPreferences();
String transID = "";
CovidPaymentSummary({required this.patientShareResponse, required this.selectedPaymentMethod});
@ -44,6 +43,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
late String tamaraPaymentStatus;
late String tamaraOrderID;
String transID = "";
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
@ -216,11 +217,11 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo);
widget.browser!.openPaymentBrowser(
amount,
"Covid appointment payment",
Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!),
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo),
appo.projectID.toString(),
authenticatedUser.emailAddress!,
paymentMethod,
@ -232,13 +233,11 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
widget.patientShareResponse!.isLiveCareAppointment!,
"2",
"",
AppGlobal.context,
widget.patientShareResponse!.appointmentDate,
widget.patientShareResponse!.appointmentNo!,
widget.patientShareResponse!.clinicID!,
widget.patientShareResponse!.doctorID!,
widget.selectedInstallmentPlan,
);
widget.patientShareResponse!.appointmentNo,
widget.patientShareResponse!.clinicID,
widget.patientShareResponse!.doctorID,
widget.selectedInstallmentPlan);
}
onBrowserLoadStart(String url) {
@ -278,7 +277,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
print("onBrowserExit Called!!!!");
try {
if (widget.selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!!, appo.clinicID!, appo.appointmentNo!), appo);
// checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo);
checkTamaraPaymentStatus(transID, appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo);
// } else {
@ -301,8 +301,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(widget.selectedInstallmentPlan!), appo);
} else {
updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID : "",
int.parse(widget.selectedInstallmentPlan!), appo);
updateTamaraRequestStatus("Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID : "",
num.parse(widget.selectedInstallmentPlan!), appo);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -320,7 +320,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
});
}
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) {
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
try {
DoctorsListService service = new DoctorsListService();
@ -378,7 +378,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), false, context).then((res) {
service.checkPaymentStatus(transID, false, context).then((res) {
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];

@ -495,6 +495,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
_vitalSignService.weightKg = "";
Provider.of<ProjectViewModel>(context, listen: false).user = result.list;
Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list);
Provider.of<ProjectViewModel>(context, listen: false).authenticatedUserObject.user = result.list;
try {
// await appointmentRateViewModel.getIsLastAppointmentRatedList();

@ -219,10 +219,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
TranslationBase.of(context).pickupLocation + ": ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Text(
Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
order.pickupLocation!.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
),
),
],
),
],
@ -352,12 +355,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
BillAmount(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
Container(),
// BillAmount(
// changeCurrentTab: _changeCurrentTab,
// patientER: _patientER,
// patientER_RC: _patientER_RC,
// amRequestViewModel: widget.amRequestViewModel,
// ),
Summary(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,

@ -6,12 +6,14 @@ import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.da
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/ambulanceRequest/locationDetails.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
@ -496,10 +498,36 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
SizedBox(
height: 45,
// SizedBox(
// height: 45,
// ),
// if (myAppointment != null)
// SizedBox(
// height: 100,
// ),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
),
if (myAppointment != null)
SizedBox(
height: 100,
),
@ -510,6 +538,20 @@ class _PickupLocationState extends State<PickupLocation> {
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
widget.changeCurrentTab(0);
},
),
),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).next,
() {
@ -563,9 +605,18 @@ class _PickupLocationState extends State<PickupLocation> {
}
widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0;
widget.changeCurrentTab(2);
widget.patientER_RC.transportationDetails!.ambulate = 3;
widget.patientER_RC.transportationDetails!.ambulateTitle = "none";
widget.patientER_RC.transportationDetails!.notes = "";
widget.changeCurrentTab(3);
});
},
color: CustomColors.green,
),
),
],
),
),
);

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -13,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
enum Direction { ToHospital, FromHospital }
enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget {
@ -122,7 +124,7 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}',
TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}',
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
@ -231,7 +233,6 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
height: 5,
),
Container(
margin: EdgeInsets.only(bottom: 65),
child: Row(
children: [
Expanded(
@ -288,12 +289,14 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
});
},
),
Text(TranslationBase.of(context).twoDirec,
Text(
TranslationBase.of(context).twoDirec,
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
)),
),
),
],
),
),
@ -303,13 +306,36 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
],
),
),
SizedBox(
height: 30,
// SizedBox(
// height: 30,
// ),
],
),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
),
SizedBox(
height: 15,
height: 100,
),
],
),
@ -318,6 +344,19 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
Navigator.pop(context);
},
)),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).next,
() {
@ -350,6 +389,10 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
widget.changeCurrentTab(1);
});
},
color: CustomColors.green,
),
),
],
),
),
);

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class Summary extends StatefulWidget {
final Function(int)? changeCurrentTab;
@ -87,48 +89,89 @@ class _SummaryState extends State<Summary> {
SizedBox(
height: 8,
),
_getNormalText(TranslationBase.of(context).selectAmbulate),
_getNormalText(TranslationBase.of(context).way),
_getNormalText(
'${widget.patientER_RC.transportationDetails!.ambulateTitle}',
isBold: true,
),
SizedBox(
height: 8,
),
_getNormalText(TranslationBase.of(context).notes),
_getNormalText(
'${widget.patientER_RC.transportationDetails!.notes ?? '---'}',
widget.patientER_RC.transportationDetails!.tripType == 0 ? TranslationBase.of(context).twoDirec : TranslationBase.of(context).oneDirec,
isBold: true,
),
SizedBox(
height: 8,
),
// // _getNormalText(TranslationBase.of(context).notes),
// // _getNormalText(
// // '${widget.patientER_RC.transportationDetails.notes ?? '---'}',
// // isBold: true,
// // ),
// SizedBox(
// height: 8,
// ),
],
),
),
SizedBox(
height: 20,
// SizedBox(
// height: 20,
// ),
// Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
// SizedBox(
// height: 5,
// ),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar +
(widget.patientER_RC.transportationDetails!.tripType == 1
? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}'
: ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(
height: 5,
),
Container(
height: 55,
padding: EdgeInsets.all(10),
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).contactRRT + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
InkWell(
onTap: () {
launchUrl(
Uri.parse("tel://0115259555"),
);
},
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_getNormalText(TranslationBase.of(context).patientShareTotal + ':'),
Container(
padding: EdgeInsets.only(left: 20.0, right: 20.0),
child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true)
Text("0115259555", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)),
Icon(
Icons.headset_mic_rounded,
size: 30.0,
)
],
),
)
],
),
),
SizedBox(height: 50),
SizedBox(height: 80),
],
),
),
@ -136,11 +179,30 @@ class _SummaryState extends State<Summary> {
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(TranslationBase.of(context).send, () async {
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
widget.changeCurrentTab!(1);
},
),
),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).submit,
() async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
widget.tabController.animateTo(1);
}),
},
color: CustomColors.green,
),
),
],
),
),
);
}

@ -202,9 +202,12 @@ class OrderLogPage extends StatelessWidget {
TranslationBase.of(context).pickupLocation + ": ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Text(
Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
order.pickupLocation!.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, overflow: TextOverflow.clip),
),
),
],
),

@ -173,22 +173,122 @@ class RRTRequestPageState extends State<RRTRequestPage> {
String amount = selectedProcedure.patientShare.toString();
String vat = selectedProcedure.patientTaxAmount.toString();
String total = selectedProcedure.patientShareWithTax.toString();
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
return Container(
decoration: cardRadius(12),
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 30,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.backgroundColor, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
),
pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor),
pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor),
pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor),
Text(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
mHeight(10),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientShareToDo,
style: TextStyle(
fontSize: 10,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
'$amount ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(4),
mDivider(CustomColors.lightGreyColor),
mHeight(4),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientTaxToDo,
style: TextStyle(
fontSize: 10,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
'$vat ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(4),
mDivider(CustomColors.lightGreyColor),
mHeight(4),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientShareTotalToDo,
style: TextStyle(
fontSize: 14,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.bold,
),
),
),
Expanded(
child: Text(
'$total ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 14,
letterSpacing: -0.48,
fontWeight: FontWeight.bold,
),
),
),
],
),
],
),
);
// Column(
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: [
// Container(
// height: 30,
// decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
// child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
// ),
// pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// ],
// );
}
Widget pricingRow({required String label, required String value, bool labelBold = false, bool valueBold = false}) {

@ -45,21 +45,21 @@ class StepsWidget extends StatelessWidget {
: CustomColors.grey2,
),
),
Expanded(
child: showProgress(
title: TranslationBase.of(context).otherInfo,
status: index == 2
? TranslationBase.of(context).inPrgress
: index > 2
? TranslationBase.of(context).completed
: TranslationBase.of(context).locked,
color: index == 2
? CustomColors.orange
: index > 2
? CustomColors.green
: CustomColors.grey2,
),
),
// Expanded(
// child: showProgress(
// title: TranslationBase.of(context).otherInfo,
// status: index == 2
// ? TranslationBase.of(context).inPrgress
// : index > 2
// ? TranslationBase.of(context).completed
// : TranslationBase.of(context).locked,
// color: index == 2
// ? CustomColors.orange
// : index > 2
// ? CustomColors.green
// : CustomColors.grey2,
// ),
// ),
showProgress(
title: TranslationBase.of(context).RRTSummary,
status: index == 3 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked,

@ -1155,7 +1155,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
print("onBrowserExit Called!!!!");
if (selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), appo);
checkTamaraPaymentStatus(transID!, appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo);
// } else {
@ -1174,8 +1174,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, res["tamara_order_id"], int.parse(selectedInstallments!), appo);
} else {
updateTamaraRequestStatus(
"Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID : "", int.parse(selectedInstallments!), appo);
updateTamaraRequestStatus("Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", int.parse(selectedInstallments), appo);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -1309,10 +1308,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
addVIDARequestInsert(String advanceNumber, String paymentReference, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!,
transID!, projectViewModel.isArabic ? 1 : 2, context)
.then((res) {
service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, transID!, projectViewModel.isArabic ? 1 : 2, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
getPatientAppointmentHistory();
}).catchError((err) {
@ -1367,20 +1363,20 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "Appointment Payment";
@ -1391,7 +1387,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay";
@ -1408,21 +1404,21 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!,
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com",
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult);
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,

@ -370,20 +370,20 @@ class _clinic_listState extends State<ClinicList> {
applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "LiveCare Payment";
@ -394,7 +394,7 @@ class _clinic_listState extends State<ClinicList> {
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay";
@ -411,14 +411,14 @@ class _clinic_listState extends State<ClinicList> {
service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async {
await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject!.user.lastName!,
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com",
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
@ -427,7 +427,7 @@ class _clinic_listState extends State<ClinicList> {
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult);
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
@ -515,8 +515,7 @@ class _clinic_listState extends State<ClinicList> {
if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(selectedInstallmentPlan), appo);
} else {
updateTamaraRequestStatus(
"Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo);
updateTamaraRequestStatus("Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -76,12 +76,19 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Navigator.pop(context, true);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber!.projectID;
// if (widget.selectedPaymentMethod == "ApplePay") {
// startApplePay();
// } else {
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod!.toLowerCase(), type: 'wallet');
if (widget.selectedPaymentMethod == "ApplePay") {
if (projectViewModel.havePrivilege(103)) {
startApplePay();
} else {
openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList());
// }
}
} else {
openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList());
}
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod!.toLowerCase(), type: 'wallet');
// openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
});
}
@ -273,16 +280,16 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
applePayInsertRequest.clinicID = 0;
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject!.user.lastName!;
applePayInsertRequest.customerEmail = "CustID_${widget.advanceModel!.fileNumber}@HMG.com";
applePayInsertRequest.customerID = widget.advanceModel!.fileNumber;
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = 0;
applePayInsertRequest.projectID = widget.advanceModel!.hospitalsModel!.iD.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.patientID = widget.advanceModel!.fileNumber;
applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA;
applePayInsertRequest.appointmentDate = null;
@ -295,7 +302,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.authenticatedUserObject.user.patientID;
applePayInsertRequest.userName = int.parse(widget.advanceModel!.fileNumber!);
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay";
@ -314,7 +321,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user!.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com",
customerEmail: "CustID_${widget.advanceModel!.fileNumber}@HMG.com",
orderDescription: "Advance Payment",
orderAmount: double.parse(widget.advanceModel!.amount!),
merchantReference: transID,
@ -326,7 +333,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(result: successResult);
await context.read<PayfortViewModel>().addPayfortApplePayResponse(int.parse(widget.advanceModel!.fileNumber!), result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList());
},
projectId: widget.advanceModel!.hospitalsModel!.iD,

@ -39,7 +39,7 @@ class PayfortService extends BaseService {
return payfortProjectDetailsRespModel;
}
Future<void> addPayfortApplePayResponse({PayFortResult? result}) async {
Future<void> addPayfortApplePayResponse(num patientID, {PayFortResult? result}) async {
Map<String, dynamic> body = {
"Fort_id": result!.fortId,
"CommandType": result!.command,
@ -56,6 +56,7 @@ class PayfortService extends BaseService {
"RemmeberMe": false,
"Reconciliation_Reference": result.reconciliationReference,
"LanguageID": 1,
"PatientID": patientID
};
await baseAppClient.post(

@ -31,9 +31,9 @@ class PayfortViewModel extends ChangeNotifier {
}
}
Future<void> addPayfortApplePayResponse({PayFortResult? result}) async {
Future<void> addPayfortApplePayResponse(num patientID, {PayFortResult? result}) async {
try {
await _payfortService.addPayfortApplePayResponse(result: result);
await _payfortService.addPayfortApplePayResponse(patientID, result: result);
} on Exception catch (e, s) {
print(s);
return null;

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
@ -31,17 +32,20 @@ class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
AppGlobal.context = context;
super.initState();
print("Splash init called.............");
Timer(
Duration(seconds: 1, milliseconds: 500),
() async {
await loadPrivilege().then((value) {
if(!_privilegeService.hasError) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
),
);
} else {}
});
},
);
@ -69,6 +73,7 @@ class _SplashScreenState extends State<SplashScreen> {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
// PushNotificationHandler(context).init(); // Asyncronously
}
@override

@ -2953,6 +2953,7 @@ class TranslationBase {
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get contactRRT => localizedValues["contactRRT"][locale.languageCode];
String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode];
String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode];
String get upcoming => localizedValues["upcoming"][locale.languageCode];

@ -709,6 +709,8 @@ class _AppDrawerState extends State<AppDrawer> {
// Navigator.of(context).pop();
Provider.of<ProjectViewModel>(context, listen: false).user = result.list;
Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list);
Provider.of<ProjectViewModel>(context, listen: false).authenticatedUserObject.user = result.list;
// await pharmacyModuleViewModel.generatePharmacyToken();
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";

@ -40,9 +40,9 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

Loading…
Cancel
Save