diff --git a/android/app/agconnect-services.json b/android/app/agconnect-services.json
index cfdaf83b..91aad2c7 100644
--- a/android/app/agconnect-services.json
+++ b/android/app/agconnect-services.json
@@ -1,6 +1,21 @@
{
+ "agcgw":{
+ "backurl":"connect-drcn.hispace.hicloud.com",
+ "url":"connect-drcn.dbankcloud.cn",
+ "websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
+ "websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
+ },
+ "agcgw_all":{
+ "CN":"connect-drcn.dbankcloud.cn",
+ "CN_back":"connect-drcn.hispace.hicloud.com",
+ "DE":"connect-dre.dbankcloud.cn",
+ "DE_back":"connect-dre.hispace.hicloud.com",
+ "RU":"connect-drru.dbankcloud.cn",
+ "RU_back":"connect-drru.hispace.hicloud.com",
+ "SG":"connect-dra.dbankcloud.cn",
+ "SG_back":"connect-dra.hispace.hicloud.com"
+ },
"client":{
- "appType":"1",
"cp_id":"2640966000002322881",
"product_id":"736430079244816567",
"client_id":"563735388191982656",
@@ -10,5 +25,50 @@
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
"package_name":"com.ejada.hmg"
},
- "configuration_version":"1.0"
-}
\ No newline at end of file
+ "oauth_client":{
+ "client_id":"102857389",
+ "client_type":1
+ },
+ "app_info":{
+ "app_id":"102857389",
+ "package_name":"com.ejada.hmg"
+ },
+ "service":{
+ "analytics":{
+ "collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
+ "collector_url_ru":"datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn",
+ "collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
+ "collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
+ "collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
+ "resource_id":"p1",
+ "channel_id":""
+ },
+ "search":{
+ "url":"https://search-drcn.cloud.huawei.com"
+ },
+ "cloudstorage":{
+ "storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
+ },
+ "ml":{
+ "mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
+ }
+ },
+ "region":"CN",
+ "configuration_version":"3.0",
+ "appInfos":[
+ {
+ "package_name":"com.ejada.hmg",
+ "client":{
+ "app_id":"102857389"
+ },
+ "app_info":{
+ "package_name":"com.ejada.hmg",
+ "app_id":"102857389"
+ },
+ "oauth_client":{
+ "client_type":1,
+ "client_id":"102857389"
+ }
+ }
+ ]
+}
diff --git a/android/app/build.gradle b/android/app/build.gradle
index a465569d..dc377f5c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -67,6 +67,7 @@ android {
}
release {
signingConfig signingConfigs.config
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
staging {
// Specifies a sorted list of fallback build types that the
@@ -77,6 +78,15 @@ android {
matchingFallbacks = ['debug', 'qa', 'release']
}
}
+
+ packagingOptions {
+ exclude 'META-INF/proguard/androidx-annotations.pro'
+ }
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
}
flutter {
@@ -110,7 +120,8 @@ dependencies {
implementation 'com.google.android.gms:play-services-basement:17.5.0'
- implementation "com.opentok.android:opentok-android-sdk:2.19.1"
+// implementation "com.opentok.android:opentok-android-sdk:2.19.1"
+
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation 'com.facebook.stetho:stetho-urlconnection:1.5.1'
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
index 4ace459d..cfab1fd6 100644
--- a/android/app/proguard-rules.pro
+++ b/android/app/proguard-rules.pro
@@ -1,4 +1,27 @@
-keep class tvi.webrtc.** { *; }
-keep class com.twilio.video.** { *; }
-keep class com.twilio.common.** { *; }
--keepattributes InnerClasses
\ No newline at end of file
+-keepattributes InnerClasses
+
+-keep class com.ejada.** { *; }
+-keep class org.webrtc.** { *; }
+
+-ignorewarnings
+-keepattributes *Annotation*
+-keepattributes Exceptions
+-keepattributes InnerClasses
+-keepattributes Signature
+-keep class com.hianalytics.android.**{*;}
+-keep class com.huawei.updatesdk.**{*;}
+-keep class com.huawei.hms.**{*;}
+
+## Flutter wrapper
+-keep class io.flutter.app.** { *; }
+-keep class io.flutter.plugin.** { *; }
+-keep class io.flutter.util.** { *; }
+-keep class io.flutter.view.** { *; }
+-keep class io.flutter.** { *; }
+-keep class io.flutter.plugins.** { *; }
+-dontwarn io.flutter.embedding.**
+-keep class com.huawei.hms.flutter.** { *; }
+-repackageclasses
\ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index ba03f512..ebc7cc88 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -13,7 +13,7 @@
-
+
@@ -22,24 +22,18 @@
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
@@ -48,10 +42,12 @@
+ android:screenOrientation="sensorPortrait"
+ android:label="Dr. Alhabib">
+
+
-
-
+
+
-
-
-
-
+
+
+
-
-
+
+
-
+
-
-
+
+
+ android:name="push_kit_auto_init_enabled"
+ android:value="true" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
aps-environment
development
+ com.apple.developer.healthkit
+
+ com.apple.developer.healthkit.access
+
com.apple.developer.networking.HotspotConfiguration
com.apple.developer.networking.wifi-info
+ com.apple.developer.nfc.readersession.formats
+
+ NDEF
+ TAG
+
diff --git a/lib/config/config.dart b/lib/config/config.dart
index dafe7ab9..3ed8d764 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -15,7 +15,7 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
-const BASE_URL = 'https://uat.hmgwebservices.com/';
+ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
@@ -68,7 +68,9 @@ const GET_DOCTOR_RATING_DETAILS =
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
-const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
+// const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
+const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
+
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT =
@@ -255,7 +257,7 @@ const GET_PATIENT_SHARE =
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY =
- "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
+ "Services/Doctors.svc/REST/PateintHasAppoimentHistory_Async";
const DOCTOR_SCHEDULE_URL =
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
@@ -570,7 +572,10 @@ const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
-const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
+
+// const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
+const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
+
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview";
const GET_NEW_PRODUCTS = "newproducts";
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index babdd9c1..83fedc90 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -50,7 +50,8 @@ const Map localizedValues = {
'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'},
'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'},
'search': {'en': 'Search', 'ar': 'بحث'},
- 'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج'},
+ 'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج '},
+ 'noSearchResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج الرجاء تغيير لغة البحث'},
'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'},
'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'},
'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'},
@@ -277,6 +278,8 @@ const Map localizedValues = {
"viewAll": {"en": "View All", 'ar': 'عرض الكل'},
"view": {"en": "View", 'ar': 'عرض'},
"ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'},
+ "contactUsLocation": {"en": "P.O.Box: 91877 - Riyadh 11643, King Fahad Road - Olaya - Kingdom of Saudi Arabia", 'ar': 'صندوق بريد: 91877 - الرياض 11643 ، طريق الملك فهد - العليا - المملكة العربية السعودية'},
+ "contactUsTime": {"en": "Saturday - Wednesday 8:00 AM - 10 PM, Thursday 8:00 AM- 8:00 PM, Friday 2:00 PM - 8:00 PM", 'ar': " السبت – الأربعاء 08:00 ص – 10:00 م , الخميس 08:00 ص – 08:00 م, الجمعة 02:00 م - 08:00 م"},
"ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'},
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "ar": "استشارة"},
@@ -507,7 +510,11 @@ const Map localizedValues = {
"reachUs": {"en": "Reach Us", "ar": "الوصول لنا"},
"ourLocations": {"en": "Our Locations", "ar": "مواقعنا"},
"edit": {"en": "Edit", "ar": "تعديل"},
+ "whatsApp": {"en": "Whats App", "ar": " واتس اب"},
+ "phone": {"en": "Phone", "ar": " موبايل"},
"delete": {"en": "Delete", "ar": " حذف"},
+ "deleteAddress": {"en": "Are you sure want to delete", "ar": " هل انت متأكد تريد حذف هذا العنوان"},
+ "deletedAddres": {"en": "Address has been deleted", "ar": " تم حذف العنوان"},
"addAddress": {"en": "ADD A NEW ADDRESS", "ar": " اضافة عنوان جديد"},
"addNewAddress": {"en": "Add New Address", "ar": " اضافة عنوان جديد"},
"order": {"en": "My Order", "ar": " طلباتي"},
@@ -802,7 +809,7 @@ const Map localizedValues = {
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
- "ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"},
+ "ResendOrder": {"en": "Re-Order & Delivery", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطريقة"},
"Average": {"en": "Average", "ar": "متوسط"},
diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart
index 2fbcb832..8e24a04d 100644
--- a/lib/core/model/labs/patient_lab_special_result.dart
+++ b/lib/core/model/labs/patient_lab_special_result.dart
@@ -3,7 +3,7 @@ class PatientLabSpecialResult {
String moduleID;
String resultData;
String resultDataHTML;
- Null resultDataTxt;
+ dynamic resultDataTxt;
PatientLabSpecialResult(
{this.invoiceNo,
diff --git a/lib/core/model/pharmacies/PointsAmountPerMonth.dart b/lib/core/model/pharmacies/PointsAmountPerMonth.dart
index 71cf3498..c5b96bd8 100644
--- a/lib/core/model/pharmacies/PointsAmountPerMonth.dart
+++ b/lib/core/model/pharmacies/PointsAmountPerMonth.dart
@@ -1,11 +1,11 @@
import 'PointsAmountPerday.dart';
class PointsAmountPerMonth {
- double amountPerMonth;
- String month;
+ dynamic amountPerMonth;
+ dynamic month;
int monthNumber;
List pointsAmountPerday;
- double pointsPerMonth;
+ dynamic pointsPerMonth;
PointsAmountPerMonth(
{this.amountPerMonth,
diff --git a/lib/core/model/pharmacies/orders_model.dart b/lib/core/model/pharmacies/orders_model.dart
index cef20c30..ad2c533a 100644
--- a/lib/core/model/pharmacies/orders_model.dart
+++ b/lib/core/model/pharmacies/orders_model.dart
@@ -31,6 +31,7 @@ class Orders {
String orderStatusn;
bool canCancel;
bool canRefund;
+ String orderGuid;
dynamic customerId;
dynamic orderSubtotalExclTax;
dynamic orderShippingExclTax;
@@ -47,6 +48,7 @@ class Orders {
this.orderStatusn,
this.canCancel,
this.canRefund,
+ this.orderGuid,
this.customerId,
this.orderShippingExclTax,
this.orderSubtotalExclTax,
@@ -63,6 +65,7 @@ class Orders {
orderStatusn = json['order_statusn'];
canCancel = json['can_cancel'];
canRefund = json['can_refund'];
+ orderGuid = json['order_guid'];
customerId = json['customer_id'];
orderSubtotalExclTax= json["order_subtotal_excl_tax"];
orderShippingExclTax= json["order_shipping_excl_tax"];
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index ced7eb9c..fefc9139 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -232,7 +232,7 @@ class BaseAppClient {
Map headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
- 'Authorization': token ?? '',
+ 'Authorization': pharmacyToken ?? '',
'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
@@ -291,20 +291,21 @@ class BaseAppClient {
body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSe
- headers = {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json',
- 'Authorization': pharmacyToken,
- 'Mobilenumber': user['MobileNumber'].toString(),
- 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
- 'Username': user['PatientID'].toString(),
- };
+ // headers = {
+ // 'Content-Type': 'application/json',
+ // 'Accept': 'application/json',
+ // 'Authorization': pharmacyToken,
+ // 'Mobilenumber': user['MobileNumber'].toString(),
+ // 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
+ // 'Username': user['PatientID'].toString(),
+ // };
}
}
}
print("URL : $url");
print("Body : ${json.encode(body)}");
+ print("Headers : ${json.encode(headers)}");
if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
@@ -490,6 +491,7 @@ class BaseAppClient {
}) async {
String url = fullUrl;
print("URL Query String: $url");
+ print("body: $body");
if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
@@ -502,6 +504,8 @@ class BaseAppClient {
print("statusCode :$statusCode");
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers);
+ print(response.body.toString());
+
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
@@ -706,7 +710,6 @@ class BaseAppClient {
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
-
? body['PatientTypeID']
: user['PatientType'] != null
? user['PatientType']
diff --git a/lib/core/service/parmacyModule/order-preview-service.dart b/lib/core/service/parmacyModule/order-preview-service.dart
index 52892641..17dfaf99 100644
--- a/lib/core/service/parmacyModule/order-preview-service.dart
+++ b/lib/core/service/parmacyModule/order-preview-service.dart
@@ -176,7 +176,7 @@ class OrderPreviewService extends BaseService {
}
}
- Future makeOrder(PaymentCheckoutData paymentCheckoutData, List shoppingCarts) async {
+ Future makeOrder(PaymentCheckoutData paymentCheckoutData, List shoppingCarts, bool isLakumEnabled) async {
paymentCheckoutData.address.isChecked = true;
hasError = false;
super.error = "";
@@ -201,7 +201,7 @@ class OrderPreviewService extends BaseService {
orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}";
orderBody['shippingOption'] = paymentCheckoutData.shippingOption;
orderBody['shipping_address'] = paymentCheckoutData.address;
- orderBody['lakum_amount'] = paymentCheckoutData.usedLakumPoints;
+ orderBody['lakum_amount'] = isLakumEnabled ? paymentCheckoutData.usedLakumPoints : 0;
List