From b756bf8caffd7a66470dfa8dd93be76144598c1a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 7 Aug 2022 17:05:10 +0300 Subject: [PATCH] Updates --- lib/core/service/client/base_app_client.dart | 12 ++++++------ .../appointment_services/GetDoctorsList.dart | 9 ++++++--- .../livecare_services/livecare_provider.dart | 2 +- lib/widgets/in_app_browser/InAppBrowser.dart | 6 +++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index e9f4904f..f874cf17 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -131,7 +131,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1098574195; // body['MobileNo'] = "966565001080"; - // body['PatientID'] = 1454600; //3844083 + // body['PatientID'] = 3235660; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 @@ -140,11 +140,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - // if (BASE_URL == "https://uat.hmgwebservices.com/") { - debugPrint("URL : $url"); - final jsonBody = json.encode(body); - debugPrint(jsonBody); - // } + if (BASE_URL == "https://uat.hmgwebservices.com/") { + debugPrint("URL : $url"); + final jsonBody = json.encode(body); + debugPrint(jsonBody); + } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index e694a148..76c7becb 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -747,7 +747,8 @@ class DoctorsListService extends BaseService { "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, - "PatientType": authUser.patientType + "PatientType": authUser.patientType, + "VoipToken": await sharedPref.getString(ONESIGNAL_APNS_TOKEN), }; dynamic localRes; @@ -985,11 +986,13 @@ class DoctorsListService extends BaseService { "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, - "PatientType": authUser.patientType + "PatientType": authUser.patientType, + "DeviceToken": await sharedPref.getString(PUSH_TOKEN), + "VoipToken": await sharedPref.getString(ONESIGNAL_APNS_TOKEN), }; // request.DeviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); - // request.Latitude = this.cs.sharedService.getSharedData('userLat', false); + // request.Latitude = this.cs.szharedService.getSharedData('userLat', false); // request.Longitude = this.cs.sharedService.getSharedData('userLong', false); // request.ServiceID = apptData.ServiceID; // request.ProjectID = apptData.ProjectID; diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index f9851ff7..dee399ed 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -317,7 +317,7 @@ class LiveCareService extends BaseService { Future getOneSignalVOIPToken(String voipToken, BuildContext context) async { Map request; - // request = {"app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0, "test_type": 0}; + // request = {"app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0, "test_type": 1}; request = { "app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0 }; dynamic localRes; diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index bb7eb4c1..e5b2cc16 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -162,15 +162,15 @@ class MyInAppBrowser extends InAppBrowser { applePayInsertRequest.clinicID = (clinicID != null && clinicID != "") ? clinicID : 0; applePayInsertRequest.currency = authenticatedUser.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.customerEmail = emailId; - applePayInsertRequest.customerID = authenticatedUser.patientID; - applePayInsertRequest.customerName = authenticatedUser.firstName; + applePayInsertRequest.customerID = num.parse(patientID); + applePayInsertRequest.customerName = patientName; applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0; applePayInsertRequest.projectID = projId; applePayInsertRequest.serviceID = servID; applePayInsertRequest.channelID = 3; - applePayInsertRequest.patientID = authenticatedUser.patientID; + applePayInsertRequest.patientID = num.parse(patientID); applePayInsertRequest.patientTypeID = authenticatedUser.patientType; applePayInsertRequest.patientOutSA = authenticatedUser.outSA; applePayInsertRequest.appointmentDate = (appoDate != null && appoDate != "") ? appoDate : null;