diff --git a/lib/config/config.dart b/lib/config/config.dart index e261a875..93128eff 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/'; @@ -323,7 +323,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 = 10.5; +var VERSION_ID = 10.6; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index f08b9c41..47d36da3 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1887,4 +1887,5 @@ const Map localizedValues = { "rateDoctorResponse": {"en": "Rate Doctor Response", "ar": "تقييم استجابة الطبيب"}, "comments": {"en": "Comments", "ar": "تعليقات"}, "rateDoctorResponseHeading": {"en": "Please rate the doctor response:", "ar": "يرجى تقييم استجابة الطبيب:"}, + "updateInsuranceManuallyDialog": {"en": "Would you like to update your insurance manually?", "ar": "هل ترغب في تحديث التأمين الخاص بك يدويًا؟"}, }; \ No newline at end of file diff --git a/lib/pages/insurance/UpdateInsuranceManually.dart b/lib/pages/insurance/UpdateInsuranceManually.dart index a9ee8a67..32378aa0 100644 --- a/lib/pages/insurance/UpdateInsuranceManually.dart +++ b/lib/pages/insurance/UpdateInsuranceManually.dart @@ -159,9 +159,12 @@ class _UpdateInsuranceManuallyState extends State { padding: EdgeInsets.all(18), child: DefaultButton( TranslationBase.of(context).submit, - isFormValid() ? () { - submitManualInsuranceUpdateRequest(); - } : null, + () { + if(isFormValid()) + submitManualInsuranceUpdateRequest(); + else + AppToast.showErrorToast(message: TranslationBase.of(context).enterInsuranceDetails); + }, disabledColor: Colors.grey, ), ), diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index 2ea4213f..324c9fa1 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -1,6 +1,6 @@ import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/pages/insurance/UpdateInsuranceManually.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -9,6 +9,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import '../../locator.dart'; +import '../../widgets/dialogs/confirm_dialog.dart'; import 'insurance_card_update_details.dart'; class InsurancePage extends StatelessWidget { @@ -144,7 +145,9 @@ class InsurancePage extends StatelessWidget { getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, bool isFamily, int parentID = 0, BuildContext context}) { GifLoaderDialogUtils.showMyDialog(context); - _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) { + _insuranceCardService + .getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID) + .then((value) { GifLoaderDialogUtils.hideDialog(context); if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { Navigator.push( @@ -159,8 +162,20 @@ class InsurancePage extends StatelessWidget { model.getInsuranceUpdated(); }); } else { - AppToast.showErrorToast(message: _insuranceCardService.error); + // AppToast.showErrorToast(message: _insuranceCardService.error); + updateManually(context, _insuranceCardService.error); } }); } + + void updateManually(BuildContext context, String errorMsg) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + 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()))}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } } diff --git a/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart b/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart index 2e930330..893a59df 100644 --- a/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart +++ b/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart @@ -112,16 +112,16 @@ class _ViewDoctorResponsesPageState extends State { ), ), ), - Container( - margin: EdgeInsets.only(top: 10.0), - child: DefaultButton( - TranslationBase.of(context).rateDoctorResponse, - () { - openResponseRateDialog(context); - }, - color: CustomColors.accentColor, - ), - ), + // Container( + // margin: EdgeInsets.only(top: 10.0), + // child: DefaultButton( + // TranslationBase.of(context).rateDoctorResponse, + // () { + // openResponseRateDialog(context); + // }, + // color: CustomColors.accentColor, + // ), + // ), ], ), ); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index e0b93147..a9a4b4bb 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2895,6 +2895,7 @@ class TranslationBase { String get rateDoctorResponse => localizedValues["rateDoctorResponse"][locale.languageCode]; String get comments => localizedValues["comments"][locale.languageCode]; String get rateDoctorResponseHeading => localizedValues["rateDoctorResponseHeading"][locale.languageCode]; + String get updateInsuranceManuallyDialog => localizedValues["updateInsuranceManuallyDialog"][locale.languageCode]; } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index f62248b8..e91990b4 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -37,9 +37,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 5d9f5e79..1c7c9b15 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.64+1 +version: 4.5.022+4050022 environment: sdk: ">=2.7.0 <3.0.0"