From c3d5c35f1f5b4b73be915d6ea72fb6d3ee006f8a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 13 Jul 2026 15:15:05 +0300 Subject: [PATCH 1/5] Updates --- ios/GoogleService-Info.plist | 20 ++----- ios/Podfile | 2 +- ios/Runner/GoogleService-Info.plist | 32 ++++------ lib/config/config.dart | 3 +- lib/core/service/client/base_app_client.dart | 2 +- lib/pages/insurance/insurance_page.dart | 4 +- lib/pages/login/confirm-login.dart | 60 +++++++++---------- lib/pages/medical/allergies_page.dart | 2 +- .../prescription_details_inp.dart | 6 +- .../prescription_items_page.dart | 2 +- lib/widgets/in_app_browser/InAppBrowser.dart | 3 +- pubspec.yaml | 6 +- 12 files changed, 65 insertions(+), 77 deletions(-) diff --git a/ios/GoogleService-Info.plist b/ios/GoogleService-Info.plist index 633037cb..382b4d06 100644 --- a/ios/GoogleService-Info.plist +++ b/ios/GoogleService-Info.plist @@ -2,24 +2,18 @@ - CLIENT_ID - 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com - REVERSED_CLIENT_ID - com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt - ANDROID_CLIENT_ID - 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com API_KEY - AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA + AIzaSyBSlC2DpoYFRS7N99Sm31kUj_Ikezsz2e8 GCM_SENDER_ID - 815750722565 + 768176874884 PLIST_VERSION 1 BUNDLE_ID - com.HMG.HMG-Smartphone + com.redseaglobal.redseahealth PROJECT_ID - api-project-815750722565 + red-sea-health---patient STORAGE_BUCKET - api-project-815750722565.appspot.com + red-sea-health---patient.firebasestorage.app IS_ADS_ENABLED IS_ANALYTICS_ENABLED @@ -31,8 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:815750722565:ios:328ec247a81a2ca23c186c - DATABASE_URL - https://api-project-815750722565.firebaseio.com + 1:768176874884:ios:e981d28ce58399b9dca9d1 \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile index 87d62e9b..944c0bb5 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -64,7 +64,7 @@ post_install do |installer| File.open(xcconfig_path, "w") { |file| file << xcconfig_mod } if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' - build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' + build_configuration.build_settings['DEVELOPMENT_TEAM'] = '64C4BL5J6N' end if target.name == 'MapboxMobileEvents' `xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents -o Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents` diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist index c179ec60..382b4d06 100644 --- a/ios/Runner/GoogleService-Info.plist +++ b/ios/Runner/GoogleService-Info.plist @@ -2,37 +2,29 @@ - CLIENT_ID - 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com - REVERSED_CLIENT_ID - com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt - ANDROID_CLIENT_ID - 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com API_KEY - AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA + AIzaSyBSlC2DpoYFRS7N99Sm31kUj_Ikezsz2e8 GCM_SENDER_ID - 815750722565 + 768176874884 PLIST_VERSION 1 BUNDLE_ID - com.HMG.HMG-Smartphone + com.redseaglobal.redseahealth PROJECT_ID - api-project-815750722565 + red-sea-health---patient STORAGE_BUCKET - api-project-815750722565.appspot.com + red-sea-health---patient.firebasestorage.app IS_ADS_ENABLED - + IS_ANALYTICS_ENABLED - + IS_APPINVITE_ENABLED - + IS_GCM_ENABLED - + IS_SIGNIN_ENABLED - + GOOGLE_APP_ID - 1:815750722565:ios:328ec247a81a2ca23c186c - DATABASE_URL - https://api-project-815750722565.firebaseio.com + 1:768176874884:ios:e981d28ce58399b9dca9d1 - + \ No newline at end of file diff --git a/lib/config/config.dart b/lib/config/config.dart index 70915eb7..8ca36300 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -706,7 +706,8 @@ var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDo var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var payFortEnvironment = FortEnvironment.production; -var applePayMerchantId = "merchant.com.hmgwebservices"; +// var applePayMerchantId = "merchant.com.hmgwebservices"; +var applePayMerchantId = "merchant.com.rsgwebservices.hmg.redseahealth"; // var payFortEnvironment = FortEnvironment.test; // var applePayMerchantId = "merchant.com.hmgwebservices.uat"; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index edce26ff..0f498787 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -187,7 +187,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 5690832; //4609100 + // body['PatientID'] = 10716; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index 3ec71a0f..28145947 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -40,7 +40,7 @@ class InsurancePage extends StatelessWidget { onTap: () { getDetails( setupID: '010266', - projectID: 15, + projectID: 425, patientIdentificationID: projectViewModel.user!.patientIdentificationNo!, //model.user.patientIdentificationNo, patientID: projectViewModel.user!.patientID!, @@ -99,7 +99,7 @@ class InsurancePage extends StatelessWidget { ? InkWell( onTap: () { getDetails( - projectID: 15, + projectID: 425, patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientIdenficationNumber!, setupID: '010266', patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].responseID!, diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 537aaafd..f866b9fd 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -709,37 +709,37 @@ class _ConfirmLogin extends State { } checkIfUserAgreedBefore(CheckActivationCode result) { - if (projectViewModel.havePrivilege(109)) { - this.authService.checkIfUserAgreed().then((result) { - if (result['IsPatientAlreadyAgreed']) { - goToHome(); - } else { - this.authService.getUserAgreementContent().then((result) { - GifLoaderDialogUtils.hideDialog(AppGlobal.context); - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: UserLoginAgreementPage( - userAgreementText: result['UserAgreementContent'], - authenticatedUserObject: authenticatedUserObject, - appointmentRateViewModel: appointmentRateViewModel, - selectedOption: selectedOption, - isArabic: projectViewModel.isArabic, - ), - ), - (r) => false); - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - }); - } - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - }); - } else { + // if (projectViewModel.havePrivilege(109)) { + // this.authService.checkIfUserAgreed().then((result) { + // if (result['IsPatientAlreadyAgreed']) { + // goToHome(); + // } else { + // this.authService.getUserAgreementContent().then((result) { + // GifLoaderDialogUtils.hideDialog(AppGlobal.context); + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: UserLoginAgreementPage( + // userAgreementText: result['UserAgreementContent'], + // authenticatedUserObject: authenticatedUserObject, + // appointmentRateViewModel: appointmentRateViewModel, + // selectedOption: selectedOption, + // isArabic: projectViewModel.isArabic, + // ), + // ), + // (r) => false); + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); + // } + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); + // } else { goToHome(); - } + // } // if (result.isNeedUserAgreement == true) { // // move to agreement page. diff --git a/lib/pages/medical/allergies_page.dart b/lib/pages/medical/allergies_page.dart index 599d91b0..2c0160e3 100644 --- a/lib/pages/medical/allergies_page.dart +++ b/lib/pages/medical/allergies_page.dart @@ -47,7 +47,7 @@ class AllergiesPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts(TranslationBase.of(context).remarks+" :"), + Texts(TranslationBase.of(context).remarks+" : " + model.allergies[index].remarks! ?? ''), Texts(TranslationBase.of(context).description + ": " + model.allergies[index].description! ?? ''), ], ), diff --git a/lib/pages/medical/prescriptions/prescription_details_inp.dart b/lib/pages/medical/prescriptions/prescription_details_inp.dart index 2742662b..08b4af66 100644 --- a/lib/pages/medical/prescriptions/prescription_details_inp.dart +++ b/lib/pages/medical/prescriptions/prescription_details_inp.dart @@ -134,8 +134,10 @@ class PrescriptionDetailsPageINP extends StatelessWidget { ), TableRow( children: [ - Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel), - Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel), + // Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(prescriptionReport?.route ?? '', isLast: true, mProjectViewModel: projectViewModel), + // Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(prescriptionReport?.frequency ?? '', isLast: true, mProjectViewModel: projectViewModel), Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), ], diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 70ce271a..f34db3c7 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -72,7 +72,7 @@ class PrescriptionItemsPage extends StatelessWidget { prescriptions.doctorRate, prescriptions.actualDoctorRate, prescriptions.noOfPatientsRate, - projectViewModel.user.emailAddress!, + projectViewModel.user.emailAddress ?? "", ), isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false, buttonTitle: TranslationBase.of(context).download, diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 692dfd5c..ff6b44f7 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -40,7 +40,8 @@ class MyInAppBrowser extends InAppBrowser { // 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 + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + static String SERVICE_URL = 'https://rsgwebservices.hmg.com/Payment/pages/RsgSendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS diff --git a/pubspec.yaml b/pubspec.yaml index 613c8bd8..b8bec549 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: diplomaticquarterapp description: A new Flutter application. -#version: 4.6.030+1 -version: 4.6.0984+40500984 +version: 0.0.1+1 +#version: 4.6.0984+40500984 environment: # sdk: ">=3.0.0 <3.13.0" @@ -95,7 +95,7 @@ dependencies: jiffy: ^6.2.1 #Flutter WebRTC - screen_brightness: ^2.1.5 +# screen_brightness: ^2.1.5 map_launcher: ^3.0.1 flutter_countdown_timer: ^4.1.0 carousel_slider: ^5.0.0 From 261a4a759133ab1adb6c01ed3812485698297ea1 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Wed, 15 Jul 2026 15:53:17 +0300 Subject: [PATCH 2/5] V4-60230 bug fix --- .../LineChartCurvedBloodPressure.dart | 25 +++++++++++++++++-- lib/widgets/charts/show_chart.dart | 5 ++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart index 2e1dcaa0..cf0a9df4 100644 --- a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart @@ -149,6 +149,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: AxisTitles( sideTitles: SideTitles( + showTitles: true, getTitlesWidget: (value, title) { TextStyle style = TextStyle( @@ -189,6 +190,16 @@ class LineChartCurvedBloodPressure extends StatelessWidget { // margin: 22, ), ), + topTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), + rightTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), leftTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, @@ -197,6 +208,16 @@ class LineChartCurvedBloodPressure extends StatelessWidget { // fontWeight: FontWeight.bold, // fontSize: 10, // ), + getTitlesWidget: (cxt, value) { + var style = TextStyle( + color: Colors.black, + fontSize: 9, + ); + return Text( + "${value.formattedValue}", + style: style, + ); + }, interval: getMaxY() - getMinY() <= 500 ? 50 : getMaxY() - getMinY() <= 1000 @@ -277,7 +298,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { spots: spots, isCurved: true, color: Colors.red, - barWidth: 1.5, + barWidth: 3, isStrokeCapRound: true, dotData: FlDotData( show: false, @@ -290,7 +311,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { spots: spots2, isCurved: true, color: Theme.of(context).primaryColor, - barWidth: 1.5, + barWidth: 3, isStrokeCapRound: true, dotData: FlDotData( show: false, diff --git a/lib/widgets/charts/show_chart.dart b/lib/widgets/charts/show_chart.dart index 729c21b5..461e9996 100644 --- a/lib/widgets/charts/show_chart.dart +++ b/lib/widgets/charts/show_chart.dart @@ -170,11 +170,10 @@ class ShowChart extends StatelessWidget { getTitlesWidget: (cxt, value) { var style = TextStyle( color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 10, + fontSize: 9, ); return Text( - "", + "${value.formattedValue}", style: style, ); }, From e76018ba2f048fed19d8263c8f53f5bf5eb1b800 Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Sun, 19 Jul 2026 11:25:06 +0300 Subject: [PATCH 3/5] update --- lib/main.dart | 3 +- lib/pages/login/confirm-login.dart | 2 +- lib/widgets/drawer/app_drawer_widget.dart | 12 +++---- lib/widgets/otp/sms-popup.dart | 44 ++++++++++++++++++----- 4 files changed, 44 insertions(+), 17 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 03ac65fc..1e9e01f1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -120,7 +120,7 @@ class _MyApp extends State { @override Widget build(BuildContext context) { PlatformBridge.init(context); - AppGlobal.context = context; + // Don't set AppGlobal.context here - it's set after MultiProvider is created // SystemChrome.setPreferredOrientations([ // DeviceOrientation.portraitUp, @@ -174,6 +174,7 @@ class _MyApp extends State { child: Consumer( builder: (context, projectProvider, child) => MaterialApp( builder: (context, mchild) { + AppGlobal.context = context; // Set context here after MultiProvider AppGlobal.projectViewModelContext = context; return MediaQuery( data: MediaQuery.of(context).copyWith( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 537aaafd..b6b9e449 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -180,7 +180,7 @@ class _ConfirmLogin extends State { // user!.editedOn != null // ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!)) // : - user!.createdOn != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--', + user!.createdOn != null && user!.createdOn !='null'? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), ), ], diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 45fd0275..3a6839d7 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -217,7 +217,7 @@ class _AppDrawerState extends State { children: [ (user!.isFamily == null || user!.isFamily == false) ? InkWell( - child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg"), + child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg", width: 20, height: 20), isImageIcon: true, bottomLine: false, textColor: CustomColors.black, @@ -259,7 +259,7 @@ class _AppDrawerState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( - child: SvgPicture.asset("assets/images/new/family_files.svg"), + child: SvgPicture.asset("assets/images/new/family_files.svg", width: 20, height: 20), ), Expanded( flex: 7, @@ -389,7 +389,7 @@ class _AppDrawerState extends State { children: [ DrawerItem( TranslationBase.of(context).notification, - SvgPicture.asset("assets/images/new/notifications.svg"), + SvgPicture.asset("assets/images/new/notifications.svg", width: 20, height: 20), isImageIcon: true, bottomLine: false, letterSpacing: -0.84, @@ -430,7 +430,7 @@ class _AppDrawerState extends State { ), if (projectProvider!.havePrivilege(3)) InkWell( - child: DrawerItem(TranslationBase.of(context).appsetting, SvgPicture.asset("assets/images/new/app_setting.svg"), + child: DrawerItem(TranslationBase.of(context).appsetting, SvgPicture.asset("assets/images/new/app_setting.svg", width: 20, height: 20), isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider), onTap: () { Navigator.of(context).pushNamed( @@ -452,7 +452,7 @@ class _AppDrawerState extends State { }, ), InkWell( - child: DrawerItem(TranslationBase.of(context).logout, SvgPicture.asset("assets/images/new/logout.svg"), + child: DrawerItem(TranslationBase.of(context).logout, SvgPicture.asset("assets/images/new/logout.svg", width: 20, height: 20), isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider), onTap: () { logout(); @@ -461,7 +461,7 @@ class _AppDrawerState extends State { ], ) : InkWell( - child: DrawerItem(TranslationBase.of(context).loginregister, SvgPicture.asset("assets/images/new/logout.svg"), + child: DrawerItem(TranslationBase.of(context).loginregister, SvgPicture.asset("assets/images/new/logout.svg", width: 20, height: 20), isImageIcon: true, letterSpacing: -0.84, fontSize: 14, bottomLine: false, projectProvider: projectProvider), onTap: () { login(); diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index 71738aba..01e6f0b0 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -32,6 +32,8 @@ class SMSOTP { static bool? _loading; + bool _isDialogActive = false; + SMSOTP( this.context, this.type, @@ -90,7 +92,12 @@ class SMSOTP { // } - return showDialog( + // Reset state for fresh dialog + _isDialogActive = true; + remainingTime = 120; + displayTime = ''; + + var result = await showDialog( context: context, barrierColor: Colors.black.withOpacity(0.63), builder: (context) { @@ -129,7 +136,10 @@ class SMSOTP { icon: Icon(Icons.close), constraints: BoxConstraints(), onPressed: () { - Navigator.pop(context); + _isDialogActive = false; + if (Navigator.canPop(context)) { + Navigator.pop(context); + } this.onFailure(); }, @@ -186,6 +196,11 @@ class SMSOTP { }), ); }); + + // Clean up when dialog is dismissed + _isDialogActive = false; + + return result; } TextStyle buildTextStyle() { @@ -263,27 +278,38 @@ class SMSOTP { } startTimer(setState) { + if (!_isDialogActive) return; // Don't proceed if dialog is no longer active + this.remainingTime--; - setState(() { - displayTime = this.getSecondsAsDigitalClock(this.remainingTime); - }); + // Check again before calling setState to ensure dialog is still active + if (_isDialogActive) { + setState(() { + displayTime = this.getSecondsAsDigitalClock(this.remainingTime); + }); + } timer = Future.delayed(Duration(seconds: 1), () { - if (this.remainingTime > 0) { + if (_isDialogActive && this.remainingTime > 0) { startTimer(setState); - } else { - Navigator.pop(context); + } else if (_isDialogActive && this.remainingTime <= 0) { + _isDialogActive = false; + if (Navigator.canPop(context)) { + Navigator.pop(context); + } } }); } static void hideSMSBox(context) { - Navigator.pop(context); + if (Navigator.canPop(context)) { + Navigator.pop(context); + } } _onOtpCallBack(String otpCode, bool isAutofill) { if (otpCode.length == 4) { + _isDialogActive = false; // Stop the timer when OTP is entered onSuccess(otpCode); } } From 454053905c0acfff75bb24974bc3f3b5760d0638 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 23 Jul 2026 11:28:43 +0300 Subject: [PATCH 4/5] updates --- lib/config/config.dart | 1 + lib/config/localized_values.dart | 1 - lib/core/service/client/base_app_client.dart | 2 +- lib/core/service/medical/labs_service.dart | 4 +- .../medical/prescriptions_service.dart | 84 ++++++++++++++----- .../medical/prescriptions_view_model.dart | 24 +++--- lib/pages/ToDoList/ToDo.dart | 2 +- .../prescription_items_page.dart | 34 ++++---- .../clinic_services/get_clinic_service.dart | 12 ++- lib/widgets/in_app_browser/InAppBrowser.dart | 3 +- 10 files changed, 113 insertions(+), 54 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 8ca36300..afd9e6de 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -96,6 +96,7 @@ var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +var SEND_PRESCRIPTION_EMAIL_NEW = 'Services/Notifications.svc/REST/SendPrescriptionEmail_New'; var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c85d3ef4..2ddd73e9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2291,7 +2291,6 @@ const Map localizedValues = { "liveCareTermsConditions28": {"en": "5.5 Telehealth Services is intended only for your own personal use and the use of your children under your supervision. You must not share your user access details (log-in name, password etc.) with any other person and must take reasonable steps to maintain the security of such details. Our services are delivered on the basis that we have certain information about the user, which may be connected to or obtained from your account details (age, gender, medical history etc.). We accept no responsibility whatsoever to you or any other person if our services are delivered via a user account to a person other than the registered user. This is particularly important for telehealth services, where the practitioner will need to assess the information, the patient provides during the consultation in the context of the patient’s medical file and history.", "ar": "5-5 خدمات الرعاية الصحية عن بُعد مخصصة فقط لاستخدامك الشخصي واستخدام أطفالك تحت إشرافك. يتعين عليك ألا تشارك بيانات تسجيل الدخول الخاصة بك (اسم المستخدم وكلمة المرور وما إلى ذلك) مع أي شخص آخر ويجب أن تتخذ خطوات معقولة للحفاظ على أمان هذه البيانات. يتم تقديم خدماتنا على أساس أن لدينا معلومات معينة حول المستخدم، والتي قد تكون مرتبطة أو تم الحصول عليها من تفاصيل حسابك (العمر والجنس والتاريخ الطبي وما إلى ذلك). نحن لا نتحمل أي مسؤولية من أي نوع تجاهك أو تجاه أي شخص آخر إذا تم تقديم خدماتنا عبر حساب مستخدم إلى شخص آخر غير المستخدم المسجل. هذا مهم بشكل خاص لخدمات الرعاية الصحية عن بعد، حيث سيحتاج الممارس الصحي إلى تقييم المعلومات التي يقدمها المريض أثناء الاستشارة في سياق الملف الطبي للمريض وتاريخه."}, "liveCareTermsConditions29": {"en": "5.6 You are responsible for ensuring you have a device connected to the internet and capable of transmitting and receiving video and sound. We are not responsible for any failure of a Telehealth Services session caused by your device or your internet connection. You are responsible for all costs associated with your own internet connection and use.", "ar": "5-6 أنت مسؤول عن التأكد من أن لديك جهازاً متصلاً بالإنترنت وقادراً على إرسال واستقبال الفيديو والصوت. نحن لسنا مسؤولين عن أي انقطاع في جلسة خدمات الرعاية الصحية عن بعد بسبب ناجم عن جهازك أو اتصالك بالإنترنت. أنت مسؤول عن جميع التكاليف المرتبطة باتصالك بالإنترنت واستخدامك لها."}, "liveCareTermsConditions30": {"en": "5.7 From time to time we may release updates to our Application and or the Website. You should ensure that you are running the latest version of the Application. Use of old versions of the Application may lead to technical errors in your use of the Telehealth Services and may expose you to additional security risks.", "ar": "5-7 قد نقوم من وقت لآخر بإصدار تحديثات لتطبيقنا و/أو موقع الويب الخاص بنا. يجب عليك التأكد من أنك تقوم بتشغيل أحدث إصدار من التطبيق. قد يؤدي استخدام الإصدارات القديمة من التطبيق إلى حدوث أخطاء فنية أثناء استخدامك لخدمات الرعاية الصحية عن بُعد وقد يعرضك ذلك لمخاطر أمنية إضافية."}, - "liveCareTermsHeading8": {"en": "6. TELEHEALTH SERVICES", "ar": "6. خدمات الرعاية الصحية عن بُعد"}, "liveCareTermsConditions31": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "}, "liveCareTermsHeading9": {"en": "7. CHARGES AND PAYMENT", "ar": "7. الأجور والسداد"}, diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 0f498787..957b3652 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -187,7 +187,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 10716; //4609100 + // body['PatientID'] = 10715; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 3f83a493..61fff9b2 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -231,9 +231,11 @@ class LabsService extends BaseService { _requestSendLabReportEmail.languageID = languageID; // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { - await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + // await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent']; + // labReportPDF = response['PdfContent']; } }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index 8becfb7e..e3e66e60 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -123,34 +123,80 @@ class PrescriptionsService extends BaseService { isDentalAllowedBackend: false, ); - Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient, bool isDownload) async { - _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList; - _requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP; - _requestSendPrescriptionEmail.appointmentDate = appointmentDate; - _requestSendPrescriptionEmail.patientID = patientID; - _requestSendPrescriptionEmail.clinicName = clinicName; - _requestSendPrescriptionEmail.doctorName = doctorName; - _requestSendPrescriptionEmail.projectID = projectID; - _requestSendPrescriptionEmail.to = user.emailAddress; - _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth; - _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo; - _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber; - _requestSendPrescriptionEmail.doctorID = doctorID; - _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!; - _requestSendPrescriptionEmail.setupID = user.setupID; - _requestSendPrescriptionEmail.to = user.emailAddress; - _requestSendPrescriptionEmail.isDownload = isDownload; + Future sendPrescriptionEmail(Prescriptions prescriptions, bool isDownload) async { + // _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList; + // _requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP; + // _requestSendPrescriptionEmail.appointmentDate = appointmentDate; + // _requestSendPrescriptionEmail.patientID = patientID; + // _requestSendPrescriptionEmail.clinicName = clinicName; + // _requestSendPrescriptionEmail.doctorName = doctorName; + // _requestSendPrescriptionEmail.projectID = projectID; + // _requestSendPrescriptionEmail.to = user.emailAddress; + // _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth; + // _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo; + // _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber; + // _requestSendPrescriptionEmail.doctorID = doctorID; + // _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!; + // _requestSendPrescriptionEmail.setupID = user.setupID; + // _requestSendPrescriptionEmail.to = user.emailAddress; + // _requestSendPrescriptionEmail.isDownload = isDownload; + + Map mapDevice = { + "AppointmentNo": prescriptions.appointmentNo, + "SetupID": prescriptions.setupID, + "EpisodeNo": prescriptions.episodeID, + "ClinicID": prescriptions.clinicID, + "ProjectID": prescriptions.projectID, + "DischargeNo": prescriptions.dischargeNo, + "IsDownload": true, + "To": user.emailAddress, + // "To": "amjad.haroon@cloudsolutions.com.sa", + "ClinicName": prescriptions.clinicDescription, + "DoctorName": prescriptions.doctorName, + }; + hasError = false; - await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) { + // await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) { + await baseAppClient.post(SEND_PRESCRIPTION_EMAIL_NEW, onSuccess: (response, statusCode) { if (isDownload) { prescriptionReportPDF = response["Base64Data"]; } }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: _requestSendPrescriptionEmail.toJson()); + // }, body: _requestSendPrescriptionEmail.toJson()); + }, body: mapDevice); } + // Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient, bool isDownload) async { + // _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList; + // _requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP; + // _requestSendPrescriptionEmail.appointmentDate = appointmentDate; + // _requestSendPrescriptionEmail.patientID = patientID; + // _requestSendPrescriptionEmail.clinicName = clinicName; + // _requestSendPrescriptionEmail.doctorName = doctorName; + // _requestSendPrescriptionEmail.projectID = projectID; + // _requestSendPrescriptionEmail.to = user.emailAddress; + // _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth; + // _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo; + // _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber; + // _requestSendPrescriptionEmail.doctorID = doctorID; + // _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!; + // _requestSendPrescriptionEmail.setupID = user.setupID; + // _requestSendPrescriptionEmail.to = user.emailAddress; + // _requestSendPrescriptionEmail.isDownload = isDownload; + // + // hasError = false; + // await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) { + // if (isDownload) { + // prescriptionReportPDF = response["Base64Data"]; + // } + // }, onFailure: (String error, int statusCode) { + // hasError = true; + // super.error = error; + // }, body: _requestSendPrescriptionEmail.toJson()); + // } + RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions( latitude: 0, longitude: 0, diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index 82c0282e..80b6d037 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -122,17 +122,19 @@ class PrescriptionsViewModel extends BaseViewModel { } sendPrescriptionEmail( - {required String appointmentDate, - required int patientID, - required String clinicName, - required String doctorName, - required int doctorID, - required String mes, - required int projectID, - required bool isInOutPatient, - required bool isDownload}) async { + // {required String appointmentDate, + // required int patientID, + // required String clinicName, + // required String doctorName, + // required int doctorID, + // required String mes, + // required int projectID, + // required bool isInOutPatient, + // required bool isDownload}) async + {required Prescriptions prescriptions, required bool isDownload}) async { setState(ViewState.BusyLocal); - await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient, isDownload); + // await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient, isDownload); + await _prescriptionsService.sendPrescriptionEmail(prescriptions, isDownload); if (_prescriptionsService.hasError) { error = _prescriptionsService.error!; setState(ViewState.ErrorLocal); @@ -148,7 +150,7 @@ class PrescriptionsViewModel extends BaseViewModel { } } } else { - AppToast.showSuccessToast(message: mes); + AppToast.showSuccessToast(message: ""); } // AppToast.showSuccessToast(message: mes); setState(ViewState.Idle); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index fa916910..3681c25a 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -1211,7 +1211,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { "Appointment check in", transID!, appo.projectID.toString(), - authenticatedUser.emailAddress!, + authenticatedUser.emailAddress ?? "Cust_${authenticatedUser.patientID}@HMG.com", paymentMethod[0]!, authenticatedUser.patientType, authenticatedUser.firstName!, diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index f34db3c7..8f638c53 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -83,14 +83,15 @@ class PrescriptionItemsPage extends StatelessWidget { // showConfirmMessage(context, model); GifLoaderDialogUtils.showMyDialog(context); await model.sendPrescriptionEmail( - appointmentDate: prescriptions.appointmentDate!, - patientID: prescriptions.patientID!, - clinicName: prescriptions.companyName!, - doctorName: prescriptions.doctorName!, - doctorID: prescriptions.doctorID!, - mes: TranslationBase.of(context).sendSuc, - projectID: prescriptions.projectID!, - isInOutPatient: prescriptions.isInOutPatient!, + prescriptions: prescriptions, + // appointmentDate: prescriptions.appointmentDate!, + // patientID: prescriptions.patientID!, + // clinicName: prescriptions.companyName!, + // doctorName: prescriptions.doctorName!, + // doctorID: prescriptions.doctorID!, + // mes: TranslationBase.of(context).sendSuc, + // projectID: prescriptions.projectID!, + // isInOutPatient: prescriptions.isInOutPatient!, isDownload: true); GifLoaderDialogUtils.hideDialog(context); }, @@ -445,14 +446,15 @@ class PrescriptionItemsPage extends StatelessWidget { email: projectViewModel.user!.emailAddress!, onTapSendEmail: () { model.sendPrescriptionEmail( - appointmentDate: prescriptions.appointmentDate!, - patientID: prescriptions.patientID!, - clinicName: prescriptions.companyName!, - doctorName: prescriptions.doctorName!, - doctorID: prescriptions.doctorID!, - mes: TranslationBase.of(context).sendSuc, - projectID: prescriptions.projectID!, - isInOutPatient: prescriptions.isInOutPatient!, + prescriptions: prescriptions, + // appointmentDate: prescriptions.appointmentDate!, + // patientID: prescriptions.patientID!, + // clinicName: prescriptions.companyName!, + // doctorName: prescriptions.doctorName!, + // doctorID: prescriptions.doctorID!, + // mes: TranslationBase.of(context).sendSuc, + // projectID: prescriptions.projectID!, + // isInOutPatient: prescriptions.isInOutPatient!, isDownload: true); }, ), diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 4737756c..494cf978 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -336,13 +336,19 @@ class ClinicListService extends BaseService { } Future getCurrentWeekIDAndDay(BuildContext context) async { + + Map request; + // request = {"ProjectID": projectID, "MealScheduleID": patientID}; + request = {}; + dynamic localRes; - await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async { + await baseAppClient.post(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { throw error; - }); - return localRes; + }, body: request); + // return localRes; + return Future.value(localRes); } Future getMealsOfScheduleID(int projectID, int admissionNo, int dietType, int weekID, int weekDay, context) async { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index ff6b44f7..40215897 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -41,7 +41,8 @@ class MyInAppBrowser extends InAppBrowser { // 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 - static String SERVICE_URL = 'https://rsgwebservices.hmg.com/Payment/pages/RsgSendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + // static String SERVICE_URL = 'https://rsgwebservices.hmg.com/Payment/pages/RsgSendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + static String SERVICE_URL = 'https://rsgpayment.hmg.com/pages/RsgSendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS From 3501fe42e9ce7aa05e388f7e97194b241a66bb9a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 25 Aug 2026 11:58:23 +0300 Subject: [PATCH 5/5] updates --- lib/pages/BookAppointment/BookingOptions.dart | 8 +-- .../components/SearchByClinic.dart | 2 +- .../components/SearchByDoctor.dart | 6 +- .../components/search_by_hospital_name.dart | 10 ++-- lib/pages/ToDoList/ToDo.dart | 1 + .../fragments/home_page_fragment2.dart | 2 +- .../syncHealthData.dart | 58 +++++++++---------- .../payfort_services/payfort_service.dart | 3 +- .../permission/permission_service.dart | 3 +- 9 files changed, 47 insertions(+), 46 deletions(-) diff --git a/lib/pages/BookAppointment/BookingOptions.dart b/lib/pages/BookAppointment/BookingOptions.dart index 791631dc..f65c8605 100644 --- a/lib/pages/BookAppointment/BookingOptions.dart +++ b/lib/pages/BookAppointment/BookingOptions.dart @@ -19,10 +19,10 @@ class _BookingOptionsState extends State { @override void initState() { - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance - .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + // locationUtils = + // new LocationUtils(isShowConfirmDialog: true, context: context); + // WidgetsBinding.instance + // .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); super.initState(); } diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 53bc10f2..82f12e22 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -70,7 +70,7 @@ class _SearchByClinicState extends State { @override void initState() { - locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context); + // locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); checkPVM(); super.initState(); diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 7676b3d4..ae4b2148 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -25,9 +25,9 @@ class _SearchByDoctorState extends State { @override void initState() { super.initState(); - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); - locationUtils.getCurrentLocation(); + // locationUtils = + // new LocationUtils(isShowConfirmDialog: true, context: context); + // locationUtils.getCurrentLocation(); _isButtonDisabled = true; } diff --git a/lib/pages/BookAppointment/components/search_by_hospital_name.dart b/lib/pages/BookAppointment/components/search_by_hospital_name.dart index b6b04e30..747920f3 100644 --- a/lib/pages/BookAppointment/components/search_by_hospital_name.dart +++ b/lib/pages/BookAppointment/components/search_by_hospital_name.dart @@ -51,8 +51,8 @@ class _SearchByHospitalState extends State { @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) { - locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); - locationUtils.getCurrentLocation(); + // locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + // locationUtils.getCurrentLocation(); getProjectsList(); }); } @@ -303,13 +303,13 @@ class _SearchByHospitalState extends State { GifLoaderDialogUtils.hideDialog(context); } else {} GifLoaderDialogUtils.hideDialog(context); - locationUtils.getCurrentLocation(); + // locationUtils.getCurrentLocation(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - locationUtils.getCurrentLocation(); + // locationUtils.getCurrentLocation(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - locationUtils.getCurrentLocation(); + // locationUtils.getCurrentLocation(); print(err); }); } diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 3681c25a..fa9cf041 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -631,6 +631,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { break; case 20: getPatientShare(context, appo); + // getAppoQR(context, appo); // checkPatientNphiesEligibility(context, appo); break; case 30: diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index b3985744..4550869f 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -54,7 +54,7 @@ class _HomePageFragment2State extends State { hmgServices.clear(); hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); - hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + // hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); // projectViewModel.isIndoorNavigationEnabled // ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, diff --git a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart index 6d6fdf4f..9622654e 100644 --- a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart +++ b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart @@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:flutter/material.dart'; -import 'package:health/health.dart'; +// import 'package:health/health.dart'; class syncHealthDataButton extends StatefulWidget { syncHealthDataButton(); @@ -21,7 +21,7 @@ class syncHealthDataButton extends StatefulWidget { } class _syncHealthDataButtonState extends State { - List _healthDataList = []; + // List _healthDataList = []; List Med_InsertTransactionsInputsList = []; List Med_InsertTransactionsInputsList2 = []; @@ -35,7 +35,7 @@ class _syncHealthDataButtonState extends State { int MedCategoryID = 0; // HealthFactory health = HealthFactory(); - List types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING]; + // List types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING]; @override void initState() { @@ -91,32 +91,32 @@ class _syncHealthDataButtonState extends State { // _healthDataList = HealthFactory.removeDuplicates(_healthDataList); - _healthDataList.forEach((x) { - if (x.type == HealthDataType.STEPS) { - Med_InsertTransactionsInputsList.add(healthData( - MedCategoryID: 6, - MedSubCategoryID: MedSubCategoryID, - MachineDate: DateUtil.convertDateToString(x.dateFrom), - Value: double.tryParse(x.value.toString()), - TransactionsListID: TransactionsListID++)); - } - if (x.type == HealthDataType.HEART_RATE) { - Med_InsertTransactionsInputsList.add(healthData( - MedCategoryID: 3, - MedSubCategoryID: MedSubCategoryID, - MachineDate: DateUtil.convertDateToString(x.dateFrom), - Value: double.tryParse(x.value.toString()), - TransactionsListID: TransactionsListID++)); - } - if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) { - Med_InsertTransactionsInputsList.add(healthData( - MedCategoryID: 7, - MedSubCategoryID: MedSubCategoryID, - MachineDate: DateUtil.convertDateToString(x.dateFrom), - Value: double.tryParse(x.value.toString()), - TransactionsListID: TransactionsListID++)); - } - }); + // _healthDataList.forEach((x) { + // if (x.type == HealthDataType.STEPS) { + // Med_InsertTransactionsInputsList.add(healthData( + // MedCategoryID: 6, + // MedSubCategoryID: MedSubCategoryID, + // MachineDate: DateUtil.convertDateToString(x.dateFrom), + // Value: double.tryParse(x.value.toString()), + // TransactionsListID: TransactionsListID++)); + // } + // if (x.type == HealthDataType.HEART_RATE) { + // Med_InsertTransactionsInputsList.add(healthData( + // MedCategoryID: 3, + // MedSubCategoryID: MedSubCategoryID, + // MachineDate: DateUtil.convertDateToString(x.dateFrom), + // Value: double.tryParse(x.value.toString()), + // TransactionsListID: TransactionsListID++)); + // } + // if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) { + // Med_InsertTransactionsInputsList.add(healthData( + // MedCategoryID: 7, + // MedSubCategoryID: MedSubCategoryID, + // MachineDate: DateUtil.convertDateToString(x.dateFrom), + // Value: double.tryParse(x.value.toString()), + // TransactionsListID: TransactionsListID++)); + // } + // }); getAllHealthDataLists(); } diff --git a/lib/services/payfort_services/payfort_service.dart b/lib/services/payfort_services/payfort_service.dart index 9b2c4597..9e0c07c9 100644 --- a/lib/services/payfort_services/payfort_service.dart +++ b/lib/services/payfort_services/payfort_service.dart @@ -173,7 +173,8 @@ class PayfortService extends BaseService { customerName: customerName!, customerEmail: customerEmail!, // orderDescription: orderDescription!, - orderDescription: "Dr. Sulaiman Al Habib Hospital", + // orderDescription: "Dr. Sulaiman Al Habib Hospital", + orderDescription: "Red Sea Health", sdkToken: sdkTokenResponse?.sdkToken ?? '', merchantReference: merchantReference!, currency: currency, diff --git a/lib/services/permission/permission_service.dart b/lib/services/permission/permission_service.dart index 2f6bf490..cdbaf329 100644 --- a/lib/services/permission/permission_service.dart +++ b/lib/services/permission/permission_service.dart @@ -7,11 +7,10 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:geolocator/geolocator.dart' as geo; class PermissionService extends BaseService { + late LocalStorage storage; PermissionService(){ - initLocalStorage(); storage = localStorage; } - LocalStorage? storage; geo.LocationPermission? locationPermission; AppGlobal appGlobal = new AppGlobal();