From cb79d625d1a20d399561283e7dd6f800f9f72da0 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 29 Jan 2024 12:21:25 +0300 Subject: [PATCH] Update to stores for LiveCare fix --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/config/config.dart | 2 +- lib/pages/BookAppointment/BookSuccess.dart | 2 +- lib/pages/ToDoList/ToDo.dart | 2 +- lib/pages/livecare/widgets/clinic_list.dart | 12 ++++++------ lib/uitl/utils.dart | 5 +++-- pubspec.yaml | 2 +- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 0067c96b..70c9bd9b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -540,7 +540,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.81; + MARKETING_VERSION = 4.5.82; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -684,7 +684,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.81; + MARKETING_VERSION = 4.5.82; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -722,7 +722,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.81; + MARKETING_VERSION = 4.5.82; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/config/config.dart b/lib/config/config.dart index bc651005..09255501 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -343,7 +343,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 12.0; +var VERSION_ID = 12.1; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index bf16e987..810f977b 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -677,7 +677,7 @@ class _BookSuccessState extends State { applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; applePayInsertRequest.appointmentDate = appo.appointmentDate; applePayInsertRequest.appointmentNo = appo.appointmentNo; - applePayInsertRequest.orderDescription = "Advance Payment"; + applePayInsertRequest.orderDescription = "Appointment Payment"; applePayInsertRequest.liveServiceID = "0"; applePayInsertRequest.latitude = "0.0"; applePayInsertRequest.longitude = "0.0"; diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index bbd7d579..37161678 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -1354,7 +1354,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; applePayInsertRequest.appointmentDate = appo.appointmentDate; applePayInsertRequest.appointmentNo = appo.appointmentNo; - applePayInsertRequest.orderDescription = "Advance Payment"; + applePayInsertRequest.orderDescription = "Appointment Payment"; applePayInsertRequest.liveServiceID = "0"; applePayInsertRequest.latitude = "0.0"; applePayInsertRequest.longitude = "0.0"; diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index faff8c98..0e1ba5aa 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -352,7 +352,7 @@ class _clinic_listState extends State { void startApplePay(AppoitmentAllHistoryResultList appo, String amount) async { try { - transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false); print("TransactionID: $transID"); GifLoaderDialogUtils.showMyDialog(localContext); @@ -445,7 +445,7 @@ class _clinic_listState extends State { openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); - transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false); selectedPaymentMethod = paymentMethod[0]; selectedInstallmentPlan = paymentMethod[1]; this.amount = amount.toString(); @@ -491,7 +491,7 @@ class _clinic_listState extends State { print("onBrowserExit Called!!!!"); try { 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(selectedInstallmentPlan), appo); // } else { @@ -515,7 +515,7 @@ class _clinic_listState extends State { updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(selectedInstallmentPlan), appo); } else { updateTamaraRequestStatus( - "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); + "Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); @@ -532,7 +532,7 @@ class _clinic_listState extends State { service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { GifLoaderDialogUtils.hideDialog(context); if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { - addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo)); + addNewCallForPatientER(transID); } else { AppToast.showErrorToast(message: res['Response_Message']); projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed( @@ -565,7 +565,7 @@ class _clinic_listState extends State { amount = res['Amount'].toString(); payment_method = res['PaymentMethod']; if (paymentInfo == 'Success') { - addNewCallForPatientER(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo)); + addNewCallForPatientER(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : transID); } else { AppToast.showErrorToast(message: res['Response_Message']); projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed( diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 050badb9..d93cec9b 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -153,8 +153,9 @@ class Utils { } } - static String getAppointmentTransID(int projectID, int clinicID, int appoNo) { - return projectID.toString() + '-' + clinicID.toString() + '-' + appoNo.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString(); + static String getAppointmentTransID(int projectID, int clinicID, int appoNo, {bool isAddMilliseconds = true}) { + String currentMillis = DateTime.now().millisecondsSinceEpoch.toString(); + return projectID.toString() + '-' + clinicID.toString() + '-' + appoNo.toString() + (isAddMilliseconds ? '-' + currentMillis.substring(currentMillis.length - 5, currentMillis.length) : ""); } static String getAdvancePaymentTransID(int projectID, int fileNumber) { diff --git a/pubspec.yaml b/pubspec.yaml index e346f37c..2a44171b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.044+4050044 +version: 4.5.046+4050046 environment: sdk: ">=2.7.0 <3.0.0"