From 9acb5b087d4bc3267b972f8d5220ab91eb914c07 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Tue, 3 Aug 2021 15:11:23 +0300 Subject: [PATCH 01/12] bug fixes --- .../new-design/liveCare_logo_icon_white.svg | 6 ++ lib/config/config.dart | 2 +- lib/config/localized_values.dart | 1 + .../service/medical/radiology_service.dart | 17 +++-- lib/pages/feedback/feedback-detail.dart | 62 +++++++++++++++ lib/pages/feedback/status_feedback_page.dart | 18 ++++- lib/pages/login/forgot-password.dart | 2 +- .../radiology/radiology_details_page.dart | 72 +++++++++--------- .../rate_appointment_clinic.dart | 17 +++-- lib/uitl/translations_delegate_base.dart | 4 + lib/uitl/utils.dart | 75 ++++++++++--------- 11 files changed, 186 insertions(+), 90 deletions(-) create mode 100644 assets/images/new-design/liveCare_logo_icon_white.svg create mode 100644 lib/pages/feedback/feedback-detail.dart diff --git a/assets/images/new-design/liveCare_logo_icon_white.svg b/assets/images/new-design/liveCare_logo_icon_white.svg new file mode 100644 index 00000000..52bce9b5 --- /dev/null +++ b/assets/images/new-design/liveCare_logo_icon_white.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/lib/config/config.dart b/lib/config/config.dart index c8df5bad..bd760fee 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -14,7 +14,7 @@ const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; 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/'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index eaa99a9e..c3e42ff9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2046,4 +2046,5 @@ const Map localizedValues = { "en": "Please accept terms & conditions to continue", "ar": "يرجى قبول الشروط والأحكام للمتابعة" }, + "type": {"en": "Type", "ar": "اكتب"}, }; diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart index b0b96e71..fceedf56 100644 --- a/lib/core/service/medical/radiology_service.dart +++ b/lib/core/service/medical/radiology_service.dart @@ -11,11 +11,10 @@ class RadiologyService extends BaseService { hasError = false; final Map body = new Map(); body['InvoiceNo'] = invoiceNo; - body['LineIt emNo'] = lineItem; + body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; - await baseAppClient.post(GET_RAD_IMAGE_URL, - isAllowAny: true, + await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) { url = response['Data']; }, onFailure: (String error, int statusCode) { @@ -61,11 +60,15 @@ class RadiologyService extends BaseService { _requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo; _requestSendRadReportEmail.setupID = finalRadiology.setupID; _requestSendRadReportEmail.doctorName = finalRadiology.doctorName; - _requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate.year}-${finalRadiology.orderDate.month}-${finalRadiology.orderDate.day}'; - _requestSendRadReportEmail.patientIditificationNum = user.patientIdentificationNo; + _requestSendRadReportEmail.orderDate = + '${finalRadiology.orderDate.year}-${finalRadiology.orderDate.month}-${finalRadiology.orderDate.day}'; + _requestSendRadReportEmail.patientIditificationNum = + user.patientIdentificationNo; _requestSendRadReportEmail.patientMobileNumber = user.mobileNumber; - _requestSendRadReportEmail.patientName = user.firstName + " " + user.lastName; - _requestSendRadReportEmail.patientIditificationNum = user.patientIdentificationNo; + _requestSendRadReportEmail.patientName = + user.firstName + " " + user.lastName; + _requestSendRadReportEmail.patientIditificationNum = + user.patientIdentificationNo; _requestSendRadReportEmail.projectName = finalRadiology.projectName; _requestSendRadReportEmail.radResult = finalRadiology.reportData; _requestSendRadReportEmail.to = user.emailAddress; diff --git a/lib/pages/feedback/feedback-detail.dart b/lib/pages/feedback/feedback-detail.dart new file mode 100644 index 00000000..6135aee9 --- /dev/null +++ b/lib/pages/feedback/feedback-detail.dart @@ -0,0 +1,62 @@ +import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class FeedbackDetails extends StatelessWidget { + final COCItem items; + + FeedbackDetails({ + @required this.items, + }); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).feedbackTitle, + body: Container( + margin: EdgeInsets.all(5), + padding: EdgeInsets.all(5), + color: Colors.white, + child: Table( + border: TableBorder.all(), + columnWidths: const { + 0: IntrinsicColumnWidth(), + 1: FlexColumnWidth(), + 2: FixedColumnWidth(64), + }, + defaultVerticalAlignment: TableCellVerticalAlignment.middle, + children: [ + TableRow( + children: [ + getColumnText(TranslationBase.of(context).feedbackTitle), + getColumnText(items.cOCTitle) + ], + ), + TableRow( + children: [ + getColumnText(TranslationBase.of(context).complaint), + getColumnText(items.cOCID) + ], + ), + TableRow( + children: [ + getColumnText(TranslationBase.of(context).date), + getColumnText(items.date) + ], + ), + TableRow( + children: [ + getColumnText(TranslationBase.of(context).type), + getColumnText(items.formType) + ], + ) + ]))); + } + + Widget getColumnText(value) { + return Container(child: Texts(value), padding: EdgeInsets.all(5)); + } +} diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index 5b297e89..7541855f 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -1,11 +1,13 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -24,11 +26,16 @@ class _StatusFeedbackPageState extends State { isShowDecPage: false, body: model.cOCItemList.isNotEmpty ? Container( - margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0), + margin: EdgeInsets.only( + top: 8.0, left: 8.0, right: 8.0, bottom: 80), padding: EdgeInsets.all(15.0), child: ListView.builder( itemCount: model.cOCItemList.length, - itemBuilder: (context, index) => Container( + itemBuilder: (context, index) => InkWell( + onTap: () { + gotodetails(model.cOCItemList[index]); + }, + child: Container( decoration: BoxDecoration( shape: BoxShape.rectangle, border: Border.all(color: Colors.white, width: 0.5), @@ -87,7 +94,7 @@ class _StatusFeedbackPageState extends State { ], ), ), - )), + ))), ) : Container( child: Center( @@ -128,4 +135,9 @@ class _StatusFeedbackPageState extends State { ), ); } + + gotodetails(item) { + Navigator.pushReplacement( + context, FadePage(page: FeedbackDetails(items: item))); + } } diff --git a/lib/pages/login/forgot-password.dart b/lib/pages/login/forgot-password.dart index 0bc93081..a0b11cb8 100644 --- a/lib/pages/login/forgot-password.dart +++ b/lib/pages/login/forgot-password.dart @@ -76,7 +76,7 @@ class _ForgotPassword extends State { child: DefaultButton( TranslationBase.of(context).submit, () { - sendPatientIDBySMS(); + if (mobileNo.length >= 9) sendPatientIDBySMS(); // print(mobileNo.text); }, color: mobileNo.length >= 9 == true diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart index 742e3ddf..f6d12938 100644 --- a/lib/pages/medical/radiology/radiology_details_page.dart +++ b/lib/pages/medical/radiology/radiology_details_page.dart @@ -55,44 +55,46 @@ class RadiologyDetailsPage extends StatelessWidget { ), ), bottomSheet: (projectViewModel.havePrivilege(9) || - projectViewModel.havePrivilege(8)) + projectViewModel.havePrivilege(8)) ? Container( - width: double.infinity, - height: finalRadiology.dIAPACSURL != "" - ? MediaQuery.of(context).size.height * 0.25 - : MediaQuery.of(context).size.height * 0.14, - color: Colors.grey[100], - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Divider(), - if (finalRadiology.dIAPACSURL != "" && projectViewModel.havePrivilege(9)) - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - onTap: () { - launch(model.radImageURL); - }, - label: TranslationBase.of(context).openRad, - backgroundColor: Colors.grey[800], - ), - ), - if (projectViewModel.havePrivilege(8)) - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - onTap: () { - showConfirmMessage( - finalRadiology: finalRadiology, model: model); - }, - label: TranslationBase.of(context).sendCopyRad, - loading: model.state == ViewState.BusyLocal, - backgroundColor: Theme.of(context).primaryColor, + width: double.infinity, + height: finalRadiology.dIAPACSURL != "" + ? MediaQuery.of(context).size.height * 0.25 + : MediaQuery.of(context).size.height * 0.14, + color: Colors.grey[100], + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Divider(), + if (finalRadiology.dIAPACSURL != "" && + projectViewModel.havePrivilege(9)) + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + onTap: () { + launch(model.radImageURL); + }, + label: TranslationBase.of(context).openRad, + backgroundColor: Colors.grey[800], + ), + ), + if (projectViewModel.havePrivilege(8)) + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + onTap: () { + showConfirmMessage( + finalRadiology: finalRadiology, model: model); + }, + label: TranslationBase.of(context).sendCopyRad, + loading: model.state == ViewState.BusyLocal, + backgroundColor: Theme.of(context).primaryColor, + ), + ) + ], ), ) - ], - ), - ):Container()), + : Container()), ); } diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart index 7fe38f1b..d1d3388f 100644 --- a/lib/pages/rateAppointment/rate_appointment_clinic.dart +++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart @@ -1,23 +1,20 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart'; -import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; -import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class RateAppointmentClinic extends StatefulWidget { final AppointmentDetails appointmentDetails; @@ -108,15 +105,21 @@ class _RateAppointmentClinicState extends State { ), Texts( model.appointmentDetails.projectName, - bold: true, + fontSize: 22, + fontWeight: FontWeight.bold, ), SizedBox( height: 4, ), Texts( - model.appointmentDetails.clinicName, - bold: true, + DateUtil.getMonthDayYearDateFormatted( + DateUtil.convertStringToDate( + model.appointmentDetails.appointmentDate)), ), + SizedBox( + height: 8, + ), + Texts(model.appointmentDetails.startTime), SizedBox( height: 8, ) diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b0840b01..5a586814 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1642,6 +1642,10 @@ class TranslationBase { localizedValues["upcoming-pay-options"][locale.languageCode]; String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; +String get type => + localizedValues["type"][locale.languageCode]; + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 67e5c6b9..94b23b05 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -309,17 +309,17 @@ class Utils { )); } - if (projectViewModel.havePrivilege(48)) { - medical.add(InkWell( - onTap: () => - Navigator.push(context, FadePage(page: ActiveMedicationsPage())), - child: MedicalProfileItem( - title: TranslationBase.of(context).myMedical, - imagePath: 'active_medications.png', - subTitle: TranslationBase.of(context).myMedicalSubtitle, - ), - )); - } + //if (projectViewModel.havePrivilege(48)) { + medical.add(InkWell( + onTap: () => + Navigator.push(context, FadePage(page: ActiveMedicationsPage())), + child: MedicalProfileItem( + title: TranslationBase.of(context).myMedical, + imagePath: 'active_medications.png', + subTitle: TranslationBase.of(context).myMedicalSubtitle, + ), + )); + //} if (projectViewModel.havePrivilege(6)) { medical.add(InkWell( @@ -552,27 +552,31 @@ class Utils { return medical; } - static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}){ + static Widget loadNetworkImage( + {@required String url, BoxFit fitting = BoxFit.cover}) { return CachedNetworkImage( - placeholderFadeInDuration: Duration(milliseconds: 250), - fit: fitting, - imageUrl: url, - placeholder: (context, url) => Container( - child: Center( - child: CircularProgressIndicator() - ) - ), - errorWidget: (context, url, error){ - return Icon(Icons.error, color: Colors.red, size: 50,); - } - ); + placeholderFadeInDuration: Duration(milliseconds: 250), + fit: fitting, + imageUrl: url, + placeholder: (context, url) => + Container(child: Center(child: CircularProgressIndicator())), + errorWidget: (context, url, error) { + return Icon( + Icons.error, + color: Colors.red, + size: 50, + ); + }); } } - - - -Widget applyShadow({ Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}){ +Widget applyShadow( + {Color color = Colors.grey, + double shadowOpacity = 0.5, + double spreadRadius = 2, + double blurRadius = 7, + Offset offset = const Offset(2, 2), + @required Widget child}) { return Container( decoration: BoxDecoration( boxShadow: [ @@ -588,7 +592,6 @@ Widget applyShadow({ Color color = Colors.grey, double shadowOpacity = 0.5, doub ); } - Future userData() async { var userData = AuthenticatedUser.fromJson( await AppSharedPreferences().getObject(MAIN_USER)); @@ -603,15 +606,15 @@ extension IndexedIterable on Iterable { } } -openAppStore({String androidPackageName, String iOSAppID}) async{ - if(Platform.isAndroid){ - assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter"); - if((await FlutterHmsGmsAvailability.isGmsAvailable)) +openAppStore({String androidPackageName, String iOSAppID}) async { + if (Platform.isAndroid) { + assert(!(androidPackageName == null), + "Should have valid value in androidPackageName parameter"); + if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg"); - if((await FlutterHmsGmsAvailability.isHmsAvailable)) + if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg"); - - }else if(Platform.isIOS){ + } else if (Platform.isIOS) { assert((iOSAppID == null), "Should have valid value in iOSAppID parameter"); launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)"); } From 23ca95b9b64659539ea3c85e5481e419f10b794c Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 4 Aug 2021 17:25:49 +0300 Subject: [PATCH 02/12] bug fixes --- lib/analytics/analytic-events.dart | 87 ++-- lib/analytics/google-analytics.dart | 53 +- lib/config/localized_values.dart | 26 +- lib/core/viewModels/dashboard_view_model.dart | 7 +- .../E-Referral/e_referral_page.dart | 62 +-- .../all_habib_medical_service_page.dart | 13 +- .../covid-drivethru-location.dart | 46 +- lib/pages/landing/home_page.dart | 491 +++++++++++------- lib/pages/livecare/livecare_home.dart | 10 +- lib/pages/login/login.dart | 5 - lib/uitl/translations_delegate_base.dart | 7 +- 11 files changed, 483 insertions(+), 324 deletions(-) diff --git a/lib/analytics/analytic-events.dart b/lib/analytics/analytic-events.dart index 3e107d95..7029cad5 100644 --- a/lib/analytics/analytic-events.dart +++ b/lib/analytics/analytic-events.dart @@ -1,69 +1,72 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; -class _Event{ +class _Event { String name; String description; bool active; - _Event(dynamic map){ - name = map['name']; - description = map['description']; - active = map['active']; + _Event(dynamic map) { + if (map != null) { + name = map['name']; + description = map['description']; + active = map['active']; + } } flutterName() => 'f: $name'; } -class AnalyticEvents{ +class AnalyticEvents { static _Event get(String key) { var e = _Event(mapping[key]); - if(e == null){ - var label = labelFrom(className: key); // Convert Class Name in to Label (HomeCare -> Home Care) - e = _Event({"name": label, "active":true, "description":key}); + if (e == null) { + var label = labelFrom( + className: + key); // Convert Class Name in to Label (HomeCare -> Home Care) + e = _Event({"name": label, "active": true, "description": key}); } return e; } static var mapping = const { - "HomeHealthCarePage" : { - "active" : true, - "name" : "Home Health Care Page", - "description" : "", + "HomeHealthCarePage": { + "active": true, + "name": "Home Health Care Page", + "description": "", }, - "SplashScreen" : { - "active" : true, - "name" : "Splash Screen", - "description" : "", + "SplashScreen": { + "active": true, + "name": "Splash Screen", + "description": "", }, - "LandingPage" : { - "active" : true, - "name" : "Landing Page", - "description" : "", + "LandingPage": { + "active": true, + "name": "Landing Page", + "description": "", }, - "WelcomeLogin" : { - "active" : true, - "name" : "Welcome Login", - "description" : "", + "WelcomeLogin": { + "active": true, + "name": "Welcome Login", + "description": "", }, - "LoginType" : { - "active" : true, - "name" : "Login Type", - "description" : "", + "LoginType": { + "active": true, + "name": "Login Type", + "description": "", }, - "Login" : { - "active" : true, - "name" : "Login", - "description" : "", + "Login": { + "active": true, + "name": "Login", + "description": "", }, - "ForgotPassword" : { - "active" : true, - "name" : "Forgot Password", - "description" : "", + "ForgotPassword": { + "active": true, + "name": "Forgot Password", + "description": "", }, - "" : { - "active" : true, - "name" : "", - "description" : "", + "": { + "active": true, + "name": "", + "description": "", }, }; } - diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart index f4bf8b72..0ded8cc6 100644 --- a/lib/analytics/google-analytics.dart +++ b/lib/analytics/google-analytics.dart @@ -9,28 +9,32 @@ import 'package:flutter/services.dart'; class Singleton { const Singleton(); //Constant constructor - void hello() { print('Hello world'); } + void hello() { + print('Hello world'); + } } var analytics = FirebaseAnalytics(); -class GAnalytics{ +class GAnalytics { const GAnalytics(); static GAnalytics shared = const GAnalytics(); NavObserver navObserver() => NavObserver(); } -// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android -class NavObserver extends RouteObserver>{ - - _sendScreenView(PageRoute route) async{ - - log(String className){ +// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android +class NavObserver extends RouteObserver> { + _sendScreenView(PageRoute route) async { + log(String className) { var event = AnalyticEvents.get(className); - if(event.active){ - analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( (Object error) { - debugPrint('$FirebaseAnalyticsObserver: $error'); - }, + if (event.active != null) { + analytics + .setCurrentScreen( + screenName: event.flutterName(), screenClassOverride: className) + .catchError( + (Object error) { + debugPrint('$FirebaseAnalyticsObserver: $error'); + }, test: (Object error) { return error is PlatformException; }, @@ -38,25 +42,20 @@ class NavObserver extends RouteObserver>{ } } - if(route.settings.name != null && route.settings.name.isNotEmpty && route.settings.name != "null"){ + if (route.settings.name != null && + route.settings.name.isNotEmpty && + route.settings.name != "null") { var class_ = routes[route.settings.name](0); - if(class_ != null) - log(class_.toStringShort()); - - }else if(route is FadePage){ + if (class_ != null) log(class_.toStringShort()); + } else if (route is FadePage) { var class_ = route.page; - if(class_ != null) - log(class_.toStringShort()); - - }else if(route is MaterialPageRoute){ + if (class_ != null) log(class_.toStringShort()); + } else if (route is MaterialPageRoute) { var class_ = route.builder(null); - if (class_ != null) - log(class_.toStringShort()); - - }else{ + if (class_ != null) log(class_.toStringShort()); + } else { print(""); } - } @override @@ -82,4 +81,4 @@ class NavObserver extends RouteObserver>{ // _sendScreenView(previousRoute); // } } -} \ No newline at end of file +} diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index b08442d8..b0eda939 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -467,11 +467,10 @@ const Map localizedValues = { " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). " }, "parkingDescription": { - - "en": "Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).", - - "ar": "خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)." - + "en": + "Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).", + "ar": + "خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)." }, "checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"}, "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, @@ -1264,7 +1263,10 @@ const Map localizedValues = { "stretcher": {"en": "Stretcher", "ar": "نقالة"}, "none": {"en": "None", "ar": "لا شيء"}, "RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"}, - "Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"}, + "Rapid-Response-Team": { + "en": "Rapid Response Team", + "ar": "فريق الاستجابة السريع" + }, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, "bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"}, "transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"}, @@ -2058,4 +2060,16 @@ const Map localizedValues = { "ar": "يرجى قبول الشروط والأحكام للمتابعة" }, "type": {"en": "Type", "ar": "اكتب"}, + "info-ereferral": { + "en": + "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", + "ar": + "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المريض وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب ( قيد المعالجة ، مقبول أو مرفوض)" + }, + "er-consultation": { + "en": + "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.", + "ar": + "تتيح لك هذه الخدمة إجراء استشارة عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت" + }, }; diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart index e085e476..cd34fd70 100644 --- a/lib/core/viewModels/dashboard_view_model.dart +++ b/lib/core/viewModels/dashboard_view_model.dart @@ -2,8 +2,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; + import '../../locator.dart'; class DashboardViewModel extends BaseViewModel { @@ -13,7 +12,9 @@ class DashboardViewModel extends BaseViewModel { String get heightCm => _vitalSignService.heightCm; String booldType = "-"; - + DashboardViewModel() { + this.getPatientRadOrders(); + } // ToDoCountProviderModel toDoProvider = // Provider.of(AppGlobal.context); diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart index 9f4240fc..9007229a 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart @@ -2,13 +2,10 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -39,27 +36,28 @@ class _EReferralPageState extends State @override Widget build(BuildContext context) { return BaseView( - builder: (_, model, widget) => - AppScaffold( - isShowAppBar: true, - appBarTitle: "E-Referral", - description: "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", - imagesInfo: [ - ImagesInfo( - imageAr: 'assets/images/Wifi-AR.png', - imageEn: 'assets/images/wifi-EN.png', - isAsset: true) - ], - body: Scaffold( - extendBodyBehindAppBar: true, - appBar: PreferredSize( - preferredSize: Size.fromHeight(65.0), - child: Stack( - children: [ - Positioned( - bottom: 1, - left: 0, - right: 0, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).ereferral, + description: TranslationBase.of(context).eReferralInfo, + imagesInfo: [ + ImagesInfo( + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/ar/1.png', + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png', + ) + ], + body: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight(65.0), + child: Stack( + children: [ + Positioned( + bottom: 1, + left: 0, + right: 0, child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), child: Container( @@ -97,13 +95,19 @@ class _EReferralPageState extends State Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts(TranslationBase.of(context).newReferral, textAlign: TextAlign.center,), + child: Texts( + TranslationBase.of(context).newReferral, + textAlign: TextAlign.center, + ), ), ), Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts(TranslationBase.of(context).searchForReferrals , textAlign: TextAlign.center,), + child: Texts( + TranslationBase.of(context).searchForReferrals, + textAlign: TextAlign.center, + ), ), ), ], @@ -121,10 +125,8 @@ class _EReferralPageState extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - StartIndexForNewEReferral( - ), - SearchForReferralsPage( - ) + StartIndexForNewEReferral(), + SearchForReferralsPage() ], ), ) diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 355300c4..13955612 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -19,6 +19,7 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -157,7 +158,12 @@ class _AllHabibMedicalServiceState extends State { ServicesContainer( onTap: () { Navigator.pop(context); - widget.goToMyProfile(); + Navigator.push( + context, + FadePage( + page: MedicalProfilePage(), + ), + ); }, imageLocation: 'assets/images/new-design/my_file_bottom_bar.png', @@ -254,8 +260,7 @@ class _AllHabibMedicalServiceState extends State { ServicesContainer( onTap: () => Navigator.push( context, - FadePage( - page: EReferralPage()), + FadePage(page: EReferralPage()), ), imageLocation: 'assets/images/ereferral_service_icon.png', title: TranslationBase.of(context).ereferral, @@ -282,7 +287,7 @@ class _AllHabibMedicalServiceState extends State { title: TranslationBase.of(context).childVaccine, ), ServicesContainer( - onTap: (){ + onTap: () { Navigator.pop(context); LandingPage.shared.switchToDoFromHMGServices(); }, diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index a8cb5048..c918cae4 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; class CovidDrivethruLocation extends StatefulWidget { @override @@ -26,6 +27,7 @@ class _CovidDrivethruLocationState extends State { String projectLong = ""; String projectName = ""; String projectID = ""; + List imagesInfo = List(); ProjectViewModel projectViewModel; @@ -33,6 +35,13 @@ class _CovidDrivethruLocationState extends State { void initState() { WidgetsBinding.instance .addPostFrameCallback((_) => getProjectsList(context)); + + imagesInfo.add( + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'), + ); super.initState(); } @@ -42,6 +51,8 @@ class _CovidDrivethruLocationState extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).covidInfo, body: SingleChildScrollView( child: Container( margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), @@ -277,25 +288,24 @@ class _CovidDrivethruLocationState extends State { service .getCovidPaymentInformation(context, int.parse(projectID)) .then((res) { - GifLoaderDialogUtils.hideDialog(context); - if (res['MessageStatus'] == 1) { - setState(() { - covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson( - res['COVID19_PatientShare']); - print(covidPaymentInfoResponse.procedureNameField); - }); - Navigator.push( - context, - FadePage( - page: CovidPaymentDetails( - covidPaymentInfoResponse: covidPaymentInfoResponse, - projectID: int.parse(projectID), - ))); - } else {} - }) - .catchError((err) { - print(err); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + covidPaymentInfoResponse = + CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + print(covidPaymentInfoResponse.procedureNameField); }); + Navigator.push( + context, + FadePage( + page: CovidPaymentDetails( + covidPaymentInfoResponse: covidPaymentInfoResponse, + projectID: int.parse(projectID), + ))); + } else {} + }).catchError((err) { + print(err); + }); } getProjectsList(BuildContext context) { diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 3e51b668..7eb17b0d 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -40,16 +40,14 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => () async { - model.getPatientRadOrders(); - var user = await sharedPref.getObject(USER_PROFILE); - }, + onModelReady: (model) => () async {}, builder: (_, model, wi) => AppScaffold( isShowDecPage: false, isHelp: true, @@ -68,7 +66,9 @@ class _HomePageState extends State { height: 210, decoration: BoxDecoration( image: DecorationImage( - image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover), + image: ExactAssetImage( + 'assets/images/dashboard_top_bg.png'), + fit: BoxFit.cover), ), child: Stack( children: [ @@ -77,34 +77,43 @@ class _HomePageState extends State { left: 5, right: 5, child: Container( - width: MediaQuery.of(context).size.width * 0.8, + width: + MediaQuery.of(context).size.width * 0.8, child: Row( children: [ Expanded( child: Visibility( - visible: model.user.outSA == 1 ? false : true, + // visible: + // model.user.outSA == 1 + // ? false + // : true, child: Container( height: 125, padding: EdgeInsets.all(5), margin: EdgeInsets.all(5), decoration: BoxDecoration( image: DecorationImage( - image: - AssetImage("assets/images/new-design/covid_bg_transparent.png"), + image: AssetImage( + "assets/images/new-design/covid_bg_transparent.png"), fit: BoxFit.fill, ), - color: Colors.white.withOpacity(0.3), - borderRadius: BorderRadius.all(Radius.circular(5))), + color: Colors.white + .withOpacity(0.3), + borderRadius: BorderRadius.all( + Radius.circular(5))), child: Container( child: Column( children: [ Texts( - TranslationBase.of(context).covidTest, + TranslationBase.of(context) + .covidTest, color: Colors.white, fontWeight: FontWeight.w700, ), Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: + MainAxisAlignment + .spaceAround, children: [ Container( margin: EdgeInsets.only( @@ -116,36 +125,64 @@ class _HomePageState extends State { height: 45.0), ), Container( - margin: EdgeInsets.only(top: 5.0), + margin: EdgeInsets.only( + top: 5.0), child: Column( children: [ Texts( - TranslationBase.of(context).driveThru, - fontWeight: FontWeight.w700, - color: Colors.white, + TranslationBase.of( + context) + .driveThru, + fontWeight: + FontWeight + .w700, + color: + Colors.white, ), ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 5.0), ), - minWidth: MediaQuery.of(context).size.width * 0.15, + minWidth: MediaQuery.of( + context) + .size + .width * + 0.15, height: 25.0, - child: RaisedButton( - color: Colors.red[800], - textColor: Colors.white, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), + child: + RaisedButton( + color: Colors + .red[800], + textColor: + Colors + .white, + disabledTextColor: + Colors + .white, + disabledColor: + new Color( + 0xFFbcc2c4), onPressed: () { navigateToCovidDriveThru(); }, child: Center( child: Center( - child: Center( - child: Center( - child: Texts( - TranslationBase.of(context).bookNow, - fontWeight: FontWeight.w700, - color: Colors.white, + child: + Center( + child: + Center( + child: + Texts( + TranslationBase.of(context) + .bookNow, + fontWeight: + FontWeight.w700, + color: + Colors.white, ), ), ), @@ -166,14 +203,17 @@ class _HomePageState extends State { ), Expanded( child: InkWell( - onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())), + onTap: () => Navigator.push(context, + FadePage(page: LiveCareHome())), child: Container( height: 125, padding: EdgeInsets.all(15), margin: EdgeInsets.all(5), decoration: BoxDecoration( - color: Colors.white.withOpacity(0.3), - borderRadius: BorderRadius.all(Radius.circular(5))), + color: Colors.white + .withOpacity(0.3), + borderRadius: BorderRadius.all( + Radius.circular(5))), child: SvgPicture.asset( projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' @@ -189,15 +229,23 @@ class _HomePageState extends State { ], ), ), - Container(width: double.infinity, height: projectViewModel.isArabic ? 110 : 80) + Container( + width: double.infinity, + height: projectViewModel.isArabic ? 110 : 80) ], ), Positioned( top: 155, left: MediaQuery.of(context).size.width * - (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), + (MediaQuery.of(context).orientation == + Orientation.landscape + ? 0.02 + : 0.03), right: MediaQuery.of(context).size.width * - (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), + (MediaQuery.of(context).orientation == + Orientation.landscape + ? 0.02 + : 0.03), child: (!model.isLogin) ? Container( width: double.infinity, @@ -205,10 +253,14 @@ class _HomePageState extends State { decoration: BoxDecoration( color: HexColor('#A59E9E'), shape: BoxShape.rectangle, - border: Border.all(color: Colors.transparent, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(9)), + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), image: DecorationImage( - image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)), + image: ExactAssetImage( + 'assets/images/bg_graphic.png'), + fit: BoxFit.cover)), child: Container( margin: EdgeInsets.all(5), child: Column( @@ -224,30 +276,37 @@ class _HomePageState extends State { fontSize: 23, ), Texts( - TranslationBase.of(context).myMedicalFileSubTitle, + TranslationBase.of(context) + .myMedicalFileSubTitle, color: Colors.black, fontSize: 16, ), Align( - alignment: - projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, + alignment: projectViewModel.isArabic + ? Alignment.bottomLeft + : Alignment.bottomRight, child: InkWell( onTap: () { widget.goToMyProfile(); }, child: Container( - margin: EdgeInsets.only(left: 15, right: 15), + margin: EdgeInsets.only( + left: 15, right: 15), width: 90, height: 30, decoration: BoxDecoration( color: HexColor('#D81A2E'), shape: BoxShape.rectangle, - border: Border.all(color: Colors.transparent, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(0)), + border: Border.all( + color: Colors.transparent, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(0)), ), child: Center( child: Texts( - TranslationBase.of(context).viewMore, + TranslationBase.of(context) + .viewMore, color: Colors.white, fontWeight: FontWeight.w700, fontSize: 12, @@ -266,10 +325,14 @@ class _HomePageState extends State { decoration: BoxDecoration( color: HexColor('#A59E9E'), shape: BoxShape.rectangle, - border: Border.all(color: Colors.transparent, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(9)), + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), image: DecorationImage( - image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover), + image: ExactAssetImage( + 'assets/images/bg_graphic.png'), + fit: BoxFit.cover), ), child: Container( margin: EdgeInsets.all(5), @@ -277,51 +340,81 @@ class _HomePageState extends State { children: [ Row( children: [ - if (projectViewModel.user != null && model.isLogin) + if (projectViewModel.user != null && + model.isLogin) Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ SizedBox( height: 8, ), - model.user.cRSVerificationStatus == 2 + model.user.cRSVerificationStatus == + 2 ? Row( children: [ Texts( - model.user.firstName + " " + model.user.lastName, - color: Colors.grey[100], + model.user + .firstName + + " " + + model.user + .lastName, + color: Colors + .grey[100], bold: true, fontSize: 15, ), Container( - margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), + margin: EdgeInsets + .fromLTRB( + 8.0, + 0.0, + 8.0, + 0.0), child: SvgPicture.asset( "assets/images/new-design/verification_check.svg"), ), ], ) - : model.user.cRSVerificationStatus == 3 + : model.user.cRSVerificationStatus == + 3 ? Row( children: [ Texts( - model.user.firstName + " " + model.user.lastName, - color: Colors.grey[100], + model.user + .firstName + + " " + + model.user + .lastName, + color: Colors + .grey[100], bold: true, fontSize: 15, ), Container( - margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), - child: SvgPicture.asset( - "assets/images/new-design/pending.svg"), + margin: EdgeInsets + .fromLTRB( + 8.0, + 0.0, + 8.0, + 0.0), + child: SvgPicture + .asset( + "assets/images/new-design/pending.svg"), ), ], ) : Row( children: [ Texts( - model.user.firstName + " " + model.user.lastName, - color: Colors.grey[100], + model.user + .firstName + + " " + + model.user + .lastName, + color: Colors + .grey[100], bold: true, fontSize: 15, ), @@ -355,14 +448,17 @@ class _HomePageState extends State { decoration: BoxDecoration( color: HexColor('#D81A2E'), shape: BoxShape.rectangle, - border: Border.all(color: Colors.transparent, width: 0.5), + border: Border.all( + color: Colors.transparent, + width: 0.5), borderRadius: BorderRadius.all( Radius.circular(5), ), ), child: Center( child: Texts( - TranslationBase.of(context).myMedicalFile, + TranslationBase.of(context) + .myMedicalFile, color: Colors.white, fontSize: 12, textAlign: TextAlign.center, @@ -401,8 +497,10 @@ class _HomePageState extends State { width: 25, height: 40, ), - Texts('${model.weightKg} ${TranslationBase.of(context).kg}', - color: Colors.white, fontSize: 17) + Texts( + '${model.weightKg} ${TranslationBase.of(context).kg}', + color: Colors.white, + fontSize: 17) ], ), ), @@ -417,7 +515,9 @@ class _HomePageState extends State { width: 35, height: 40, ), - Texts('${model.booldType}', color: Colors.white, fontSize: 17) + Texts('${model.booldType}', + color: Colors.white, + fontSize: 17) ], ), ), @@ -431,10 +531,12 @@ class _HomePageState extends State { ], ), Padding( - padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15), + padding: + const EdgeInsets.only(bottom: 15, right: 15, left: 15), child: InkWell( onTap: () { - Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage())); + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => PackagesHomePage())); }, child: Container( decoration: BoxDecoration( @@ -462,126 +564,132 @@ class _HomePageState extends State { if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67)) - if (model.user.outSA == 0) - Container( - margin: EdgeInsets.only(left: 15, right: 15), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - if (projectViewModel.havePrivilege(64)) - DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: HomeHealthCarePage(), - ), - ); - }, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/home_health_care_icon.png', - width: 50, - height: 50, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context).homeHealthCare, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.55, - ) - ], - ), + // if (model.user.outSA == 0) + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + if (projectViewModel.havePrivilege(64)) + DashboardItem( + onTap: () { + Navigator.push( + context, + FadePage( + page: HomeHealthCarePage(), + ), + ); + }, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/home_health_care_icon.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context) + .homeHealthCare, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: + SizeConfig.textMultiplier * 1.55, + ) + ], ), ), - height: MediaQuery.of(context).size.width * 0.4, - imageName: 'home_healthcare_service_bg.png', - opacity: 0.5, ), - if (projectViewModel.havePrivilege(65)) - DashboardItem( - onTap: () => getPharmacyToken(model), - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/pharmacy_logo.png', - width: 40, - height: 40, - ), - SizedBox( - height: 20, - ), - Texts( - TranslationBase.of(context).onlinePharmacy, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.55, - ) - ], - ), + height: MediaQuery.of(context).size.width * 0.4, + imageName: 'home_healthcare_service_bg.png', + opacity: 0.5, + ), + if (projectViewModel.havePrivilege(65)) + DashboardItem( + onTap: () => getPharmacyToken(model), + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/pharmacy_logo.png', + width: 40, + height: 40, + ), + SizedBox( + height: 20, + ), + Texts( + TranslationBase.of(context) + .onlinePharmacy, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: + SizeConfig.textMultiplier * 1.55, + ) + ], ), ), - height: MediaQuery.of(context).size.width * 0.4, - imageName: 'al-habib_onlne_pharmacy_bg.png', ), - if (projectViewModel.havePrivilege(67)) - DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: CMCPage(), - ), - ); - }, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/comprehensive_medical_checkup_logo.png', - width: 50, - height: 50, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context).cmcHeading, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier * 1.55, - ) - ], - ), + height: MediaQuery.of(context).size.width * 0.4, + imageName: 'al-habib_onlne_pharmacy_bg.png', + ), + if (projectViewModel.havePrivilege(67)) + DashboardItem( + onTap: () { + Navigator.push( + context, + FadePage( + page: CMCPage(), + ), + ); + }, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/comprehensive_medical_checkup_logo.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).cmcHeading, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: + SizeConfig.textMultiplier * 1.55, + ) + ], ), ), - height: MediaQuery.of(context).size.width * 0.4, - color: HexColor("#747C80"), - imageName: 'emergency_service_image.png', ), - ], - ), + height: MediaQuery.of(context).size.width * 0.4, + color: HexColor("#747C80"), + imageName: 'emergency_service_image.png', + ), + ], ), + ), SizedBox( height: 8, ), InkWell( - onTap: () => Navigator.push(context, FadePage(page: PaymentService())), + onTap: () => + Navigator.push(context, FadePage(page: PaymentService())), child: Container( margin: EdgeInsets.only(left: 15, right: 15), child: Row( @@ -602,7 +710,8 @@ class _HomePageState extends State { height: 5, ), Texts( - TranslationBase.of(context).onlinePaymentService, + TranslationBase.of(context) + .onlinePaymentService, textAlign: TextAlign.center, color: Colors.black87, bold: false, @@ -633,7 +742,8 @@ class _HomePageState extends State { height: 10, ), Texts( - TranslationBase.of(context).offersAndPackages, + TranslationBase.of(context) + .offersAndPackages, textAlign: TextAlign.center, color: Colors.black87, bold: false, @@ -673,11 +783,13 @@ class _HomePageState extends State { height: 10, ), Texts( - TranslationBase.of(context).emergencyServices, + TranslationBase.of(context) + .emergencyServices, textAlign: TextAlign.center, color: Colors.black87, bold: false, - fontSize: SizeConfig.textMultiplier * 1.7, + fontSize: + SizeConfig.textMultiplier * 1.7, ) ], ), @@ -715,7 +827,8 @@ class _HomePageState extends State { fontWeight: FontWeight.normal, ), Texts( - TranslationBase.of(context).viewAllHabibMedicalService, + TranslationBase.of(context) + .viewAllHabibMedicalService, color: Colors.white, fontWeight: FontWeight.normal, fontSize: 10, @@ -736,13 +849,15 @@ class _HomePageState extends State { opacity: 0.5, color: Colors.grey[700], width: MediaQuery.of(context).size.width * 0.45, - onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())), + onTap: () => Navigator.push( + context, FadePage(page: AllHabibMedicalService())), ), DashboardItem( onTap: () { // Navigator.push( // context, FadePage(page: FeedbackHomePage())); - Navigator.push(context, FadePage(page: ContactUsPage())); + Navigator.push( + context, FadePage(page: ContactUsPage())); }, child: Container( width: double.infinity, @@ -864,8 +979,10 @@ class DashboardItem extends StatelessWidget { ? DecorationImage( image: ExactAssetImage('assets/images/$imageName'), fit: BoxFit.cover, - colorFilter: - hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, + colorFilter: hasColorFilter + ? new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn) + : null, ) : null, ), diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart index bbad8d4c..d74dd6c8 100644 --- a/lib/pages/livecare/livecare_home.dart +++ b/lib/pages/livecare/livecare_home.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; class LiveCareHome extends StatefulWidget { static bool showFooterButton = true; @@ -21,6 +22,7 @@ class _LiveCareHomeState extends State bool isDataLoaded = false; bool hasLiveCareRequest = false; + List imagesInfo = List(); List erRequestHistoryList; @@ -32,7 +34,11 @@ class _LiveCareHomeState extends State erRequestHistoryList = List(); pendingERRequestHistoryList = new ErRequestHistoryList(); - + imagesInfo.add(ImagesInfo( + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/en/0.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png')); WidgetsBinding.instance.addPostFrameCallback((_) { if (!isDataLoaded) getLiveCareHistory(); }); @@ -45,6 +51,8 @@ class _LiveCareHomeState extends State return AppScaffold( appBarTitle: "LiveCare", isShowAppBar: true, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).erConsultation, body: Container( child: Column(children: [ /// this is will not colored with theme data diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index c5da90d5..1c0fd13e 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -64,11 +64,6 @@ class _Login extends State { void initState() { // getDeviceToken(); super.initState(); - - if(BASE_URL.contains("uat.")){ - nationalIDorFile.text = "1231755"; - mobileNumberController.text = mobileNo = "537503378"; - } } getDeviceToken() async { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index f1a7f0b5..b26982dd 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1161,7 +1161,8 @@ class TranslationBase { String get stretcher => localizedValues['stretcher'][locale.languageCode]; String get none => localizedValues['none'][locale.languageCode]; String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode]; - String get RapidResponseTeam => localizedValues['Rapid-Response-Team'][locale.languageCode]; + String get RapidResponseTeam => + localizedValues['Rapid-Response-Team'][locale.languageCode]; String get rrtService => localizedValues['rrtService'][locale.languageCode]; String get billAmount => localizedValues['bill-amount'][locale.languageCode]; String get transportMethod => @@ -1649,6 +1650,10 @@ class TranslationBase { String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; String get type => localizedValues["type"][locale.languageCode]; + String get eReferralInfo => + localizedValues["info-ereferral"][locale.languageCode]; + String get erConsultation => + localizedValues["er-consultation"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { From d6fd03b571b0d8ea9dd8f15d7aa2178a46029e49 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 5 Aug 2021 14:51:27 +0300 Subject: [PATCH 03/12] CONFIG --- lib/config/config.dart | 401 ++++++++++++------- lib/widgets/in_app_browser/InAppBrowser.dart | 58 +-- 2 files changed, 297 insertions(+), 162 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index da6defa6..3f84175d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.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/'; +//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 = 'https://mdlaboratories.com/exacartapi/api/'; +const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; @@ -33,7 +33,8 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; // Delivery Driver -const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; +const DRIVER_LOCATION = + 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; //weather const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; @@ -41,36 +42,51 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; // Wifi Credentials -const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; +const WIFI_CREDENTIALS = + "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_MY_DOCTOR = + 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; -const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; +const GET_DOCTOR_RATING_NOTES = + 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +const GET_DOCTOR_RATING_DETAILS = + 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; ///Prescriptions const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +const GET_PRESCRIPTIONS_ALL_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PRESCRIPTION_REPORT = + 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +const SEND_PRESCRIPTION_EMAIL = + 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +const GET_PRESCRIPTION_REPORT_ENH = + 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; -const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; -const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const GET_Patient_LAB_SPECIAL_RESULT = + 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = + 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_RESULT = + 'Services/Patients.svc/REST/GetPatientLabResults'; +const GET_Patient_LAB_ORDERS_RESULT = + 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; /// const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; +const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = + 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +const GET_PATIENT_ORDERS_DETAILS = + 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; +const SEND_RAD_REPORT_EMAIL = + 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; @@ -79,23 +95,32 @@ const GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory'; ///VITAL SIGN -const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN = + 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; +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_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 = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_AMBULANCE_REQUEST = + 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +const GET_PATIENT_ALL_PRES_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = + 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +const UPDATE_PRESS_ORDER = + 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +const INSERT_ER_INERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; ///FindUs const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; @@ -104,13 +129,15 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; ///babyInformation -const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; +const GET_BABYINFORMATION_REQUEST = + 'Services/Community.svc/REST/GetBabyByUserID'; ///Get Baby By User ID const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; +const GET_USERINFORMATION_REQUEST = + 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; @@ -132,21 +159,29 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; +const GET_BLOOD_REQUEST = + 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; -const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const SAVE_BLOOD_REQUEST = + 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; -const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const GET_BLOOD_AGREEMENT = + 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +const SAVE_BLOOD_AGREEMENT = + 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +const INSERT_REQUEST_FOR_MEDICAL_REPORT = + 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +const SEND_MEDICAL_REPORT_EMAIL = + 'Services/Notifications.svc/REST/SendMedicalReportEmail'; ///Rate -const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +const IS_LAST_APPOITMENT_RATED = + 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; +const GET_APPOINTMENT_DETAILS_BY_NO = + 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; @@ -158,7 +193,8 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; +const GET_ACTIVE_APPOINTMENTS_LIST_URL = + "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; @@ -167,87 +203,118 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; +const GET_DENTAL_DOCTORS_LIST_URL = + "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; +const INSERT_SPECIFIC_APPOINTMENT = + "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; +const GET_PATIENT_SHARE = + "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +const GET_PATIENT_APPOINTMENT_HISTORY = + "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; -const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; +const SEND_REPORT_EYE_EMAIL = + "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; -const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; +const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = + "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; //URL to get patient appointment curfew history -const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; +const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = + "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; //URL to confirm appointment -const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; +const CONFIRM_APPOINTMENT = + "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; +const INSERT_VIDA_REQUEST = + "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; +const GENERATE_QR_APPOINTMENT = + "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; +const EMAIL_QR_APPOINTMENT = + "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; +const CHECK_PAYMENT_STATUS = + "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +const HIS_CREATE_ADVANCE_PAYMENT = + "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; +const ADD_ADVANCE_NUMBER_REQUEST = + 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; +const IS_ALLOW_ASK_DOCTOR = + 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_CALL_REQUEST_TYPE = + 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +const ADD_VIDA_REQUEST = + 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; +const GET_LIVECARE_CLINICS = + 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; +const GET_LIVECARE_SCHEDULE_CLINICS = + 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; +const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = + 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; +const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = + 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; +const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = + 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; const GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; +const GET_LIVECARE_CLINIC_TIMING = + 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +const GET_ER_APPOINTMENT_FEES = + 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; +const ADD_NEW_CALL_FOR_PATIENT_ER = + 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; +const GET_LIVECARE_HISTORY = + 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +const CANCEL_LIVECARE_REQUEST = + 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +const SEND_LIVECARE_INVOICE_EMAIL = + 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; -const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; +const UPDATE_HEALTH_TERMS = + 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; -const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; +const GET_PATIENT_HEALTH_STATS = + 'Services/Patients.svc/REST/Med_GetTransactionsSts'; -const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; +const SEND_CHECK_IN_NFC_REQUEST = + 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; //URL to get medicine and pharmacies list const CHANNEL = 3; @@ -268,16 +335,21 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2; const LANGUAGE_ID = 2; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; +const GET_PAtIENTS_INSURANCE = + "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +const GET_PAtIENTS_INSURANCE_UPDATED = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; +const GET_PATIENT_INSURANCE_DETAILS = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +const UPLOAD_INSURANCE_CARD = + 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; +const GET_PAtIENTS_INSURANCE_APPROVALS = + "Services/Patients.svc/REST/GetApprovalStatus"; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; @@ -287,57 +359,84 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = + 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +const GET_PATIENT_INFO_BY_ID = + 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = + 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; +const GET_COVID_DRIVETHRU_PROJECT_LIST = + 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +const GET_COVID_DRIVETHRU_PAYMENT_INFO = + 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +const GET_COVID_DRIVETHRU_FREE_SLOTS = + 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; const GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; ///Smartwatch Integration Services -const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +const GET_PATIENT_LAST_RECORD = + 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; ///My Trackers -const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; -const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; -const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; - -const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; - -const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; +const GET_DIABETIC_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +const GET_DIABTEC_RESULT = + 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; +const ADD_DIABTEC_RESULT = + 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; + +const GET_BLOOD_PRESSURE_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +const GET_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +const ADD_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; + +const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +const GET_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +const ADD_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; -const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; - -const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; - -const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; - -const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; - -const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; +const GET_CALL_INFO_HOURS_RESULT = + 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +const GET_CALL_REQUEST_TYPE_LOV = + 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; + +const UPDATE_DIABETIC_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +const SEND_AVERAGE_BLOOD_SUGAR_REPORT = + 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +const DEACTIVATE_DIABETIC_STATUS = + 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +const DEACTIVATE_BLOOD_PRESSURES_STATUS = + 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +const UPDATE_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = + 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = + 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +const UPDATE_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +const DEACTIVATE_WEIGHT_PRESSURE_RESULT = + 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; @@ -345,25 +444,35 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +const H2O_GET_USER_PROGRESS = + "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +const H2O_INSERT_USER_ACTIVITY = + "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +const H2O_GET_USER_DETAIL = + "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +const H2O_UPDATE_USER_DETAIL = + "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +const H2O_UNDO_USER_ACTIVITY = + "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; -const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +const GET_ALL_RELATIONSHIP_TYPES = + "Services/Patients.svc/REST/GetAllRelationshipTypes"; +const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = + 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = + 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; // Encillary Orders -const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; +const GET_ANCILLARY_ORDERS = + 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; -const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; +const GET_ANCILLARY_ORDERS_DETAILS = + 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; //Pharmacy wishlist // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; @@ -395,34 +504,50 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/"; const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; const ORDER_SHOPPING_CART = "orders"; -const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; -const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; -const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; -const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; +const GET_LACUM_ACCOUNT_INFORMATION = + "Services/Patients.svc/REST/GetLakumAccountInformation"; +const GET_LACUM_GROUP_INFORMATION = + "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +const LACUM_ACCOUNT_ACTIVATE = + "Services/Patients.svc/REST/LakumAccountActivation"; +const LACUM_ACCOUNT_DEACTIVATE = + "Services/Patients.svc/REST/LakumAccountDeactivation"; +const CREATE_LAKUM_ACCOUNT = + "Services/Patients.svc/REST/PHR_CreateLakumAccount"; +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 GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_MOST_VIEWED_PRODUCTS = "mostview?"; const GET_NEW_PRODUCTS = "newproducts?"; // Home Health Care -const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +const HHC_GET_ALL_SERVICES = + "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +const HHC_GET_ALL_CMC_SERVICES = + "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +const PATIENT_ER_UPDATE_PRES_ORDER = + "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +const GET_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +const GET_CMC_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_PATIENT_ALL_PRES_ORD = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const PATIENT_ER_INSERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; -const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const BLOOD_DONATION_REGISTER_BLOOD_TYPE = + 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = + 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; //Pharmacy wishlist const GET_WISHLIST = "shopping_cart_items/"; @@ -455,7 +580,8 @@ const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_FINAL_PRODUCTS = 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +const GET_DISEASE_BY_CLINIC_ID = + 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const TIMER_MIN = 10; @@ -471,7 +597,8 @@ const SCAN_QR_CODE = 'productbysku/'; const FILTERED_PRODUCTS = 'products?categoryids='; -const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; +const GET_DOCTOR_LIST_CALCULATION = + "Services/Doctors.svc/REST/GetCallculationDoctors"; class AppGlobal { static var context; diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 946876a7..e66b2eae 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -12,26 +12,28 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -enum _PAYMENT_TYPE{PACKAGES, PHARMACY, PATIENT} +enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT } var _InAppBrowserOptions = InAppBrowserClassOptions( - inAppWebViewGroupOptions: InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true)), + inAppWebViewGroupOptions: InAppWebViewGroupOptions( + crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true)), crossPlatform: InAppBrowserOptions(hideUrlBar: true), - ios: IOSInAppBrowserOptions(toolbarBottom: false,) -); + ios: IOSInAppBrowserOptions( + toolbarBottom: false, + )); class MyInAppBrowser extends InAppBrowser { _PAYMENT_TYPE paymentType; - 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 + // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - static String PREAUTH_SERVICE_URL = - 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT + static String SERVICE_URL = + 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String PREAUTH_SERVICE_URL = - // 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store + // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT + + static String PREAUTH_SERVICE_URL = + 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store // static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; @@ -40,9 +42,12 @@ class MyInAppBrowser extends InAppBrowser { 'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live // Packages - static String PACKAGES_REQUEST_PAYMENT_URL = '$EXA_CART_API_BASE_URL/checkout/OpcCompleteRedirectionPayment1'; - static String PACKAGES_PAYMENT_SUCCESS_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentSuccess'; - static String PACKAGES_PAYMENT_FAIL_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentFailed'; + static String PACKAGES_REQUEST_PAYMENT_URL = + '$EXA_CART_API_BASE_URL/checkout/OpcCompleteRedirectionPayment1'; + static String PACKAGES_PAYMENT_SUCCESS_URL = + '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentSuccess'; + static String PACKAGES_PAYMENT_FAIL_URL = + '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentFailed'; static List successURLS = [ 'success', @@ -71,7 +76,8 @@ class MyInAppBrowser extends InAppBrowser { static bool isPaymentDone = false; - MyInAppBrowser({this.onExitCallback, this.appo, this.onLoadStartCallback, this.context}); + MyInAppBrowser( + {this.onExitCallback, this.appo, this.onLoadStartCallback, this.context}); Future onBrowserCreated() async { print("\n\nBrowser Created!\n\n"); @@ -79,8 +85,7 @@ class MyInAppBrowser extends InAppBrowser { @override Future onLoadStart(String url) async { - if(onLoadStartCallback != null) - onLoadStartCallback(url); + if (onLoadStartCallback != null) onLoadStartCallback(url); } @override @@ -101,16 +106,18 @@ class MyInAppBrowser extends InAppBrowser { @override void onExit() { print("\n\nBrowser closed!\n\n"); - if(onExitCallback != null) - onExitCallback(appo, isPaymentDone); + if (onExitCallback != null) onExitCallback(appo, isPaymentDone); } @override - Future shouldOverrideUrlLoading(ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async { + Future shouldOverrideUrlLoading( + ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async { var url = shouldOverrideUrlLoadingRequest.url; debugPrint("redirecting/overriding to: $url"); - if(paymentType == _PAYMENT_TYPE.PACKAGES && [PACKAGES_PAYMENT_SUCCESS_URL,PACKAGES_PAYMENT_FAIL_URL].contains(url)){ + if (paymentType == _PAYMENT_TYPE.PACKAGES && + [PACKAGES_PAYMENT_SUCCESS_URL, PACKAGES_PAYMENT_FAIL_URL] + .contains(url)) { isPaymentDone = (url == PACKAGES_PAYMENT_SUCCESS_URL); close(); } @@ -140,9 +147,11 @@ class MyInAppBrowser extends InAppBrowser { } } - openPackagesPaymentBrowser({@required int customer_id, @required int order_id}){ + openPackagesPaymentBrowser( + {@required int customer_id, @required int order_id}) { paymentType = _PAYMENT_TYPE.PACKAGES; - var full_url = '$PACKAGES_REQUEST_PAYMENT_URL?customer_id=$customer_id&order_id=$order_id'; + var full_url = + '$PACKAGES_REQUEST_PAYMENT_URL?customer_id=$customer_id&order_id=$order_id'; this.openUrl(url: full_url, options: _InAppBrowserOptions); } @@ -182,7 +191,6 @@ class MyInAppBrowser extends InAppBrowser { clinicID, doctorID) .then((value) { - paymentType = _PAYMENT_TYPE.PATIENT; this.browser.openUrl(url: value, options: _InAppBrowserOptions); }); @@ -391,4 +399,4 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser { void onClosed() { print("ChromeSafari browser closed"); } -} \ No newline at end of file +} From b01961e45f941ee4aea45cecab97ae2d793c77f0 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 5 Aug 2021 15:42:02 +0300 Subject: [PATCH 04/12] fix translate issues --- .../my_trackers/blood_pressure/AddBloodPressurePage.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 98058bcf..5355a22f 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -48,8 +48,8 @@ class _AddBloodPressurePageState extends State { int measuredArm = 1; bool isButtonDisabled = false; final List measureTimeEnList = [ - 'Left arm ', - 'Right arm', + 'Left Arm ', + 'Right Arm', ]; final List measureTimeArList = [ 'الذراع الأيسر', @@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(!projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); + confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); }, child: Container( padding: EdgeInsets.all(12), From 8b8e239d3f3a4f2c10505c30a185fd2d38d97da2 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 8 Aug 2021 09:06:17 +0300 Subject: [PATCH 05/12] fix button --- .../blood_pressure/AddBloodPressurePage.dart | 70 ++++++------- .../blood_suger/AddBloodSugarPage.dart | 98 ++++++++++--------- 2 files changed, 88 insertions(+), 80 deletions(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 5355a22f..7547bc4e 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -224,40 +224,44 @@ class _AddBloodPressurePageState extends State { bottomSheet: Container( color: Colors.transparent, width: double.infinity, - height: MediaQuery.of(context).size.width * 0.2, - child: Padding( - padding: const EdgeInsets.all(15.0), - child: SecondaryButton( - loading: widget.model.state == ViewState.BusyLocal, - label: TranslationBase.of(context).save.toUpperCase(), - textColor: Colors.white, - color: isButtonDisabled ? Colors.grey[900] : Colors.grey, - onTap: () async { - if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) { - GifLoaderDialogUtils.showMyDialog(context); + height: MediaQuery.of(context).size.height * 0.10, + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + SecondaryButton( + loading: widget.model.state == ViewState.BusyLocal, + label: TranslationBase.of(context).save.toUpperCase(), + textColor: Colors.white, + color: isButtonDisabled ? Colors.grey[900] : Colors.grey, + onTap: () async { + if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); - widget.model - .addORUpdateDiabtecResult( - isUpdate: widget.isUpdate, - bloodPressureDate: - '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', - diastolicPressure: _bloodDiastolicValueController.text.toString(), - systolicePressure: _bloodSystolicValueController.text.toString(), - measuredArm: measuredArm, - ) - .then((value) { - GifLoaderDialogUtils.hideDialog(context); - if (widget.model.state == ViewState.BusyLocal) - AppToast.showErrorToast(message: widget.model.error); - else - Navigator.pop(context); - ; - }).catchError((e) { - GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: widget.model.error); - }); - } - }), + widget.model + .addORUpdateDiabtecResult( + isUpdate: widget.isUpdate, + bloodPressureDate: + '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', + diastolicPressure: _bloodDiastolicValueController.text.toString(), + systolicePressure: _bloodSystolicValueController.text.toString(), + measuredArm: measuredArm, + ) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model.state == ViewState.BusyLocal) + AppToast.showErrorToast(message: widget.model.error); + else + Navigator.pop(context); + ; + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: widget.model.error); + }); + } + }), + ], + ), ), ), ); diff --git a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart index 6d4755dc..075e107e 100644 --- a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart +++ b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart @@ -275,58 +275,62 @@ class _AddBloodSugarPageState extends State { bottomSheet: Container( color: Colors.transparent, width: double.infinity, - height: MediaQuery.of(context).size.width * 0.2, - child: Padding( - padding: const EdgeInsets.all(15.0), - child: SecondaryButton( - label: TranslationBase.of(context).save.toUpperCase(), - textColor: Colors.white, - color: isButtonDisabled ? Colors.grey[900] : Colors.grey, - onTap: () async { - if (_bloodSugarValueController.text.isNotEmpty) { - if (widget.isUpdate) { - GifLoaderDialogUtils.showMyDialog(context); - await widget.bloodSugarViewMode - .updateDiabtecResult( - month: bloodSugarDate, - hour: timeSugarDate, - diabtecUnit: measureUnitSelectedType, - measuredTime: measuredTime, - lineItemNo: widget.lineItemNo, - bloodSugerResult: - _bloodSugarValueController.text.toString()); + height: MediaQuery.of(context).size.height * 0.10, + child: Column( + children: [ + FractionallySizedBox( + widthFactor: 0.9, + child: SecondaryButton( + label: TranslationBase.of(context).save.toUpperCase(), + textColor: Colors.white, + color: isButtonDisabled ? Colors.grey[900] : Colors.grey, + onTap: () async { + if (_bloodSugarValueController.text.isNotEmpty) { + if (widget.isUpdate) { + GifLoaderDialogUtils.showMyDialog(context); + await widget.bloodSugarViewMode + .updateDiabtecResult( + month: bloodSugarDate, + hour: timeSugarDate, + diabtecUnit: measureUnitSelectedType, + measuredTime: measuredTime, + lineItemNo: widget.lineItemNo, + bloodSugerResult: + _bloodSugarValueController.text.toString()); - GifLoaderDialogUtils.hideDialog(context); - if (widget.bloodSugarViewMode.state == - ViewState.ErrorLocal) - AppToast.showErrorToast( - message: widget.bloodSugarViewMode.error); - else - Navigator.pop(context); + GifLoaderDialogUtils.hideDialog(context); + if (widget.bloodSugarViewMode.state == + ViewState.ErrorLocal) + AppToast.showErrorToast( + message: widget.bloodSugarViewMode.error); + else + Navigator.pop(context); - } else { - GifLoaderDialogUtils.showMyDialog(context); - await widget.bloodSugarViewMode - .addDiabtecResult( - diabtecUnit: measureUnitSelectedType, - measuredTime: measuredTime, - bloodSugerResult: - _bloodSugarValueController.text.toString(), - bloodSugerDateChart: - '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', - ); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await widget.bloodSugarViewMode + .addDiabtecResult( + diabtecUnit: measureUnitSelectedType, + measuredTime: measuredTime, + bloodSugerResult: + _bloodSugarValueController.text.toString(), + bloodSugerDateChart: + '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', + ); - GifLoaderDialogUtils.hideDialog(context); - if (widget.bloodSugarViewMode.state == ViewState.Error) - AppToast.showErrorToast( - message: widget.bloodSugarViewMode.error); - else - Navigator.pop(context); + GifLoaderDialogUtils.hideDialog(context); + if (widget.bloodSugarViewMode.state == ViewState.Error) + AppToast.showErrorToast( + message: widget.bloodSugarViewMode.error); + else + Navigator.pop(context); - } + } - } - }), + } + }), + ), + ], ), ), ); From 6ea06ce4424a63904c420d431b1483839c9d22ef Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 8 Aug 2021 14:18:35 +0300 Subject: [PATCH 06/12] PAP-729 --- .../my_trackers/blood_pressure/AddBloodPressurePage.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 98058bcf..e3d59ac4 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(!projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); + confirmSelectMeasureTimeDialog(!projectViewModel.isArabic ? measureTimeEnList : measureTimeArList); }, child: Container( padding: EdgeInsets.all(12), From 146fc5d2b290dc56cc4bca9f2cd8f5cda45437dc Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 8 Aug 2021 15:34:38 +0300 Subject: [PATCH 07/12] PAP-777 --- .../medical/reports/report_list_widget.dart | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart index 922fb239..ece69c0f 100644 --- a/lib/pages/medical/reports/report_list_widget.dart +++ b/lib/pages/medical/reports/report_list_widget.dart @@ -60,23 +60,29 @@ class ReportListWidget extends StatelessWidget { height: 12, ), Texts(reportList[index].projectName), - Texts(reportList[index].clinicDescription), + Container( + //height: MediaQuery.of(context).size.height * 0.07, + width: MediaQuery.of(context).size.width * 0.35, + child: Texts(reportList[index].clinicDescription), + ), Texts(TranslationBase.of(context).invoiceNo + ': ${reportList[index].invoiceNo}'), SizedBox(height: 12), ], ), reportList[index].status == 2 - ? Container( - margin: EdgeInsets.only(left: 15.0, right: 15.0), - child: InkWell( - onTap: () { - showConfirmMessage(reportList[index]); - // sendReportEmail(reportList[index]); - }, - child: Icon( - Icons.email, - color: Theme.of(context).primaryColor, - size: 30.0, + ? Expanded( + child: Container( + margin: EdgeInsets.only(left: 15.0, right: 15.0), + child: InkWell( + onTap: () { + showConfirmMessage(reportList[index]); + // sendReportEmail(reportList[index]); + }, + child: Icon( + Icons.email, + color: Theme.of(context).primaryColor, + size: 30.0, + ), ), ), ) From 7c398ba40d5ab894e156a85c0bced7da993d3ba6 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Mon, 9 Aug 2021 11:12:42 +0300 Subject: [PATCH 08/12] bug fix --- lib/config/config.dart | 11 +++-- lib/pages/landing/landing_page.dart | 49 ++++++++++--------- lib/pages/login/confirm-login.dart | 4 +- .../bottom_navigation/bottom_nav_bar.dart | 27 +++++----- 4 files changed, 50 insertions(+), 41 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b60a4b07..f8bca863 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; -//const BASE_URL = 'https://hmgwebservices.com/'; +//const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs //const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -124,7 +124,8 @@ const INSERT_ER_INERT_PRES_ORDER = /// ER RRT const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; -const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; +const GET_ALL_RRT_QUESTIONS = + 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; ///FindUs const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; @@ -333,7 +334,7 @@ const IS_DENTAL_ALLOWED_BACKEND = false; const PATIENT_TYPE = 1; const PATIENT_TYPE_ID = 1; var DEVICE_TOKEN = ""; -var IS_VOICE_COMMAND_CLOSED = false; +var IS_VOICE_COMMAND_CLOSED = true; var IS_TEXT_COMPLETED = false; var DeviceTypeID = Platform.isIOS ? 1 : 2; const LANGUAGE_ID = 2; @@ -353,7 +354,7 @@ const UPLOAD_INSURANCE_CARD = const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; const GET_PAtIENTS_INSURANCE_APPROVALS = - "Services/Patients.svc/REST/GetApprovalStatus"; + "Services/Patients.svc/REST/GetApprovalStatus_DWH"; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 9708db83..df0af1f3 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -59,7 +59,7 @@ class LandingPage extends StatefulWidget { @override _LandingPageState createState() => state = _LandingPageState(); - switchToDoFromHMGServices(){ + switchToDoFromHMGServices() { state.changeCurrentTab(4); } } @@ -99,7 +99,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { changeCurrentTab(int tab) { setState(() { - if(currentTab > 0 && tab == 2) + if (currentTab > 0 && tab == 2) pageController.jumpToPage(0); else if (tab != 0) pageController.jumpToPage(tab); @@ -111,8 +111,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { }); } - - @override void didChangeAppLifecycleState(AppLifecycleState state) { super.didChangeAppLifecycleState(state); @@ -164,9 +162,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); - //setState(() { + AppGlobal.context = context; - // }); + _requestIOSPermissions(); pageController = PageController(keepPage: true); _firebaseMessaging.setAutoInitEnabled(true); @@ -196,6 +194,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { if (token != null && DEVICE_TOKEN == "") { DEVICE_TOKEN = token; checkUserStatus(token); + if (projectViewModel.isLogin) + this.getNotificationCount(DEVICE_TOKEN); } }); if (results[Permission.location].isGranted) ; @@ -420,7 +420,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { authService .selectDeviceImei(DEVICE_TOKEN) .then((SelectDeviceIMEIRES value) { - this.getNotificationCount(DEVICE_TOKEN); GifLoaderDialogUtils.hideDialog(context); if (value != null) { setUserValues(value); @@ -444,23 +443,27 @@ class _LandingPageState extends State with WidgetsBindingObserver { var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); if (data != null) { - authService - .registeredAuthenticatedUser(data, token, 0, 0) - .then((res) => {print(res)}); + // authService + // .registeredAuthenticatedUser(data, token, 0, 0) + // .then((res) => {print(res)}); authService.getDashboard().then((value) => { - setState(() { - notificationCount = value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] > - 99 - ? '99+' - : value['List_PatientDashboard'][0] - ['UnreadPatientNotificationCount'] - .toString(); - - sharedPref.setString(NOTIFICATION_COUNT, notificationCount); - }) + if (value != null) + { + setState(() { + notificationCount = value['List_PatientDashboard'][0] + ['UnreadPatientNotificationCount'] > + 99 + ? '99+' + : value['List_PatientDashboard'][0] + ['UnreadPatientNotificationCount'] + .toString(); + + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + }) + } }); - familyFileProvider.getSharedRecordByStatus(); + + // familyFileProvider.getSharedRecordByStatus(); } } } @@ -576,7 +579,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { changeIndex: changeCurrentTab, index: currentTab, ), - floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked , + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0) ? FloatingButton( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 561089ff..bcbcf6cb 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -269,6 +269,7 @@ class _ConfirmLogin extends State { try { availableBiometrics = await auth.getAvailableBiometrics(); } on PlatformException catch (e) { + AppToast.showErrorToast(message: e.message); print(e); } if (!mounted) return; @@ -397,7 +398,8 @@ class _ConfirmLogin extends State { stickyAuth: true, iOSAuthStrings: iosStrings); } on PlatformException catch (e) { - AppToast.showErrorToast(message: e.toString()); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: 'Please enable your Touch or Face ID'); } if (authenticated == true) { diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index 76819533..7c0c69d4 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -22,7 +22,9 @@ class BottomNavBar extends StatefulWidget { final ValueChanged changeIndex; final int index; final bool showHomeIcon; - BottomNavBar({Key key, this.changeIndex, this.index, this.showHomeIcon = false}) : super(key: key); + BottomNavBar( + {Key key, this.changeIndex, this.index, this.showHomeIcon = false}) + : super(key: key); @override _BottomNavBarState createState() => _BottomNavBarState(); @@ -75,7 +77,7 @@ class _BottomNavBarState extends State { Expanded( child: (widget.showHomeIcon) ? SizedBox( - child: BottomNavigationItem( + child: BottomNavigationItem( icon: Icons.home_outlined, activeIcon: Icons.home_outlined, changeIndex: _changeIndex, @@ -83,7 +85,7 @@ class _BottomNavBarState extends State { currentIndex: 2, name: TranslationBase.of(context).home, ), - ) + ) : SizedBox( height: 50, child: Column( @@ -104,15 +106,16 @@ class _BottomNavBarState extends State { currentIndex: 0, name: TranslationBase.of(context).home, ), - // BottomNavigationItem( - // icon: EvaIcons.calendar, - // activeIcon: EvaIcons.calendar, - // changeIndex: _changeIndex, - // index: _index, - // currentIndex: 2, - // name: TranslationBase.of(context).bookAppo, - // ), - if (/*widget.index == 0 && */projectViewModel.havePrivilege(34)) + // BottomNavigationItem( + // icon: EvaIcons.calendar, + // activeIcon: EvaIcons.calendar, + // changeIndex: _changeIndex, + // index: _index, + // currentIndex: 2, + // name: TranslationBase.of(context).bookAppo, + // ), + if (/*widget.index == 0 && */ projectViewModel + .havePrivilege(34)) BottomNavigationItem( icon: EvaIcons.calendar, activeIcon: EvaIcons.calendar, From e5fb16ad69dafc0237e662fbf995d43431717560 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Mon, 9 Aug 2021 12:39:50 +0300 Subject: [PATCH 09/12] langauge issue --- lib/pages/DrawerPages/family/my-family.dart | 1 - lib/widgets/drawer/app_drawer_widget.dart | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 32aaaf45..7493dfc1 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -737,7 +737,6 @@ class _MyFamily extends State with TickerProviderStateMixin { } this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setObject(MAIN_USER, mainUser); - this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 73453bf8..c97fdc9a 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -504,7 +504,9 @@ class _AppDrawerState extends State { await authenticatedUserObject.getUser(); _vitalSignService.heightCm = ""; _vitalSignService.weightKg = ""; + var appLanguage = await sharedPref.getString(APP_LANGUAGE); await sharedPref.clear(); + await sharedPref.setString(APP_LANGUAGE, appLanguage); this.user = null; Navigator.of(context).pushNamed(HOME); // projectProvider.platformBridge().unRegisterHmgGeofences(); From 29249dc9a9d9c2b8edca2493fa74c25f25ae047a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 9 Aug 2021 13:34:01 +0300 Subject: [PATCH 10/12] PAP-664 --- .../health_calculator/body_fat/body_fat.dart | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index 0ce34e42..a169de0b 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -45,6 +45,10 @@ class _BodyFatState extends State { String dropdownValue; double calories = 0; String textResult = ''; + TextEditingController heightController = TextEditingController(); + TextEditingController neckController = TextEditingController(); + TextEditingController waistController = TextEditingController(); + TextEditingController hipController = TextEditingController(); void updateColorHeight(int type) { //MG/DLT card @@ -310,7 +314,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(heightCm.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: heightController, + decoration: InputDecoration( + labelText: heightCm.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( @@ -476,7 +488,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(neck.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: neckController, + decoration: InputDecoration( + labelText: neck.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( @@ -642,7 +662,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(waist.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: waistController, + decoration: InputDecoration( + labelText: waist.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( @@ -808,7 +836,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(hip.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: hipController, + decoration: InputDecoration( + labelText: hip.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( From 352fd912de1acbbfcfe7ad5eae8a43fe7c1faa47 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 9 Aug 2021 14:05:49 +0300 Subject: [PATCH 11/12] PAP-664 --- .../health_calculator/body_fat/body_fat.dart | 76 +++++++++++-------- 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index a169de0b..7f0d0c5c 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -314,14 +314,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: heightController, - decoration: InputDecoration( - labelText: heightCm.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: heightController, + decoration: InputDecoration( + labelText: heightCm.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), ), @@ -488,14 +491,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: neckController, - decoration: InputDecoration( - labelText: neck.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: neckController, + decoration: InputDecoration( + labelText: neck.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), ), @@ -662,14 +668,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: waistController, - decoration: InputDecoration( - labelText: waist.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: waistController, + decoration: InputDecoration( + labelText: waist.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), ), @@ -836,14 +845,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: hipController, - decoration: InputDecoration( - labelText: hip.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: hipController, + decoration: InputDecoration( + labelText: hip.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), ), From 02df6f4d853281068b75c77e1c39c184fd4d7028 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 9 Aug 2021 14:29:32 +0300 Subject: [PATCH 12/12] PAP-664 --- .../my_trackers/blood_pressure/AddBloodPressurePage.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 37eb3529..1b8f70e3 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -235,7 +235,8 @@ class _AddBloodPressurePageState extends State { textColor: Colors.white, color: isButtonDisabled ? Colors.grey[900] : Colors.grey, onTap: () async { - if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) { + if (_bloodSystolicValueController.text.isNotEmpty && + _bloodDiastolicValueController.text.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); widget.model