diff --git a/GoogleService-Info_DQ.plist b/GoogleService-Info_DQ.plist new file mode 100644 index 00000000..0c093a2a --- /dev/null +++ b/GoogleService-Info_DQ.plist @@ -0,0 +1,36 @@ + + + + + CLIENT_ID + 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r + API_KEY + AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs + GCM_SENDER_ID + 864393916058 + PLIST_VERSION + 1 + BUNDLE_ID + com.cloud.diplomaticquarterapp + PROJECT_ID + diplomaticquarter-d2385 + STORAGE_BUCKET + diplomaticquarter-d2385.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:864393916058:ios:13f787bbfe6051f8b97923 + DATABASE_URL + https://diplomaticquarter-d2385.firebaseio.com + + \ No newline at end of file diff --git a/GoogleService-Info_HMG.plist b/GoogleService-Info_HMG.plist new file mode 100644 index 00000000..153aa2c6 --- /dev/null +++ b/GoogleService-Info_HMG.plist @@ -0,0 +1,38 @@ + + + + + CLIENT_ID + 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt + ANDROID_CLIENT_ID + 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com + API_KEY + AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA + GCM_SENDER_ID + 815750722565 + PLIST_VERSION + 1 + BUNDLE_ID + com.HMG.Smartphone + PROJECT_ID + api-project-815750722565 + STORAGE_BUCKET + api-project-815750722565.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:815750722565:ios:328ec247a81a2ca23c186c + DATABASE_URL + https://api-project-815750722565.firebaseio.com + + \ No newline at end of file diff --git a/assets/images/logo_HMG.png b/assets/images/logo_HMG.png new file mode 100644 index 00000000..0d9e4a56 Binary files /dev/null and b/assets/images/logo_HMG.png differ diff --git a/ios/GoogleService-Info.plist b/ios/Runner/WifiConnect/GoogleService-Info.plist similarity index 100% rename from ios/GoogleService-Info.plist rename to ios/Runner/WifiConnect/GoogleService-Info.plist diff --git a/key b/key new file mode 100644 index 00000000..15b9f5d1 Binary files /dev/null and b/key differ diff --git a/lib/config/config.dart b/lib/config/config.dart index d95c2f0a..d28ade4c 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -1,9 +1,7 @@ import 'dart:io'; -import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; @@ -13,11 +11,16 @@ const PACKAGES_CATEGORIES = '/api/categories'; const PACKAGES_PRODUCTS = '/api/products'; const BASE_URL = 'https://uat.hmgwebservices.com/'; -//const BASE_URL = 'https://.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; + +// Pharmacy UAT URLs +// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; + +// Pharmacy Production URLs +const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; -//const BASE_PHARMACY_URL = 'http://swd-pharapp-01:7200/api/'; -const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; @@ -92,9 +95,12 @@ const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///ED Online -const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; -const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; -const ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; +const ER_GET_VISUAL_TRIAGE_QUESTIONS = + "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +const ER_SAVE_TRIAGE_INFORMATION = + "services/Doctors.svc/REST/ER_SaveTriageInformation"; +const ER_GetPatientPaymentInformationForERClinic = + "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest const GET_AMBULANCE_REQUEST = @@ -449,7 +455,7 @@ const GET_ANCILLARY_ORDERS = // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; // pharmacy -const PHARMACY_AUTORZIE_CUSTOMER = "epharmacy/api/AutorizeCustomer"; +const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_GET_COUNTRY = "countries"; const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; @@ -470,9 +476,9 @@ const GET_Cancel_ORDER = "cancelorder/"; const WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; const GET_SHOPPING_CART = "shopping_cart_items/"; const GET_SHIPPING_OPTIONS = "get_shipping_option/"; -const DELETE_SHOPPING_CART = "epharmacy/api/delete_shopping_cart_items/"; +const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; -const ORDER_SHOPPING_CART = "epharmacy/api/orders"; +const ORDER_SHOPPING_CART = "orders"; const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; const GET_LACUM_GROUP_INFORMATION = @@ -529,11 +535,11 @@ const GET_BRAND_ITEMS = "products"; // External API const ADD_ADDRESS_INFO = - "https://mdlaboratories.com/exacartapi/api/addcustomeraddress"; + "addcustomeraddress"; const GET_CUSTOMER_ADDRESSES = - "https://mdlaboratories.com/exacartapi/api/Customers/"; + "Customers/"; const GET_CUSTOMER_INFO = - "https://mdlaboratories.com/exacartapi/api/VerifyCustomer"; + "VerifyCustomer"; //Pharmacy diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 03891edc..8254daae 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1966,5 +1966,9 @@ const Map localizedValues = { "errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"}, "errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"}, "expectedArrivalTime": {"en": "Expected arrival time", "ar": "الوقت المتوقع للوصول"}, + "add-address": { + "en": "Add new address", + "ar": "اضف عنوان جديد" + }, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index fab6d8fd..f4dc1d78 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -303,7 +303,8 @@ class BaseAppClient { onFailure('Error While Fetching data', statusCode); } } else { - var parsed = json.decode(response.body.toString()); + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); onSuccess(parsed, statusCode); } } else { @@ -400,6 +401,8 @@ class BaseAppClient { Function(String error, int statusCode) onFailure, bool isAllowAny = false, bool isExternal = false}) async { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); String url; if (isExternal) { url = endPoint; @@ -407,8 +410,7 @@ class BaseAppClient { url = BASE_PHARMACY_URL + endPoint; } try { - //Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - if (!isExternal) { + if (isExternal) { String token = await sharedPref.getString(TOKEN); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); @@ -478,16 +480,25 @@ class BaseAppClient { if (await Utils.checkConnection()) { final response = await http.post(url.trim(), body: json.encode(body), headers: { + // 'Content-Type': 'application/json', + // 'Accept': 'application/json', + // 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', 'Content-Type': 'application/json', 'Accept': 'application/json', + 'Authorization': token ?? '', + 'Mobilenumber': user != null + ? getPhoneNumberWithoutZero(user['MobileNumber'].toString()) + : "", 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Username': user != null ? user['PatientID'].toString() : "", }); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); } else { - var parsed = json.decode(response.body.toString()); + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); if (parsed['Response_Message'] != null) { onSuccess(parsed, statusCode); } else { diff --git a/lib/core/service/parmacyModule/order-preview-service.dart b/lib/core/service/parmacyModule/order-preview-service.dart index 18cfa87e..54dcf7da 100644 --- a/lib/core/service/parmacyModule/order-preview-service.dart +++ b/lib/core/service/parmacyModule/order-preview-service.dart @@ -89,7 +89,7 @@ class OrderPreviewService extends BaseService { Map body = Map(); body["shopping_cart_item"] = choppingCartObject; - await baseAppClient.post("$GET_SHOPPING_CART$productId", + await baseAppClient.pharmacyPost("$GET_SHOPPING_CART$productId", isExternal: false, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { @@ -107,7 +107,7 @@ class OrderPreviewService extends BaseService { Map body = Map(); - await baseAppClient.post("$DELETE_SHOPPING_CART$productId", + await baseAppClient.pharmacyPost("$DELETE_SHOPPING_CART$productId", isExternal: false, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { @@ -213,7 +213,7 @@ class OrderPreviewService extends BaseService { body['order'] = orderBody; try { - await baseAppClient.post(ORDER_SHOPPING_CART, + await baseAppClient.pharmacyPost(ORDER_SHOPPING_CART, isExternal: false, isAllowAny: true, onSuccess: (response, statusCode) async { }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 9d2b2f6b..7fa095ca 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -80,7 +80,7 @@ class PharmacyModuleService extends BaseService { }; hasError = false; try { - await baseAppClient.get(PHARMACY_AUTORZIE_CUSTOMER, + await baseAppClient.getPharmacy(PHARMACY_AUTORZIE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async { if (response['Status'] == 200) { await sharedPref.setString( diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index 4bf3a762..c9e4262f 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -49,6 +49,7 @@ class _LocationPageState return BaseView( onModelReady: (model) {}, builder: (_, model, widget) => AppScaffold( + appBarTitle: TranslationBase.of(context).addAddress, isShowDecPage: false, isShowAppBar: true, baseViewModel: model, diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 704aef54..c99930aa 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -185,7 +185,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { if (results[Permission.camera].isGranted) ; if (results[Permission.photos].isGranted) ; if (results[Permission.accessMediaLocation].isGranted) ; - if (results[Permission.calendar].isGranted) ; + // if (results[Permission.calendar].isGranted) ; }); requestPermissions(); // }); @@ -327,15 +327,15 @@ class _LandingPageState extends State with WidgetsBindingObserver { Permission.photos, Permission.notification, Permission.accessMediaLocation, - Permission.calendar, + // Permission.calendar, Permission.activityRecognition ].request(); - var permissionsGranted = await deviceCalendarPlugin.hasPermissions(); - if (permissionsGranted.isSuccess && !permissionsGranted.data) { - permissionsGranted = await deviceCalendarPlugin.requestPermissions(); - if (!permissionsGranted.isSuccess || !permissionsGranted.data) {} - } + // var permissionsGranted = await deviceCalendarPlugin.hasPermissions(); + // if (permissionsGranted.isSuccess && !permissionsGranted.data) { + // permissionsGranted = await deviceCalendarPlugin.requestPermissions(); + // if (!permissionsGranted.isSuccess || !permissionsGranted.data) {} + // } return permissionResults; } diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart index 276151a7..f85faf2c 100644 --- a/lib/services/pharmacy_services/product_detail_service.dart +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -88,7 +88,7 @@ class ProductDetailService extends BaseService { "language_id": 1 } }; - await baseAppClient.pharmacyPost(GET_SHOPPING_CART, + await baseAppClient.pharmacyPost(GET_SHOPPING_CART, isExternal: false, onSuccess: (dynamic response, int statusCode) { _addToCartModel.clear(); response['shopping_carts'].forEach((item) { diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 83b0df5f..841e9f58 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -81,7 +81,7 @@ class _AppDrawerState extends State { children: [ Container( child: - Image.asset('assets/images/DQ/DQ_logo.png'), + Image.asset('assets/images/logo_HMG.png'), margin: EdgeInsets.all( SizeConfig.imageSizeMultiplier * 4), ),