diff --git a/lib/config/config.dart b/lib/config/config.dart index 58ade1bc..2592d1b2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; -const BASE_URL = 'https://uat.hmgwebservices.com/'; - //const BASE_URL = 'https://hmgwebservices.com/'; +//const BASE_URL = 'https://uat.hmgwebservices.com/'; + const BASE_URL = 'https://hmgwebservices.com/'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; ///Doctor diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index b75baf2e..7843bff1 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -999,4 +999,16 @@ const Map localizedValues = { "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"}, "YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "}, "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, + "blood-donation": { + "en": "Blood Donation", + "ar": "التبرع بالدم" + }, + "blood-instruction": { + "en": "Enter the required information, In order to register for Blood Donation Service", + "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم" + }, + "view-terms": { + "en": "To view the terms and conditions", + "ar": "عرض الشروط والأحكام" + } }; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 7e3d4181..2ecacc9a 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -187,7 +187,17 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/upcoming_icon_bottom_bar.png', title: TranslationBase.of(context).todoList, ), - + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: BloodDonationPage(), + ), + ), + imageLocation: + 'assets/images/new-design/blood_icon.png', + title: TranslationBase.of(context).bloodDonation, + ), ServicesContainer( onTap: () => Navigator.push( context, diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index 99e5242e..a2e46ff6 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -23,6 +23,7 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -77,7 +78,7 @@ class _BloodDonationPageState extends State { onModelReady: (model) => model.getCities(),//model.getHospitals(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, - appBarTitle: "Blood Donation",//TranslationBase.of(context).advancePayment, + appBarTitle: TranslationBase.of(context).bloodDonation,//TranslationBase.of(context).advancePayment, body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( @@ -85,9 +86,8 @@ class _BloodDonationPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( - // TranslationBase.of(context).advancePaymentLabel, - "Enter the required information, In order to register for Blood Donation Service",//+model.user.firstName, + AppText( + TranslationBase.of(context).bloodInstruction, textAlign: TextAlign.center, ), SizedBox( @@ -188,55 +188,24 @@ class _BloodDonationPageState extends State { ), ), ), - // if (beneficiaryType == BeneficiaryType.MyFamilyFiles) - // SizedBox( - // height: 12, - // ), - // if (beneficiaryType == BeneficiaryType.MyFamilyFiles) - // InkWell( - // onTap: () { - // model.getFamilyFiles().then((value) { - // confirmSelectFamilyDialog(model - // .getAllSharedRecordsByStatusResponse - // .getAllSharedRecordsByStatusList); - // }).showProgressBar( - // text: "Loading", - // backgroundColor: Colors.blue.withOpacity(0.6)); - // }, - // child: Container( - // padding: EdgeInsets.all(12), - // width: double.infinity, - // height: 65, - // decoration: BoxDecoration( - // borderRadius: BorderRadius.circular(12), - // color: Colors.white), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Texts(getFamilyMembersName()), - // Icon(Icons.arrow_drop_down) - // ], - // ), - // ), - // ), + SizedBox( height: 12, ), Row( children: [ - Container( - child: Text(" To view the terms and conditions "), - ), - SizedBox( - width: MediaQuery.of(context).size.height * 0.10, - ), + AppText(TranslationBase.of(context).bloodTermsNcondition), + + // SizedBox( + // width: MediaQuery.of(context).size.height * 0.10, + // ), InkWell( onTap: () { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => UserAgreementPage())); }, child: Container( - child: Texts(" Click here ",color: Colors.blue,), + child: Texts(" Click here ", color: Colors.blue,), ), ) ], @@ -269,77 +238,7 @@ class _BloodDonationPageState extends State { ), ], ), - // NewTextFields( - // hintText: TranslationBase.of(context).fileNumber, - // controller: _fileTextController, - // ), - // if (beneficiaryType == BeneficiaryType.OtherAccount) - // SizedBox( - // height: 12, - // ), - // if (beneficiaryType == BeneficiaryType.OtherAccount) - // InkWell( - // onTap: () { - // if (_fileTextController.text.isNotEmpty) - // model - // .getPatientInfoByPatientID( - // id: _fileTextController.text) - // .then((value) { - // confirmSelectPatientDialog(model.patientInfoList); - // }).showProgressBar( - // text: "Loading", - // backgroundColor: - // Colors.blue.withOpacity(0.6)); - // else - // AppToast.showErrorToast( - // message: 'Please Enter The File Number'); - // }, - // child: Container( - // padding: EdgeInsets.all(12), - // width: double.infinity, - // height: 65, - // decoration: BoxDecoration( - // borderRadius: BorderRadius.circular(12), - // color: Colors.white), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Texts(getPatientName()), - // Icon(Icons.arrow_drop_down) - // ], - // ), - // ), - // ), - // SizedBox( - // height: 12, - // ), - - // NewTextFields( - // hintText: TranslationBase.of(context).amount, - // keyboardType: TextInputType.number, - // onChanged: (value) { - // setState(() { - // amount = value; - // }); - // }, - // ), - // SizedBox( - // height: 12, - // ), - // NewTextFields( - // hintText: TranslationBase.of(context).depositorEmail, - // initialValue: model.user.emailAddress, - // onChanged: (value) { - // email = value; - // }, - // ), - // SizedBox( - // height: 12, - // ), - // NewTextFields( - // hintText: TranslationBase.of(context).notes, - // controller: _notesTextController, - // ), + SizedBox( height: 10, ), @@ -393,9 +292,8 @@ class _BloodDonationPageState extends State { ), ), bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.12, + height: MediaQuery.of(context).size.height * 0.10, width: double.infinity, - padding: EdgeInsets.all(12), child: SecondaryButton( textColor: Colors.white, diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 229e0a0f..87eaf1ce 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -370,7 +370,7 @@ class _ConfirmLogin extends State { if (authenticated == true) { - if(user.logInType==2 || user.logInType ==3){ + if(user !=null && (user.logInType==2 || user.logInType ==3)){ this.checkActivationCode(); }else{ var request = this.getCommonRequest(type: type); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index c5fc8852..9b216940 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -855,6 +855,9 @@ String get fileno => localizedValues['fileno'][locale.languageCode]; String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; + String get bloodDonation => localizedValues['blood-donation'][locale.languageCode]; + String get bloodInstruction => localizedValues['blood-instruction'][locale.languageCode]; + String get bloodTermsNcondition => localizedValues['view-terms'][locale.languageCode]; }