From 772992e3ffd60fbfcf6e69d33a231bf5eedef827 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 2 Nov 2023 15:10:29 +0300 Subject: [PATCH 01/10] updates --- lib/core/service/client/base_app_client.dart | 4 ++-- lib/pages/ToDoList/ToDo.dart | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 44dc5764..e2fbe537 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -150,8 +150,8 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - body['PatientID'] = 2621536; //3844083 - body['TokenID'] = "@dm!n"; + // body['PatientID'] = 2621536; //3844083 + // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 // Mobile no.: 0502303285 diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index b147f6c1..fbfe1cdb 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -906,7 +906,9 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { GifLoaderDialogUtils.showMyDialog(context); service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + if(res['OnlineCheckInAppointments'].length != 0) { + widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + } isInsured = res["IsInsured"]; isEligible = res["IsEligible"]; isCash = res["IsCash"]; From d5dd8757e9c02387238806c1a5fa6b02e5847ef7 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 2 Nov 2023 15:40:57 +0300 Subject: [PATCH 02/10] Privileges added for QR & NFC CheckIn options --- lib/config/config.dart | 4 ++-- lib/pages/BookAppointment/BookConfirm.dart | 5 +++-- lib/pages/BookAppointment/QRCode.dart | 17 +++++++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index d1fbb48e..5ab2c668 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,13 +20,13 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - // var BASE_URL = 'https://uat.hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; -var BASE_URL = 'https://webservices.hmg.com/'; +// var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'http://10.50.100.198:4422/'; diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 50dbc70f..42a12f5e 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -446,8 +446,9 @@ class _BookConfirmState extends State { widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) { projectViewModel.selectedBodyPartList.clear(); projectViewModel.laserSelectionDuration = 0; - print(res); - widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + if(res['OnlineCheckInAppointments'].length != 0) { + widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + } isInsured = res["IsInsured"]; isEligible = res["IsEligible"]; diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart index ad676eff..e9d88d7b 100644 --- a/lib/pages/BookAppointment/QRCode.dart +++ b/lib/pages/BookAppointment/QRCode.dart @@ -3,6 +3,7 @@ import 'dart:typed_data'; import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; @@ -27,6 +28,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; class QRCode extends StatefulWidget { PatientShareResponse patientShareResponse; @@ -46,6 +48,8 @@ class _QRCodeState extends State { bool _supportsNFC = false; BuildContext _context; + ProjectViewModel projectViewModel; + @override void initState() { // TODO: implement initState @@ -88,6 +92,7 @@ class _QRCodeState extends State { @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); _context = context; List checkInOptionsList = getCheckInOptionsList(context); return AppScaffold( @@ -190,13 +195,15 @@ class _QRCodeState extends State { optionsList.add( InkWell( onTap: () { - startNFCScan(); + if (projectViewModel.havePrivilege(80)) { + startNFCScan(); + } }, child: MedicalProfileItem( title: TranslationBase.of(context).scanNFC, imagePath: 'contactless.svg', subTitle: "", - isEnable: true, + isEnable: projectViewModel.havePrivilege(80), width: 80.0, height: 80.0, ), @@ -206,13 +213,15 @@ class _QRCodeState extends State { optionsList.add( InkWell( onTap: () { - startQRCodeScan(); + if (projectViewModel.havePrivilege(79)) { + startQRCodeScan(); + } }, child: MedicalProfileItem( title: TranslationBase.of(context).pharmaLiveCareScanQR, imagePath: 'qr_code.svg', subTitle: "", - isEnable: true, + isEnable: projectViewModel.havePrivilege(79), width: 80.0, height: 80.0, ), From 81de6f9848098a5d79323df421a37c6e35e6e53c Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 5 Nov 2023 09:33:07 +0300 Subject: [PATCH 03/10] updated app to stores Version ID 11.0 --- lib/config/config.dart | 6 +- .../medical/labs/laboratory_result_page.dart | 56 +++++++++---------- lib/widgets/in_app_browser/InAppBrowser.dart | 4 +- pubspec.yaml | 22 ++++---- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 5ab2c668..cf605410 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; @@ -337,7 +337,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 11.1; +var VERSION_ID = 11.0; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 9cf303aa..d5bb9035 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -75,34 +75,34 @@ class _LaboratoryResultPageState extends State { ], ), ), - bottomSheet: Container( - color: Colors.white, - height: MediaQuery.of(context).size.height * 0.081, - width: double.infinity, - padding: EdgeInsets.all(12.0), - child: Column( - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.9, - child: DefaultButton( - TranslationBase.of(context).downloadReport, - () async { - GifLoaderDialogUtils.showMyDialog(context); - await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true); - GifLoaderDialogUtils.hideDialog(context); - try { - String path = await _createFileFromString(model.labReportPDF, "pdf"); - OpenFilex.open(path); - } catch (ex) { - AppToast.showErrorToast(message: "Cannot open file."); - } - }, - textColor: Colors.white, - ), - ), - ], - ), - ), + // bottomSheet: Container( + // color: Colors.white, + // height: MediaQuery.of(context).size.height * 0.081, + // width: double.infinity, + // padding: EdgeInsets.all(12.0), + // child: Column( + // children: [ + // Container( + // width: MediaQuery.of(context).size.width * 0.9, + // child: DefaultButton( + // TranslationBase.of(context).downloadReport, + // () async { + // GifLoaderDialogUtils.showMyDialog(context); + // await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true); + // GifLoaderDialogUtils.hideDialog(context); + // try { + // String path = await _createFileFromString(model.labReportPDF, "pdf"); + // OpenFilex.open(path); + // } catch (ex) { + // AppToast.showErrorToast(message: "Cannot open file."); + // } + // }, + // textColor: Colors.white, + // ), + // ), + // ], + // ), + // ), ), ); } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 28a364e5..f38ad57c 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -35,9 +35,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // 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://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS diff --git a/pubspec.yaml b/pubspec.yaml index 235254f9..ae5a6c0a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.028+4050028 +version: 4.5.029+4050029 environment: sdk: ">=2.7.0 <3.0.0" @@ -57,8 +57,8 @@ dependencies: shared_preferences: ^2.0.0 # flutter_flexible_toast: ^0.1.4 fluttertoast: ^8.0.8 - firebase_messaging: ^14.1.0 - firebase_analytics: ^10.0.5 + firebase_messaging: 14.1.0 + firebase_analytics: 10.0.5 # Progress bar @@ -100,7 +100,7 @@ dependencies: location: ^4.3.0 # Qr code Scanner # barcode_scan_fix: ^1.0.2 - barcode_scan2: ^4.2.2 + barcode_scan2: 4.2.2 # Rating Stars rating_bar: ^0.2.0 @@ -132,17 +132,17 @@ dependencies: carousel_pro: ^1.0.0 #local_notifications - flutter_local_notifications: any + flutter_local_notifications: 10.0.0 #device_calendar device_calendar: ^4.2.0 # TEMPORAL FIX for https://github.com/builttoroam/device_calendar/issues/507 # device_calendar: ^4.3.1 -# device_calendar: -# git: -# url: https://github.com/builttoroam/device_calendar.git -# ref: develop + # device_calendar: + # git: + # url: https://github.com/builttoroam/device_calendar.git + # ref: develop #Handle Geolocation geolocator: ^9.0.2 @@ -178,7 +178,7 @@ dependencies: wifi: ^0.1.5 vibration: ^1.7.3 - flutter_nfc_kit: ^3.3.1 + flutter_nfc_kit: 3.3.1 geofencing: ^0.1.0 @@ -187,7 +187,7 @@ dependencies: in_app_update: ^3.0.0 - in_app_review: ^2.0.3 + in_app_review: 2.0.3 badges: ^2.0.1 flutter_app_icon_badge: ^2.0.0 From bbee4dba665edff71155e5d4bd614335308f228a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 6 Nov 2023 11:24:57 +0300 Subject: [PATCH 04/10] CR 6654 cancel manual insurance update CR done. --- .../AttachInsuranceCardImageDialog.dart | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index 03e61116..3d33825f 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -133,31 +133,31 @@ class _AttachInsuranceCardImageDialogState extends State Date: Mon, 6 Nov 2023 11:36:12 +0300 Subject: [PATCH 05/10] CR 6654 done --- lib/pages/insurance/insurance_page.dart | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index 5d19789a..dc17520b 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -184,24 +184,24 @@ class InsurancePage extends StatelessWidget { void updateManually(BuildContext context, String errorMsg, String patientIdentificationID, int patientID, String mobileNumber) { ConfirmDialog dialog = new ConfirmDialog( context: context, - // confirmMessage: errorMsg + ". " + TranslationBase.of(context).habibCallCenter, - // okText: TranslationBase.of(context).ok, - // cancelText: TranslationBase.of(context).cancel, - confirmMessage: errorMsg + ". " + TranslationBase.of(context).updateInsuranceManuallyDialog, - okText: TranslationBase.of(context).yes, - cancelText: TranslationBase.of(context).no, + confirmMessage: errorMsg + ". " + TranslationBase.of(context).habibCallCenter, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel, + // confirmMessage: errorMsg + ". " + TranslationBase.of(context).updateInsuranceManuallyDialog, + // okText: TranslationBase.of(context).yes, + // cancelText: TranslationBase.of(context).no, okFunction: () => { Navigator.pop(context), - Navigator.push( - context, - FadePage( - page: UpdateInsuranceManually( - patientIdentificationNo: patientIdentificationID, - patientID: patientID, - patientMobileNumber: mobileNumber, - ), - ), - ), + // Navigator.push( + // context, + // FadePage( + // page: UpdateInsuranceManually( + // patientIdentificationNo: patientIdentificationID, + // patientID: patientID, + // patientMobileNumber: mobileNumber, + // ), + // ), + // ), }, cancelFunction: () => {}); dialog.showAlertDialog(context); From cb2bacf53919ea7e807429acf0fe9f07ec9c9beb Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 6 Nov 2023 13:20:43 +0300 Subject: [PATCH 06/10] Update insurance for cash patient in ToDo List --- lib/config/localized_values.dart | 1 + lib/pages/ToDoList/ToDo.dart | 6 +- lib/pages/ToDoList/widgets/paymentDialog.dart | 186 +++++++++++------- .../insurance/insurance_update_screen.dart | 4 +- lib/uitl/translations_delegate_base.dart | 1 + 5 files changed, 119 insertions(+), 79 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 29671b2d..006b5f53 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1899,4 +1899,5 @@ const Map localizedValues = { "updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"}, "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, + "cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"}, }; \ No newline at end of file diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index fbfe1cdb..95be336f 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -835,7 +835,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { }); } dataLoaded = true; - if(widget.isFromMyAppointments) { + if (widget.isFromMyAppointments) { getPatientShare(context, widget.appointment); } }); @@ -906,7 +906,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { GifLoaderDialogUtils.showMyDialog(context); service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - if(res['OnlineCheckInAppointments'].length != 0) { + if (res['OnlineCheckInAppointments'].length != 0) { widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); } isInsured = res["IsInsured"]; @@ -1009,7 +1009,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), child: Opacity( opacity: a1.value, - child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse), + child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse, isCashPatient: isCash), ), ); }, diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index 9445e341..d12b5bf8 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -3,20 +3,24 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; class PaymentDialog extends StatefulWidget { AppoitmentAllHistoryResultList appo; PatientShareResponse patientShareResponse; + bool isCashPatient; final Function onPaymentMethodSelected; - PaymentDialog({@required this.appo, @required this.onPaymentMethodSelected, this.patientShareResponse}); + PaymentDialog({@required this.appo, @required this.onPaymentMethodSelected, this.patientShareResponse, this.isCashPatient = false}); @override _PaymentDialogState createState() => _PaymentDialogState(); @@ -31,84 +35,118 @@ class _PaymentDialogState extends State { //height: 550.0, width: 450.0, padding: EdgeInsets.all(21), - child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Text( - TranslationBase.of(context).invoiceDetails, - style: TextStyle( - fontSize: 24.0, - fontWeight: FontWeight.w600, - letterSpacing: -1.14, - color: Color(0xff2B353E), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).invoiceDetails, + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.w600, + letterSpacing: -1.14, + color: Color(0xff2B353E), + ), ), - ), - Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Color(0xff2E303A), fontSize: 16.0, fontWeight: FontWeight.w600,letterSpacing: -0.64)), - Text(getDate(widget.appo.appointmentDate), style: getTextStyle()), - Text(widget.appo.projectName, style: getTextStyle()), - Divider( - color: Colors.grey, - ), - Table( - children: [ - TableRow(decoration: BoxDecoration(), children: [ - TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)), - TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())), - ]), - TableRow(children: [ - TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)), - TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())), - ]), - TableRow(children: [ - TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)), - TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())), - ]), - ], - ), - Divider(color: Colors.grey), - Text( - TranslationBase.of(context).YouCanPayByTheFollowingOptions, - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), + Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Color(0xff2E303A), fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + Text(getDate(widget.appo.appointmentDate), style: getTextStyle()), + Text(widget.appo.projectName, style: getTextStyle()), + Divider( + color: Colors.grey, ), - ), - getPaymentMethods(), - SizedBox(height: 12), - Text( - TranslationBase.of(context).appoPaymentConfirm, - style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56), - ), - SizedBox(height: 12), - Container( - alignment: Alignment.center, - child: Row( - // direction: Axis.horizontal, - children: [ - Expanded( - child: DefaultButton( - TranslationBase.of(context).cancel_nocaps, - () { - Navigator.pop(context, null); - }, - color: CustomColors.accentColor, - textColor: Colors.white, + Table( + children: [ + TableRow(decoration: BoxDecoration(), children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())), + ]), + ], + ), + Divider(color: Colors.grey), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + getPaymentMethods(), + SizedBox(height: 12), + Text( + TranslationBase.of(context).appoPaymentConfirm, + style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56), + ), + SizedBox(height: 12), + Container( + alignment: Alignment.center, + child: Row( + // direction: Axis.horizontal, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).cancel_nocaps, + () { + Navigator.pop(context, null); + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), ), - ), - mWidth(10.0), - Expanded( - child: DefaultButton( - TranslationBase.of(context).confirm, - () { - Navigator.pop(context, widget.patientShareResponse); - }, - color: CustomColors.green, - textColor: Colors.white, + mWidth(10.0), + Expanded( + child: DefaultButton( + TranslationBase.of(context).confirm, + () { + Navigator.pop(context, widget.patientShareResponse); + }, + color: CustomColors.green, + textColor: Colors.white, + ), ), - ), - ], + ], + ), ), - ), - ]), + widget.isCashPatient + ? Column( + children: [ + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), + ], + ) + : Container(), + ], + ), ), ); } diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart index 49446730..c3c227c6 100644 --- a/lib/pages/insurance/insurance_update_screen.dart +++ b/lib/pages/insurance/insurance_update_screen.dart @@ -59,9 +59,9 @@ class _InsuranceUpdateState extends State with SingleTickerProv isScrollable: false, indicatorWeight: 3.0, indicatorColor: CustomColors.accentColor, - labelColor: Theme.of(context).primaryColor, + labelColor: CustomColors.textDarkColor, labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0), - unselectedLabelColor: Colors.grey, + unselectedLabelColor: CustomColors.textDarkColor, tabs: [ Container( child: Center( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 804cecdd..f2a9e61d 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2908,6 +2908,7 @@ class TranslationBase { String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; + String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode]; } From c7ee76d81603594b85bc0201ac674ef4c6fd4f8f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 6 Nov 2023 16:12:09 +0300 Subject: [PATCH 07/10] updates --- lib/pages/BookAppointment/BookConfirm.dart | 9 +- lib/pages/BookAppointment/BookSuccess.dart | 114 +++++++++++------- .../BookAppointment/book_reminder_page.dart | 22 ++-- 3 files changed, 93 insertions(+), 52 deletions(-) diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 42a12f5e..bb4d153a 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -455,10 +455,10 @@ class _BookConfirmState extends State { isCash = res["IsCash"]; if (isCash) { - navigateToBookSuccess(context, docObject, widget.patientShareResponse); + navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash); } else { if (isInsured && isEligible) { - navigateToBookSuccess(context, docObject, widget.patientShareResponse); + navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash); } else { if (isInsured && !isEligible) { errorMsg = TranslationBase.of(context).invalidEligibility; @@ -490,7 +490,7 @@ class _BookConfirmState extends State { widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) { widget.patientShareResponse = new PatientShareResponse.fromJson(res); GifLoaderDialogUtils.hideDialog(context); - navigateToBookSuccess(context, docObject, widget.patientShareResponse); + navigateToBookSuccess(context, docObject, widget.patientShareResponse, false); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: err); @@ -554,7 +554,7 @@ class _BookConfirmState extends State { Navigator.of(context).popAndPushNamed(HOME); } - Future navigateToBookSuccess(context, DoctorList docObject, PatientShareResponse patientShareResponse) async { + Future navigateToBookSuccess(context, DoctorList docObject, PatientShareResponse patientShareResponse, bool isCash) async { GifLoaderDialogUtils.hideDialog(context); this.sharedPref.remove(IS_LIVECARE_APPOINTMENT); Navigator.push( @@ -566,6 +566,7 @@ class _BookConfirmState extends State { appoDateFormatted: widget.appoDateFormatted, appoTimeFormatted: widget.selectedTime, dateTime: getDateTime(), + isCash: isCash, ), ), ); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 83c3fdbd..9b84a185 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -7,6 +7,8 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; @@ -17,6 +19,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -36,8 +39,9 @@ class BookSuccess extends StatefulWidget { String appoDateFormatted; String appoTimeFormatted; + bool isCash; - BookSuccess({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted}); + BookSuccess({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.isCash = false}); @override _BookSuccessState createState() => _BookSuccessState(); @@ -186,51 +190,79 @@ class _BookSuccessState extends State { child: Container( color: CustomColors.appBackgroudGreyColor, margin: EdgeInsets.all(14), - height: 45.0, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Expanded( - flex: 1, - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), + height: 150.0, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + startPaymentProcess(); + projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true); + }, + child: Text(TranslationBase.of(context).payNow.toUpperCase(), + style: TextStyle( + fontSize: 18.0, + color: Colors.white, + )), + ), + ), ), - height: 45.0, - child: CustomTextButton( - backgroundColor: CustomColors.green, - elevation: 0, - onPressed: () { - startPaymentProcess(); - projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true); - }, - child: Text(TranslationBase.of(context).payNow.toUpperCase(), - style: TextStyle( - fontSize: 18.0, - color: Colors.white, - )), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: () { + navigateToHome(context); + projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false); + }, + child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), ), - ), + ], ), - mWidth(7), - Expanded( - flex: 1, - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - height: 45.0, - child: CustomTextButton( - backgroundColor: Color(0xffc5272d), - elevation: 0, - onPressed: () { - navigateToHome(context); - projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false); - }, - child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), - ), + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), ), ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), ], ), ), diff --git a/lib/pages/BookAppointment/book_reminder_page.dart b/lib/pages/BookAppointment/book_reminder_page.dart index fb066c80..02b71ab4 100644 --- a/lib/pages/BookAppointment/book_reminder_page.dart +++ b/lib/pages/BookAppointment/book_reminder_page.dart @@ -27,8 +27,9 @@ class BookReminderPage extends StatefulWidget { String appoDateFormatted; String appoTimeFormatted; DateTime dateTime; + bool isCash; - BookReminderPage({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.dateTime}); + BookReminderPage({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.dateTime, this.isCash = false}); @override _BookReminderPageState createState() => _BookReminderPageState(); @@ -184,8 +185,8 @@ class _BookReminderPageState extends State { ), height: 45.0, child: CustomTextButton( - backgroundColor: CustomColors.green, - elevation: 0, + backgroundColor: CustomColors.green, + elevation: 0, onPressed: () async { print(widget.patientShareResponse.appointmentNo); showReminderDialog( @@ -215,10 +216,17 @@ class _BookReminderPageState extends State { Future navigateToBookSuccess(BuildContext context) async { Navigator.push( - context, - FadePage( - page: - BookSuccess(docObject: widget.docObject, patientShareResponse: widget.patientShareResponse, appoDateFormatted: widget.appoDateFormatted, appoTimeFormatted: widget.appoTimeFormatted))); + context, + FadePage( + page: BookSuccess( + docObject: widget.docObject, + patientShareResponse: widget.patientShareResponse, + appoDateFormatted: widget.appoDateFormatted, + appoTimeFormatted: widget.appoTimeFormatted, + isCash: widget.isCash, + ), + ), + ); } Future> requestPermissions() async { From dd0099236d6d599d8241e14703ebb299f6510544 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 7 Nov 2023 14:54:17 +0300 Subject: [PATCH 08/10] Insurance dialog added post registration --- lib/config/localized_values.dart | 1 + lib/pages/BookAppointment/BookSuccess.dart | 2 +- lib/pages/ToDoList/widgets/paymentDialog.dart | 2 +- lib/pages/login/register-info.dart | 55 ++++++++++--------- .../rate_appointment_doctor.dart | 38 +++++++++++-- lib/uitl/translations_delegate_base.dart | 1 + lib/widgets/dialogs/confirm_dialog.dart | 6 +- lib/widgets/in_app_browser/InAppBrowser.dart | 4 +- 8 files changed, 71 insertions(+), 38 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 006b5f53..63619f59 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1900,4 +1900,5 @@ const Map localizedValues = { "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, "cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"}, + "validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"}, }; \ No newline at end of file diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 9b84a185..0cb858ea 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -260,7 +260,7 @@ class _BookSuccessState extends State { ); Navigator.push(context, FadePage(page: InsuranceUpdate())); }, - color: CustomColors.accentColor, + color: Color(0xff313A43), textColor: Colors.white, ), ], diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index d12b5bf8..9c0ef292 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -139,7 +139,7 @@ class _PaymentDialogState extends State { ); Navigator.push(context, FadePage(page: InsuranceUpdate())); }, - color: CustomColors.accentColor, + color: Color(0xff313A43), textColor: Colors.white, ), ], diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index 1b81dbfb..f73d0913 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_activation_code import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/routes.dart'; @@ -704,31 +705,35 @@ class _RegisterInfo extends State { projectViewModel.isLogin = true; projectViewModel.user = authenticatedUserObject.user; await authenticatedUserObject.getUser(getUser: true); - appointmentRateViewModel - .getIsLastAppointmentRatedList() - .then((value) => { - getToDoCount(), - GifLoaderDialogUtils.hideDialog(AppGlobal.context), - if (appointmentRateViewModel.isHaveAppointmentNotRate) - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: RateAppointmentDoctor(), - ), - (r) => false) - } - else - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: LandingPage(), - ), - (r) => false) - } - }) - .catchError((err) { + appointmentRateViewModel.getIsLastAppointmentRatedList().then((value) { + getToDoCount(); + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + if (appointmentRateViewModel.isHaveAppointmentNotRate) { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(isFromRegistration: true), + ), + (r) => false); + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).validInsurance, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () { + ConfirmDialog.closeAlertDialog(context); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + }).catchError((err) { print(err); //GifLoaderDialogUtils.hideDialog(context); }); diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 9c0b157e..53f080e9 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; @@ -9,12 +10,18 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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'; class RateAppointmentDoctor extends StatefulWidget { + + bool isFromRegistration; + + RateAppointmentDoctor({Key key, this.isFromRegistration = false}) : super(key: key); + @override _RateAppointmentDoctorState createState() => _RateAppointmentDoctorState(); } @@ -158,12 +165,31 @@ class _RateAppointmentDoctorState extends State { child: DefaultButton( TranslationBase.of(context).later, () { - Navigator.pushReplacement( - context, - FadePage( - page: LandingPage(), - ), - ); + // if(widget.isFromRegistration) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).validInsurance, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () { + ConfirmDialog.closeAlertDialog(context); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + // } else { + // Navigator.pushReplacement( + // context, + // FadePage( + // page: LandingPage(), + // ), + // ); + // } }, color: CustomColors.accentColor, textColor: Colors.white, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index f2a9e61d..7af2010a 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2909,6 +2909,7 @@ class TranslationBase { String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode]; + String get validInsurance => localizedValues["validInsurance"][locale.languageCode]; } diff --git a/lib/widgets/dialogs/confirm_dialog.dart b/lib/widgets/dialogs/confirm_dialog.dart index 4892d09f..a6285fd2 100644 --- a/lib/widgets/dialogs/confirm_dialog.dart +++ b/lib/widgets/dialogs/confirm_dialog.dart @@ -99,9 +99,9 @@ class Mdialog extends StatelessWidget { cancelFunction(); }, child: Container( - decoration: containerRadius(CustomColors.lightGreyColor, 12), + decoration: containerRadius(CustomColors.accentColor, 12), padding: EdgeInsets.only(top: 8,bottom: 8), - child: Center(child: Texts(cancelText, variant: "caption3")), + child: Center(child: Texts(cancelText, variant: "caption3", color: CustomColors.white,)), ), ), ), @@ -110,7 +110,7 @@ class Mdialog extends StatelessWidget { child: InkWell( onTap: okFunction, child: Container( - decoration: containerRadius(CustomColors.accentColor, 12), + decoration: containerRadius(CustomColors.green, 12), padding: EdgeInsets.only(top: 8,bottom: 8), child: Center( child: Texts( diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index f38ad57c..28a364e5 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -35,9 +35,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + 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://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS From 7c426b90e5d33bc0dffafa850dc507d8e95f7a23 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 8 Nov 2023 12:58:27 +0300 Subject: [PATCH 09/10] updates --- lib/config/config.dart | 6 +-- lib/pages/BookAppointment/BookSuccess.dart | 54 ++++++++++--------- lib/pages/ToDoList/widgets/paymentDialog.dart | 2 +- .../AttachInsuranceCardImageDialog.dart | 49 ++++++++--------- lib/pages/insurance/insurance_page.dart | 32 +++++------ lib/pages/login/register-info.dart | 8 ++- .../rate_appointment_doctor.dart | 26 +++++---- lib/widgets/in_app_browser/InAppBrowser.dart | 4 +- 8 files changed, 100 insertions(+), 81 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index cf605410..5ab2c668 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - // var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; @@ -337,7 +337,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 11.0; +var VERSION_ID = 11.1; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 0cb858ea..3642bed4 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -239,30 +239,36 @@ class _BookSuccessState extends State { ), ], ), - mHeight(10.0), - Text( - TranslationBase.of(context).cashAmountUpdateInsurance, - style: TextStyle( - fontSize: 14.0, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - ), - ), - mHeight(5.0), - DefaultButton( - TranslationBase.of(context).updateInsuranceText, - () { - Navigator.pop(context, null); - Navigator.pushAndRemoveUntil( - context, - MaterialPageRoute(builder: (context) => LandingPage()), - (Route route) => false, - ); - Navigator.push(context, FadePage(page: InsuranceUpdate())); - }, - color: Color(0xff313A43), - textColor: Colors.white, - ), + widget.isCash + ? Column( + children: [ + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + color: Color(0xffEAA118), + textColor: Colors.white, + ), + ], + ) + : Container(), ], ), ), diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index 9c0ef292..43ed4c69 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -139,7 +139,7 @@ class _PaymentDialogState extends State { ); Navigator.push(context, FadePage(page: InsuranceUpdate())); }, - color: Color(0xff313A43), + color: Color(0xffEAA118), textColor: Colors.white, ), ], diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index 3d33825f..1ef48150 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -133,31 +133,32 @@ class _AttachInsuranceCardImageDialogState extends State { Navigator.pop(context), - // Navigator.push( - // context, - // FadePage( - // page: UpdateInsuranceManually( - // patientIdentificationNo: patientIdentificationID, - // patientID: patientID, - // patientMobileNumber: mobileNumber, - // ), - // ), - // ), + Navigator.push( + context, + FadePage( + page: UpdateInsuranceManually( + patientIdentificationNo: patientIdentificationID, + patientID: patientID, + patientMobileNumber: mobileNumber, + ), + ), + ), }, cancelFunction: () => {}); dialog.showAlertDialog(context); diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index f73d0913..0f8e031f 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -730,7 +730,13 @@ class _RegisterInfo extends State { ); Navigator.push(context, FadePage(page: InsuranceUpdate())); }, - cancelFunction: () => {}); + cancelFunction: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + }); dialog.showAlertDialog(context); } }).catchError((err) { diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 53f080e9..08a597ab 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -165,7 +165,7 @@ class _RateAppointmentDoctorState extends State { child: DefaultButton( TranslationBase.of(context).later, () { - // if(widget.isFromRegistration) { + if(widget.isFromRegistration) { ConfirmDialog dialog = new ConfirmDialog( context: context, confirmMessage: TranslationBase.of(context).validInsurance, @@ -180,16 +180,22 @@ class _RateAppointmentDoctorState extends State { ); Navigator.push(context, FadePage(page: InsuranceUpdate())); }, - cancelFunction: () => {}); + cancelFunction: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + }); dialog.showAlertDialog(context); - // } else { - // Navigator.pushReplacement( - // context, - // FadePage( - // page: LandingPage(), - // ), - // ); - // } + } else { + Navigator.pushReplacement( + context, + FadePage( + page: LandingPage(), + ), + ); + } }, color: CustomColors.accentColor, textColor: Colors.white, diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 28a364e5..f38ad57c 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -35,9 +35,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // 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://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS From b579e494c15104dd70269c790c0f1f2b221a26c0 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 9 Nov 2023 10:59:19 +0300 Subject: [PATCH 10/10] updates --- .../AttachInsuranceCardImageDialog.dart | 50 +++++++++---------- lib/pages/insurance/insurance_page.dart | 32 ++++++------ 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index 1ef48150..b0b63346 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -133,32 +133,32 @@ class _AttachInsuranceCardImageDialogState extends State { Navigator.pop(context), - Navigator.push( - context, - FadePage( - page: UpdateInsuranceManually( - patientIdentificationNo: patientIdentificationID, - patientID: patientID, - patientMobileNumber: mobileNumber, - ), - ), - ), + // Navigator.push( + // context, + // FadePage( + // page: UpdateInsuranceManually( + // patientIdentificationNo: patientIdentificationID, + // patientID: patientID, + // patientMobileNumber: mobileNumber, + // ), + // ), + // ), }, cancelFunction: () => {}); dialog.showAlertDialog(context);