From 5e50c0dc32ecd00652510633de187cfdc1a18d3c Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 30 Sep 2020 14:54:32 +0300 Subject: [PATCH 1/5] Blood Denote --- assets/images/BloodChrt_EN.png | Bin 0 -> 41626 bytes lib/config/config.dart | 3 + .../model/blooddonation/get_all_cities.dart | 21 + lib/core/model/my_balance/AdvanceModel.dart | 5 +- .../service/blood/blood_donation_service.dart | 34 + .../service/contactus/livechat_service.dart | 38 +- .../booddonation_view_model.dart | 26 + .../medical/my_balance_view_model.dart | 19 + lib/locator.dart | 5 + .../all_habib_medical_service_page.dart | 5 +- .../AlHabibMedicalService/my_web_view.dart | 1 - lib/pages/Blood/advance_payment_page.dart | 397 ++++++++++ lib/pages/Blood/blood_donation.dart | 696 ++++++++++++++++++ lib/pages/Blood/confirm_payment_page.dart | 306 ++++++++ lib/pages/Blood/dialogs/ConfirmSMSDialog.dart | 375 ++++++++++ .../dialogs/SelectBeneficiaryDialog.dart | 177 +++++ .../Blood/dialogs/SelectBloodDialog.dart | 328 +++++++++ .../Blood/dialogs/SelectGenderDialog.dart | 146 ++++ .../Blood/dialogs/SelectHospitalDialog.dart | 129 ++++ .../dialogs/SelectPatientFamilyDialog.dart | 130 ++++ .../dialogs/SelectPatientInfoDialog.dart | 130 ++++ lib/pages/Blood/my_balance_page.dart | 109 +++ lib/pages/Blood/new_text_Field.dart | 239 ++++++ lib/pages/Blood/user_agreement_page.dart | 55 ++ .../balance/dialogs/SelectCiteisDialog.dart | 132 ++++ pubspec.yaml | 1 - 26 files changed, 3478 insertions(+), 29 deletions(-) create mode 100644 assets/images/BloodChrt_EN.png create mode 100644 lib/core/model/blooddonation/get_all_cities.dart create mode 100644 lib/core/service/blood/blood_donation_service.dart create mode 100644 lib/core/viewModels/blooddonation/booddonation_view_model.dart create mode 100644 lib/pages/Blood/advance_payment_page.dart create mode 100644 lib/pages/Blood/blood_donation.dart create mode 100644 lib/pages/Blood/confirm_payment_page.dart create mode 100644 lib/pages/Blood/dialogs/ConfirmSMSDialog.dart create mode 100644 lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart create mode 100644 lib/pages/Blood/dialogs/SelectBloodDialog.dart create mode 100644 lib/pages/Blood/dialogs/SelectGenderDialog.dart create mode 100644 lib/pages/Blood/dialogs/SelectHospitalDialog.dart create mode 100644 lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart create mode 100644 lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart create mode 100644 lib/pages/Blood/my_balance_page.dart create mode 100644 lib/pages/Blood/new_text_Field.dart create mode 100644 lib/pages/Blood/user_agreement_page.dart create mode 100644 lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart diff --git a/assets/images/BloodChrt_EN.png b/assets/images/BloodChrt_EN.png new file mode 100644 index 0000000000000000000000000000000000000000..ac52957d4bc22be5f099d903cecb8d4d1fd09e3a GIT binary patch literal 41626 zcmdSBRa9I}@GnYmch_LS-91=vcXzko?(Po3gCw}a;O+!>7~FkumowkF_rKPCy$|Q% zJnS`V_Vli9$LB#UgbDdMVghEIO^CqRKLs6nZHPij#>0` zWw}nhes+Sqr}rnuy0n_@IG*{NLmvgic(hvhF(wH8+jr zI_3C|kj6ftcSt!)<$cbqdohPdSSE7>LYup z34+?Dt{$3^fbS^LXbI*>q9qgy^VCrR5@CG$Su+wW3mMpwn4}25zrQo%6P0UKVAe=? zKCW#dr8Ca{GutYjQX=k&*iDm$D+6qfwX)N z-&AyodH9!fuRvbG2KdQ;d@X3vSQ4`0GGJlFF-K%xL@O$P_31Hq%R#MmZ_s8qe04_onLIJp?-TStt1zBlWBXkn8MW)^(GOBH@{uluC)hx22x> za4dAS&SHD`?Y~$bT1RB#W~InuIPxvZEhy!`Aqk89xLmeplXFv-ZT7%Tj@bv0Ccn?n zhGP3QFSlq36j--lqv)r$CdUy)hZb#xrZxb75BZ58+YYuG=pD@e831PfKQog1|C$l_ z2D2zw3Shg^4*^g2e;olL8ho=*0<%ZfVNH(V))%@D(%hn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eA< zHrjKtiFfPg`t+>VGlluww~mFajS4t)FFO zeB}g~1}{L73ffM$tLaMwTFk=hsvEI8%V$^gH50_pMzGs4|BROksE;i;_4>pj8YP>n~ znTfQ4ly54=ZxH@4Q-{H6`CwGiRo0Q7=&ND;(TdL<@0l>>-GQ3QYaQ6)ESSSvlaG2% zAf9`x1i*l3DCqTZdBSMs;maOc2 zF_8)|;E<96#cAL0tZOA7%IEnqXoE~bAl|4CvxtzZrPD9zIi3ebIo5x;!iVlULqr6l-Fa) zq^PQ5FqSCr4o7345NTN|2PT@{s8ggQfI^$CeHwi5=a29|+v(3VdZ(7*z(+~$rEImd HN$CFos&lZC literal 0 HcmV?d00001 diff --git a/lib/config/config.dart b/lib/config/config.dart index 90c37129..78778a94 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -67,6 +67,9 @@ const GET_FINDUS_REQUEST= ///LiveChat const GET_LIVECHAT_REQUEST= 'Services/Patients.svc/REST/GetPatientICProjects'; +///BloodDenote +const GET_CITIES_REQUEST= + 'Services/Lists.svc/REST/GetAllCities'; ///Reports diff --git a/lib/core/model/blooddonation/get_all_cities.dart b/lib/core/model/blooddonation/get_all_cities.dart new file mode 100644 index 00000000..3d685bb6 --- /dev/null +++ b/lib/core/model/blooddonation/get_all_cities.dart @@ -0,0 +1,21 @@ +class CitiesModel { + int iD; + String description; + String descriptionN; + + CitiesModel({this.iD, this.description, this.descriptionN}); + + CitiesModel.fromJson(Map json) { + iD = json['ID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/my_balance/AdvanceModel.dart b/lib/core/model/my_balance/AdvanceModel.dart index 40472b13..b95e08a2 100644 --- a/lib/core/model/my_balance/AdvanceModel.dart +++ b/lib/core/model/my_balance/AdvanceModel.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; class AdvanceModel { @@ -7,6 +8,7 @@ class AdvanceModel { String email; String note; String depositorName; + CitiesModel citiessModel; AdvanceModel( {this.amount, @@ -14,5 +16,6 @@ class AdvanceModel { this.note, this.hospitalsModel, this.fileNumber, - this.depositorName}); + this.depositorName, + this.citiessModel}); } diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart new file mode 100644 index 00000000..ecb9ee2d --- /dev/null +++ b/lib/core/service/blood/blood_donation_service.dart @@ -0,0 +1,34 @@ + + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; + +import '../base_service.dart'; + +class BloodDonationService extends BaseService{ + + + //List LivechatModelList = List(); + +// Map body = Map(); + +List CitiesModelList = List(); +Map body = Map(); +Future getAllCitiesOrders() async { + hasError = false; + body['ListCities'] = false; + await baseAppClient.post(GET_CITIES_REQUEST, + onSuccess: (dynamic response, int statusCode) { + CitiesModelList.clear(); + + response['ListCities'].forEach((vital) { + CitiesModelList.add(CitiesModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); +} + + +} \ No newline at end of file diff --git a/lib/core/service/contactus/livechat_service.dart b/lib/core/service/contactus/livechat_service.dart index ae8fabc9..b806d56b 100644 --- a/lib/core/service/contactus/livechat_service.dart +++ b/lib/core/service/contactus/livechat_service.dart @@ -4,36 +4,24 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; import '../base_service.dart'; -class LiveChatService extends BaseService{ - - - - - List LivechatModelList=List(); - +class LiveChatService extends BaseService { + List LivechatModelList = List(); Map body = Map(); - - Future getAllLiveChatOrders() async { hasError = false; - body['List_PatientICProjects'] =false; + body['List_PatientICProjects'] = false; await baseAppClient.post(GET_LIVECHAT_REQUEST, onSuccess: (dynamic response, int statusCode) { - LivechatModelList.clear(); - - - response['List_PatientICProjects'].forEach((vital) { - - LivechatModelList.add(GetPatientICProjectsModel.fromJson(vital)); - - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + LivechatModelList.clear(); + + response['List_PatientICProjects'].forEach((vital) { + LivechatModelList.add(GetPatientICProjectsModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } - - -} \ No newline at end of file +} diff --git a/lib/core/viewModels/blooddonation/booddonation_view_model.dart b/lib/core/viewModels/blooddonation/booddonation_view_model.dart new file mode 100644 index 00000000..d8d70a80 --- /dev/null +++ b/lib/core/viewModels/blooddonation/booddonation_view_model.dart @@ -0,0 +1,26 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_donation_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class BloodDonationViewModel extends BaseViewModel{ + +// HospitalService _hospitalService = locator(); + + // List get hospitals => _hospitalService.hospitals; + + BloodDonationService _bloodDonationService =locator(); + List get CitiesModelList => _bloodDonationService.CitiesModelList; + Future getCities() async { + setState(ViewState.Busy); + await _bloodDonationService.getAllCitiesOrders(); + // getHospitals(); + if (_bloodDonationService.hasError) { + error = _bloodDonationService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} \ No newline at end of file diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart index 350e9d89..33c89bb9 100644 --- a/lib/core/viewModels/medical/my_balance_view_model.dart +++ b/lib/core/viewModels/medical/my_balance_view_model.dart @@ -1,8 +1,10 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_donation_service.dart'; import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/my_balance_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; @@ -20,6 +22,11 @@ class MyBalanceViewModel extends BaseViewModel { List get patientAdvanceBalanceAmountList => _myBalanceService.patientAdvanceBalanceAmountList; + //======================== + BloodDonationService _bloodDonationService =locator(); + List get CitiesModelList => _bloodDonationService.CitiesModelList; + //=========================== + double get totalAdvanceBalanceAmount => _myBalanceService.totalAdvanceBalanceAmount; @@ -55,6 +62,18 @@ class MyBalanceViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + //============== + Future getCities() async { + setState(ViewState.Busy); + await _bloodDonationService.getAllCitiesOrders(); + // getHospitals(); + if (_bloodDonationService.hasError) { + error = _bloodDonationService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + //=============== Future getPatientInfoByPatientID({String id}) async { setState(ViewState.Busy); diff --git a/lib/locator.dart b/lib/locator.dart index 072370b7..18d629c0 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:get_it/get_it.dart'; import 'core/service/appointment_rate_service.dart'; +import 'core/service/blood/blood_donation_service.dart'; import 'core/service/contactus/finadus_service.dart'; import 'core/service/contactus/livechat_service.dart'; import 'core/service/dashboard_service.dart'; @@ -21,6 +22,7 @@ import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/reports_monthly_service.dart'; import 'core/service/medical/vital_sign_service.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; +import 'core/viewModels/blooddonation/booddonation_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; import 'core/viewModels/contactus/livechat_view_model.dart'; import 'core/viewModels/er/am_request_view_model.dart'; @@ -77,6 +79,8 @@ void setupLocator() { locator.registerLazySingleton(() => FindusService()); locator.registerLazySingleton(() => LiveChatService()); + locator.registerLazySingleton(() => BloodDonationService()); + /// View Model locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => PharmacyViewModel()); @@ -100,5 +104,6 @@ void setupLocator() { locator.registerFactory(() => MyBalanceViewModel()); locator.registerFactory(() => FindusViewModel()); locator.registerFactory(() => LiveChatViewModel()); + locator.registerFactory(() => BloodDonationViewModel()); } diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 5ef49ab4..0ba0dbce 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -1,6 +1,9 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; +import 'package:diplomaticquarterapp/pages/Blood/advance_payment_page.dart'; +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; + import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; @@ -212,7 +215,7 @@ class _AllHabibMedicalServiceState extends State { ServicesContainer( onTap: () => Navigator.push( context, - FadePage(), + FadePage(page:BloodDonationPage()), ), imageLocation: 'assets/images/new-design/blood_icon.png', title: 'Blood Donation', diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart index e614c8d0..59163c15 100644 --- a/lib/pages/AlHabibMedicalService/my_web_view.dart +++ b/lib/pages/AlHabibMedicalService/my_web_view.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; -import 'package:tweet_webview/tweet_webview.dart'; class MyWebView extends StatelessWidget { final String title; diff --git a/lib/pages/Blood/advance_payment_page.dart b/lib/pages/Blood/advance_payment_page.dart new file mode 100644 index 00000000..dd3ea666 --- /dev/null +++ b/lib/pages/Blood/advance_payment_page.dart @@ -0,0 +1,397 @@ +// import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +// import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +// import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +// import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +// import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +// import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +// import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +// import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +// import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +// import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart'; +// import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +// import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +// 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/transitions/fade_page.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter/material.dart'; +// import 'package:smart_progress_bar/smart_progress_bar.dart'; +// +// //import '../../../core/model/my_balance/AdvanceModel.dart'; +// import 'confirm_payment_page.dart'; +// import 'dialogs/SelectBeneficiaryDialog.dart'; +// import 'dialogs/SelectPatientFamilyDialog.dart'; +// import 'dialogs/SelectPatientInfoDialog.dart'; +// import 'new_text_Field.dart'; +// +// enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } +// +// class AdvancePaymentPage extends StatefulWidget { +// @override +// _AdvancePaymentPageState createState() => _AdvancePaymentPageState(); +// } +// +// class _AdvancePaymentPageState extends State { +// TextEditingController _fileTextController = TextEditingController(); +// TextEditingController _notesTextController = TextEditingController(); +// BeneficiaryType beneficiaryType = BeneficiaryType.NON; +// HospitalsModel _selectedHospital; +// String amount = ""; +// String email; +// PatientInfo _selectedPatientInfo; +// AuthenticatedUser authenticatedUser; +// GetAllSharedRecordsByStatusList selectedPatientFamily; +// AdvanceModel advanceModel = AdvanceModel(); +// +// AppSharedPreferences sharedPref = AppSharedPreferences(); +// AuthenticatedUser authUser; +// +// @override +// void initState() { +// super.initState(); +// getAuthUser(); +// } +// +// @override +// Widget build(BuildContext context) { +// return BaseView( +// onModelReady: (model) => model.getHospitals(), +// builder: (_, model, w) => AppScaffold( +// isShowAppBar: true, +// appBarTitle: TranslationBase.of(context).advancePayment, +// body: SingleChildScrollView( +// physics: ScrollPhysics(), +// child: Container( +// margin: EdgeInsets.all(12), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts( +// TranslationBase.of(context).advancePaymentLabel, +// textAlign: TextAlign.center, +// ), +// SizedBox( +// height: 12, +// ), +// InkWell( +// onTap: () => confirmSelectBeneficiaryDialog(model), +// 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(getBeneficiaryType()), +// Icon(Icons.arrow_drop_down) +// ], +// ), +// ), +// ), +// 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, +// ), +// 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, +// ), +// InkWell( +// onTap: () => confirmSelectHospitalDialog(model.hospitals), +// 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(getHospitalName()), +// 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: MediaQuery.of(context).size.height * 0.15, +// ) +// ], +// ), +// ), +// ), +// bottomSheet: Container( +// height: MediaQuery.of(context).size.height * 0.1, +// width: double.infinity, +// padding: EdgeInsets.all(12), +// child: SecondaryButton( +// textColor: Colors.white, +// label: TranslationBase.of(context).submit, +// disabled: amount.isEmpty || +// _fileTextController.text.isEmpty || +// _selectedHospital == null, +// onTap: () { +// advanceModel.fileNumber = _fileTextController.text; +// advanceModel.hospitalsModel = _selectedHospital; +// advanceModel.note = _notesTextController.text; +// advanceModel.email = email ?? model.user.emailAddress; +// advanceModel.amount = amount; +// +// model.getPatientInfoByPatientIDAndMobileNumber().then((value) { +// if (model.state != ViewState.Error && +// model.state != ViewState.ErrorLocal) { +// Utils.hideKeyboard(context); +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => PaymentMethod())).then( +// (value) { +// Navigator.push( +// context, +// FadePage( +// page: ConfirmPaymentPage( +// advanceModel: advanceModel, +// selectedPaymentMethod: value, +// patientInfoAndMobileNumber: +// model.patientInfoAndMobileNumber, +// authenticatedUser: authUser, +// ), +// ), +// ); +// }, +// ); +// } +// }).showProgressBar( +// text: "Loading", +// backgroundColor: Colors.blue.withOpacity(0.6)); +// }, +// ), +// )), +// ); +// } +// +// void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) { +// showDialog( +// context: context, +// child: SelectBeneficiaryDialog( +// beneficiaryType: beneficiaryType, +// onValueSelected: (value) { +// setState(() { +// if (value == BeneficiaryType.MyAccount) { +// _fileTextController.text = model.user.patientID.toString(); +// advanceModel.depositorName = +// model.user.firstName + " " + model.user.lastName; +// } else +// _fileTextController.text = ""; +// +// beneficiaryType = value; +// }); +// }, +// ), +// ); +// } +// +// void confirmSelectHospitalDialog(List hospitals) { +// showDialog( +// context: context, +// child: SelectHospitalDialog( +// hospitals: hospitals, +// selectedHospital: _selectedHospital, +// onValueSelected: (value) { +// setState(() { +// _selectedHospital = value; +// }); +// }, +// ), +// ); +// } +// +// void confirmSelectPatientDialog(List patientInfoList) { +// showDialog( +// context: context, +// child: SelectPatientInfoDialog( +// patientInfoList: patientInfoList, +// selectedPatientInfo: _selectedPatientInfo, +// onValueSelected: (value) { +// setState(() { +// advanceModel.depositorName = value.fullName; +// _selectedPatientInfo = value; +// }); +// }, +// ), +// ); +// } +// +// void confirmSelectFamilyDialog( +// List getAllSharedRecordsByStatusList) { +// showDialog( +// context: context, +// child: SelectPatientFamilyDialog( +// getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList, +// selectedPatientFamily: selectedPatientFamily, +// onValueSelected: (value) { +// setState(() { +// selectedPatientFamily = value; +// _fileTextController.text = +// selectedPatientFamily.patientID.toString(); +// advanceModel.depositorName = value.patientName; +// }); +// }, +// ), +// ); +// } +// +// String getBeneficiaryType() { +// switch (beneficiaryType) { +// case BeneficiaryType.MyAccount: +// return TranslationBase.of(context).myAccount; +// case BeneficiaryType.MyFamilyFiles: +// return TranslationBase.of(context).myFamilyFiles; +// break; +// case BeneficiaryType.OtherAccount: +// return TranslationBase.of(context).otherAccount; +// break; +// case BeneficiaryType.NON: +// return TranslationBase.of(context).selectBeneficiary; +// } +// return TranslationBase.of(context).selectBeneficiary; +// } +// +// String getHospitalName() { +// if (_selectedHospital != null) +// return _selectedHospital.name; +// else +// return TranslationBase.of(context).selectHospital; +// } +// +// String getPatientName() { +// if (_selectedPatientInfo != null) +// return _selectedPatientInfo.fullName; +// else +// return TranslationBase.of(context).selectPatientName; +// } +// +// getAuthUser() async { +// if (await this.sharedPref.getObject(USER_PROFILE) != null) { +// var data = AuthenticatedUser.fromJson( +// await this.sharedPref.getObject(USER_PROFILE)); +// setState(() { +// authUser = data; +// }); +// } +// } +// +// String getFamilyMembersName() { +// if (selectedPatientFamily != null) +// return selectedPatientFamily.patientName; +// else +// return TranslationBase.of(context).selectFamilyPatientName; +// } +// } diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart new file mode 100644 index 00000000..bc262ec3 --- /dev/null +++ b/lib/pages/Blood/blood_donation.dart @@ -0,0 +1,696 @@ + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectCiteisDialog.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +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/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:giffy_dialog/giffy_dialog.dart'; +import 'package:smart_progress_bar/smart_progress_bar.dart'; + +//import '../../../core/model/my_balance/AdvanceModel.dart'; +import 'confirm_payment_page.dart'; +import 'dialogs/SelectBeneficiaryDialog.dart'; +import 'dialogs/SelectBloodDialog.dart'; +import 'dialogs/SelectGenderDialog.dart'; +import 'dialogs/SelectPatientFamilyDialog.dart'; +import 'dialogs/SelectPatientInfoDialog.dart'; +import 'new_text_Field.dart'; + +enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } +enum Gender{Male,Female,NON} +enum Blood{Oplus,Ominus,Aplus,Aminus,Bplus,Bminus,ABplus,ABminus,NON} + +class BloodDonationPage extends StatefulWidget { + @override + _BloodDonationPageState createState() => _BloodDonationPageState(); +} + +class _BloodDonationPageState extends State { + TextEditingController _fileTextController = TextEditingController(); + TextEditingController _notesTextController = TextEditingController(); + BeneficiaryType beneficiaryType = BeneficiaryType.NON; + Gender gender = Gender.NON; + Blood blood = Blood.NON; + //HospitalsModel _selectedHospital; + CitiesModel _selectedHospital; + String amount = ""; + String email; + PatientInfo _selectedPatientInfo; + AuthenticatedUser authenticatedUser; + GetAllSharedRecordsByStatusList selectedPatientFamily; + AdvanceModel advanceModel = AdvanceModel(); + + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUser authUser; + var checkedValue = false; + @override + void initState() { + super.initState(); + getAuthUser(); + } + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getCities(),//model.getHospitals(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: "Blood Donation",//TranslationBase.of(context).advancePayment, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + // TranslationBase.of(context).advancePaymentLabel, + "Enter the required information, In order to register for Blood Donation Service", + textAlign: TextAlign.center, + ), + SizedBox( + height: 12, + ), + InkWell( + onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),//model.hospitals + 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(getHospitalName()), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + InkWell( + //======Gender======== + onTap: () => confirmSelectGenderDialog(),//confirmSelectBeneficiaryDialog(model), + 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(getBeneficiaryType()), + Texts(getGender()), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + // 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, + ), + InkWell( + //======Gender======== + onTap: () => confirmSelectBloodDialog(),//confirmSelectBeneficiaryDialog(model), + 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(getBeneficiaryType()), + Texts(getBlood()), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + // 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, + ), + InkWell( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => UserAgreementPage())); + }, + child: Container( + child: Texts(" Click here ",color: Colors.blue,), + ), + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Checkbox( + onChanged: (bool value) { + setState(() { + checkedValue = value; + }); + }, + // tristate: checkedValue==true,//i == 1, + value: checkedValue, + activeColor: Colors.red,//Color(0xFF6200EE), + ), + SizedBox(height: 10,), + Row(children: [ + + ],), + SizedBox( + width: 10, + ), + Text( + 'I agree to the terms and conditions ', + style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue? Colors.red : Colors.black), + ), + ], + ), + // 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, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Center( + child: Container( + color: Colors.white, + width: 350, + child: InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => + AssetGiffyDialog( + title: Text( + "", + style: TextStyle( + fontSize: 22.0, + fontWeight: + FontWeight + .w600), + ), + image: Image.asset( + 'assets/images/BloodChrt_EN.png'), + buttonCancelText: + Text('cancel'), + buttonCancelColor: + Colors.grey, + onlyCancelButton: true, + )); + }, + child: Container( + width: 250, + height: 200, + child:Image.asset( + 'assets/images/BloodChrt_EN.png')), + ), + ), + ), + ], + ), + + SizedBox( + height: MediaQuery.of(context).size.height * 0.15, + ) + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).submit, + disabled: amount.isEmpty || + _fileTextController.text.isEmpty || + _selectedHospital == null, + onTap: () { + advanceModel.fileNumber = _fileTextController.text; + // advanceModel.hospitalsModel = _selectedHospital; + advanceModel.citiessModel = _selectedHospital; + advanceModel.note = _notesTextController.text; + advanceModel.email = email ?? model.user.emailAddress; + advanceModel.amount = amount; + + model.getPatientInfoByPatientIDAndMobileNumber().then((value) { + if (model.state != ViewState.Error && + model.state != ViewState.ErrorLocal) { + Utils.hideKeyboard(context); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PaymentMethod())).then( + (value) { + Navigator.push( + context, + FadePage( + page: ConfirmPaymentPage( + advanceModel: advanceModel, + selectedPaymentMethod: value, + patientInfoAndMobileNumber: + model.patientInfoAndMobileNumber, + authenticatedUser: authUser, + ), + ), + ); + }, + ); + } + }).showProgressBar( + text: "Loading", + backgroundColor: Colors.blue.withOpacity(0.6)); + }, + ), + )), + ); + } + //============== + void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) { + showDialog( + context: context, + child: SelectBeneficiaryDialog( + beneficiaryType: beneficiaryType, + onValueSelected: (value) { + setState(() { + if (value == BeneficiaryType.MyAccount) { + _fileTextController.text = model.user.patientID.toString(); + advanceModel.depositorName = + model.user.firstName + " " + model.user.lastName; + } else + _fileTextController.text = ""; + + beneficiaryType = value; + }); + }, + ), + ); + } + void confirmSelectBloodDialog(){ + showDialog( + context: context, + child: SelectBloodDialog(bloodType: blood, + onValueSelected: (value) { + setState(() { + if (value == Blood.Oplus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.Ominus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.ABplus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.ABminus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.Aplus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.Aminus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.Bplus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + }else + if (value == Blood.Bminus) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + } + + + else + _fileTextController.text = ""; + + // beneficiaryType = value; + blood=value; + } + + + + + ); + }, + ), + ); + } + void confirmSelectGenderDialog(){ + showDialog( + context: context, + child: SelectGenderDialog(beneficiaryType: gender, + onValueSelected: (value) { + setState(() { + if (value == Gender.Male) { + // _fileTextController.text = model.user.patientID.toString(); + // advanceModel.depositorName = + // model.user.firstName + " " + model.user.lastName; + } else + _fileTextController.text = ""; + + // beneficiaryType = value; + gender=value; + }); + }, + ), + ); + } + +//void confirmSelectHospitalDialog(List hospitals) { + void confirmSelectHospitalDialog(List hospitals) { + showDialog( + context: context, + child: SelectCiteisDialog( + hospitals: hospitals, + selectedHospital: _selectedHospital, + onValueSelected: (value) { + setState(() { + _selectedHospital = value; + }); + }, + ), + ); + } + + void confirmSelectPatientDialog(List patientInfoList) { + showDialog( + context: context, + child: SelectPatientInfoDialog( + patientInfoList: patientInfoList, + selectedPatientInfo: _selectedPatientInfo, + onValueSelected: (value) { + setState(() { + advanceModel.depositorName = value.fullName; + _selectedPatientInfo = value; + }); + }, + ), + ); + } + + void confirmSelectFamilyDialog( + List getAllSharedRecordsByStatusList) { + showDialog( + context: context, + child: SelectPatientFamilyDialog( + getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList, + selectedPatientFamily: selectedPatientFamily, + onValueSelected: (value) { + setState(() { + selectedPatientFamily = value; + _fileTextController.text = + selectedPatientFamily.patientID.toString(); + advanceModel.depositorName = value.patientName; + }); + }, + ), + ); + } + + String getBeneficiaryType() { + switch (beneficiaryType) { + case BeneficiaryType.MyAccount: + return TranslationBase.of(context).myAccount; + case BeneficiaryType.MyFamilyFiles: + return TranslationBase.of(context).myFamilyFiles; + break; + case BeneficiaryType.OtherAccount: + return TranslationBase.of(context).otherAccount; + break; + case BeneficiaryType.NON: + return "Select Gender";//TranslationBase.of(context).selectBeneficiary; + } + return "Select Gender";//TranslationBase.of(context).selectBeneficiary; + } + String getGender() { + switch (gender) { + case Gender.Male: + return "Male"; + case Gender.Female: + return "Female"; + break; + + case Gender.NON: + return "Select Gender";//TranslationBase.of(context).selectBeneficiary; + } + return "Select Gender";//TranslationBase.of(context).selectBeneficiary; + } + String getBlood() { + switch (blood) { + case Blood.Oplus: + return "O+"; + break; + case Blood.Ominus: + return "O-"; + break; + case Blood.ABplus: + return "AB+"; + break; + case Blood.ABminus: + return "AB-"; + break; + case Blood.Aplus: + return "A+"; + break; + case Blood.Aminus: + return "A-"; + break; + case Blood.Bplus: + return "B-"; + break; + case Blood.Bminus: + return "B-"; + break; + case Blood.Bplus: + return "B+"; + break; + + case Blood.NON: + return "Select Blood Type";//TranslationBase.of(context).selectBeneficiary; + } + return "Select Blood Type";//TranslationBase.of(context).selectBeneficiary; + } + + String getHospitalName() { + if (_selectedHospital != null) + return _selectedHospital.description; + else + return "Select City";//TranslationBase.of(context).selectHospital; + } + + String getPatientName() { + if (_selectedPatientInfo != null) + return _selectedPatientInfo.fullName; + else + return TranslationBase.of(context).selectPatientName; + } + + getAuthUser() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson( + await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + } + + String getFamilyMembersName() { + if (selectedPatientFamily != null) + return selectedPatientFamily.patientName; + else + return TranslationBase.of(context).selectFamilyPatientName; + } + + + //================ + + +} diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart new file mode 100644 index 00000000..cc5df0a6 --- /dev/null +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -0,0 +1,306 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +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/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:smart_progress_bar/smart_progress_bar.dart'; + +import 'dialogs/ConfirmSMSDialog.dart'; +import 'new_text_Field.dart'; + +class ConfirmPaymentPage extends StatelessWidget { + final AdvanceModel advanceModel; + final PatientInfoAndMobileNumber patientInfoAndMobileNumber; + final String selectedPaymentMethod; + MyInAppBrowser browser; + AuthenticatedUser authenticatedUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + ConfirmPaymentPage( + {this.advanceModel, + this.patientInfoAndMobileNumber, + this.selectedPaymentMethod, + this.authenticatedUser}); + + @override + Widget build(BuildContext context) { + void showSMSDialog() { + showDialog( + context: context, + barrierDismissible: false, + child: ConfirmSMSDialog( + phoneNumber: patientInfoAndMobileNumber.mobileNumber, + ), + ).then((value) { + print("dialog dismissed"); + print(value); + if (value != null && value) { + AppoitmentAllHistoryResultList appo = + new AppoitmentAllHistoryResultList(); + appo.projectID = patientInfoAndMobileNumber.projectID; + openPayment(selectedPaymentMethod, authenticatedUser, + double.parse(advanceModel.amount), appo); + } + }); + } + + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).advancePayment, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).confirmThePayment, + textAlign: TextAlign.center, + fontWeight: FontWeight.w500, + fontSize: 24, + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + height: 100.0, + padding: EdgeInsets.all(7.0), + width: MediaQuery.of(context).size.width * 0.45, + child: Image.asset(getImagePath(selectedPaymentMethod)), + ), + Texts( + '${advanceModel.amount} SAR', + fontSize: 26, + bold: true, + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).fileNumber, + initialValue: advanceModel.fileNumber, + isEnabled: false, + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).name, + initialValue: patientInfoAndMobileNumber.firstName, + isEnabled: false, + ), + ), + ), + ], + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).mobileNumber, + initialValue: patientInfoAndMobileNumber.mobileNumber, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).depositorName, + initialValue: advanceModel.depositorName, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).notes, + initialValue: advanceModel.note, + isEnabled: false, + ), + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).confirm.toUpperCase(), + disabled: model.state == ViewState.Busy, + onTap: () { + model + .sendActivationCodeForAdvancePayment( + patientID: int.parse(advanceModel.fileNumber), + projectID: advanceModel.hospitalsModel.iD) + .then((value) { + if (model.state != ViewState.ErrorLocal && + model.state != ViewState.Error) showSMSDialog(); + }).showProgressBar( + text: "Loading", + backgroundColor: Colors.blue.withOpacity(0.6)); + }, + ), + ), + ), + ); + } + + String getImagePath(String paymentMethod) { + switch (paymentMethod) { + case "MADA": + return 'assets/images/new-design/mada.png'; + break; + case "SADAD": + return 'assets/images/new-design/sadad.png'; + break; + case "VISA": + return 'assets/images/new-design/visa.png'; + break; + case "MASTERCARD": + return 'assets/images/new-design/mastercard.png'; + break; + case "Installment": + return 'assets/images/new-design/installment.png'; + break; + } + + return 'assets/images/new-design/mada.png'; + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, + double amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser( + onExitCallback: onBrowserExit, + appo: appo, + onLoadStartCallback: onBrowserLoadStart); + + browser.openPaymentBrowser( + amount, + "Advance Payment", + Utils.getAdvancePaymentTransID( + authenticatedUser.projectID, authenticatedUser.patientID), + appo.projectID.toString(), + authenticatedUser.emailAddress, + paymentMethod, + authenticatedUser, + browser); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) checkPaymentStatus(appo); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service + .checkPaymentStatus( + Utils.getAppointmentTransID( + appo.projectID, appo.clinicID, appo.appointmentNo), + AppGlobal.context) + .then((res) { + print("Printing Payment Status Reponse!!!!"); + print(res); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + print(err); + }).showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service + .createAdvancePayment(appo, res['Amount'], res['Fort_id'], + res['PaymentMethod'], AppGlobal.context) + .then((res) { + print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); + addAdvancedNumberRequest( + res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString(), + appo); + }).catchError((err) { + print(err); + }).showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, + String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service + .addAdvancedNumberRequest( + advanceNumber, paymentReference, appointmentID, AppGlobal.context) + .then((res) { + print(res); + navigateToHome(AppGlobal.context); + }).catchError((err) { + print(err); + }).showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } + +} diff --git a/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart b/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart new file mode 100644 index 00000000..8dd2b29e --- /dev/null +++ b/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart @@ -0,0 +1,375 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:smart_progress_bar/smart_progress_bar.dart'; + +class ConfirmSMSDialog extends StatefulWidget { + final String phoneNumber; + final AdvanceModel advanceModel; + final PatientInfoAndMobileNumber patientInfoAndMobileNumber; + final String selectedPaymentMethod; + + const ConfirmSMSDialog( + {Key key, + this.phoneNumber, + this.advanceModel, + this.selectedPaymentMethod, + this.patientInfoAndMobileNumber}) + : super(key: key); + + @override + _ConfirmSMSDialogState createState() => _ConfirmSMSDialogState(); +} + +class _ConfirmSMSDialogState extends State { + final verifyAccountForm = GlobalKey(); + Map verifyAccountFormValue = { + 'digit1': null, + 'digit2': null, + 'digit3': null, + 'digit4': null, + }; + + TextEditingController digit1 = TextEditingController(text: ""); + TextEditingController digit2 = TextEditingController(text: ""); + TextEditingController digit3 = TextEditingController(text: ""); + TextEditingController digit4 = TextEditingController(text: ""); + + String timerText = (TIMER_MIN - 1).toString() + ':59'; + int min = TIMER_MIN - 1; + int sec = 59; + Timer _timer; + + resendCode() { + min = TIMER_MIN - 1; + sec = 59; + _timer = Timer.periodic(Duration(seconds: 1), (Timer timer) { + if (min <= 0 && sec <= 0) { + timer.cancel(); + } else { + setState(() { + sec = sec - 1; + if (sec == 0 && min == 0) { + Navigator.pop(context); + min = 0; + sec = 0; + } else if (sec == 0) { + min = min - 1; + sec = 59; + } + timerText = min.toString() + ':' + sec.toString(); + }); + } + }); + } + + FocusNode focusD1; + FocusNode focusD2; + FocusNode focusD3; + FocusNode focusD4; + + @override + void initState() { + super.initState(); + resendCode(); + focusD1 = FocusNode(); + focusD2 = FocusNode(); + focusD3 = FocusNode(); + focusD4 = FocusNode(); + } + + @override + void dispose() { + _timer.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => Dialog( + elevation: 0.6, + child: Container( + height: 520, + child: ListView( + children: [ + Container( + width: double.infinity, + height: 40, + color: Colors.grey[700], + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 4, + child: Center( + child: Texts( + 'SMS', + color: Colors.white, + textAlign: TextAlign.center, + ))), + Expanded( + flex: 1, + child: InkWell( + onTap: () => Navigator.pop(context), + child: Container( + decoration: BoxDecoration( + shape: BoxShape.circle, color: Colors.white), + child: Icon( + Icons.clear, + color: Colors.grey[900], + )), + ), + ) + ], + ), + ), + Image.asset( + 'assets/images/login/103.png', + height: MediaQuery.of(context).size.width * 0.25, + width: MediaQuery.of(context).size.width * 0.25, + ), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).pleaseEnterTheVerificationCode + + '[${widget.phoneNumber}]', + textAlign: TextAlign.center, + ), + ), + SizedBox( + height: 12, + ), + Form( + key: verifyAccountForm, + child: Container( + width: SizeConfig.realScreenWidth * 0.90, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 30, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + width: 65, + child: TextFormField( + textInputAction: TextInputAction.next, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 3, + ), + focusNode: focusD1, + maxLength: 1, + controller: digit1, + textAlign: TextAlign.center, + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + onSaved: (val) { + verifyAccountFormValue['digit1'] = val; + }, + validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD2); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD2); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD2, + controller: digit2, + textInputAction: TextInputAction.next, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit2'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD3); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD3); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD3, + controller: digit3, + textInputAction: TextInputAction.next, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit3'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + } + }, + )), + Container( + width: 65, + child: TextFormField( + focusNode: focusD4, + controller: digit4, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit4'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + submit(model); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + submit(model); + } + }), + ) + ], + ), + SizedBox( + height: 8, + ), + if (model.state == ViewState.ErrorLocal || + model.state == ViewState.Error) + Container( + margin: EdgeInsets.only(left: 8, right: 8), + width: double.maxFinite, + child: Texts( + model.error, + color: Colors.red, + ), + ), + SizedBox(height: 20), + // buildText(), + + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context) + .theVerificationCodeExpiresIn + + ' $timerText', + textAlign: TextAlign.center, + ), + ), + SizedBox(height: 20), + + Container( + width: double.maxFinite, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: + TranslationBase.of(context).submit.toUpperCase(), + onTap: () { + submit(model); + }, + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ); + } + + void submit(MyBalanceViewModel model) { + if (verifyAccountForm.currentState.validate()) { + final activationCode = + digit1.text + digit2.text + digit3.text + digit4.text; + model + .checkActivationCodeForAdvancePayment(activationCode: activationCode) + .then((value) {}) + .showProgressBar( + text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) + .then((value) { + Navigator.pop(context, true); + }); + } + } + + String validateCodeDigit(value) { + if (value.isEmpty) { + return ''; + } + return null; + } + + InputDecoration buildInputDecoration(BuildContext context) { + return InputDecoration( + // ts/images/password_icon.png + contentPadding: EdgeInsets.only(top: 20, bottom: 20), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5)), + borderSide: BorderSide(color: Colors.black), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart b/lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart new file mode 100644 index 00000000..eae22f36 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart @@ -0,0 +1,177 @@ +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +//import '../advance_payment_page.dart'; + +class SelectBeneficiaryDialog extends StatefulWidget { + final BeneficiaryType beneficiaryType; + final Function(BeneficiaryType) onValueSelected; + + SelectBeneficiaryDialog( + {Key key, this.beneficiaryType, this.onValueSelected}); + + @override + _SelectBeneficiaryDialogState createState() => + _SelectBeneficiaryDialogState(this.beneficiaryType); +} + +class _SelectBeneficiaryDialogState extends State { + _SelectBeneficiaryDialogState(this.beneficiaryType); + + BeneficiaryType beneficiaryType; + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = BeneficiaryType.MyAccount; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).myAccount), + leading: Radio( + value: BeneficiaryType.MyAccount, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (BeneficiaryType value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = BeneficiaryType.MyFamilyFiles; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).myFamilyFiles), + leading: Radio( + value: BeneficiaryType.MyFamilyFiles, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (BeneficiaryType value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = BeneficiaryType.OtherAccount; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).otherAccount), + leading: Radio( + value: BeneficiaryType.OtherAccount, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (BeneficiaryType value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectBloodDialog.dart b/lib/pages/Blood/dialogs/SelectBloodDialog.dart new file mode 100644 index 00000000..23e9e753 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectBloodDialog.dart @@ -0,0 +1,328 @@ +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + + +class SelectBloodDialog extends StatefulWidget { + + final Blood bloodType; + final Function(Blood) onValueSelected; + + SelectBloodDialog({Key key, this.bloodType, this.onValueSelected}); + + + + @override + _SelectBloodDialogState createState() => _SelectBloodDialogState(this.bloodType); +} + +class _SelectBloodDialogState extends State { + _SelectBloodDialogState(this.bloodType); + Blood bloodType; + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.Oplus; + }); + }, + child: ListTile( + title: Text("O+"), + leading: Radio( + value: Blood.Oplus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.Ominus; + }); + }, + child: ListTile( + title: Text("O-"), + leading: Radio( + value: Blood.Ominus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.ABminus; + }); + }, + child: ListTile( + title: Text("AB-"), + leading: Radio( + value: Blood.ABminus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.ABplus; + }); + }, + child: ListTile( + title: Text("AB+"), + leading: Radio( + value: Blood.ABplus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.Aplus; + }); + }, + child: ListTile( + title: Text("A+"), + leading: Radio( + value: Blood.Aplus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.Aminus; + }); + }, + child: ListTile( + title: Text("A-"), + leading: Radio( + value: Blood.Aminus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.Bplus; + }); + }, + child: ListTile( + title: Text("B+"), + leading: Radio( + value: Blood.Bplus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + bloodType = Blood.Bminus; + }); + }, + child: ListTile( + title: Text("B-"), + leading: Radio( + value: Blood.Bminus, + groupValue: bloodType, + activeColor: Colors.red[800], + onChanged: (Blood value) { + setState(() { + bloodType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(bloodType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectGenderDialog.dart b/lib/pages/Blood/dialogs/SelectGenderDialog.dart new file mode 100644 index 00000000..295c6dcd --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectGenderDialog.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectGenderDialog extends StatefulWidget { + final Gender beneficiaryType; + final Function(Gender) onValueSelected; + + SelectGenderDialog({Key key, this.beneficiaryType, this.onValueSelected}); + + @override + _SelectGenderDialogState createState() => + _SelectGenderDialogState(this.beneficiaryType); +} + +class _SelectGenderDialogState extends State { + _SelectGenderDialogState(this.beneficiaryType); + Gender beneficiaryType; + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = Gender.Male; + }); + }, + child: ListTile( + title: Text("Male"), + leading: Radio( + value: Gender.Male, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (Gender value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = Gender.Female; + }); + }, + child: ListTile( + title: Text("Female"), + leading: Radio( + value: Gender.Female, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (Gender value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectHospitalDialog.dart b/lib/pages/Blood/dialogs/SelectHospitalDialog.dart new file mode 100644 index 00000000..9a4a359d --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectHospitalDialog.dart @@ -0,0 +1,129 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectHospitalDialog extends StatefulWidget { + final List hospitals; + final Function(HospitalsModel) onValueSelected; + HospitalsModel selectedHospital; + + SelectHospitalDialog( + {Key key, this.hospitals, this.onValueSelected, this.selectedHospital}); + + @override + _SelectHospitalDialogState createState() => _SelectHospitalDialogState(); +} + +class _SelectHospitalDialogState extends State { + @override + void initState() { + super.initState(); + widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.hospitals.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedHospital = widget.hospitals[index]; + }); + }, + child: ListTile( + title: Text(widget.hospitals[index].name + + ' ${widget.hospitals[index].distanceInKilometers} KM'), + leading: Radio( + value: widget.hospitals[index], + groupValue: widget.selectedHospital, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedHospital = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedHospital); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart b/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart new file mode 100644 index 00000000..5808aed8 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart @@ -0,0 +1,130 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectPatientFamilyDialog extends StatefulWidget { + final List getAllSharedRecordsByStatusList; + final Function(GetAllSharedRecordsByStatusList) onValueSelected; + GetAllSharedRecordsByStatusList selectedPatientFamily; + + SelectPatientFamilyDialog({Key key, this.getAllSharedRecordsByStatusList, this.onValueSelected,this.selectedPatientFamily}); + + @override + _SelectPatientFamilyDialogState createState() => _SelectPatientFamilyDialogState(); +} + +class _SelectPatientFamilyDialogState extends State { + + @override + void initState() { + super.initState(); + widget.selectedPatientFamily = widget.selectedPatientFamily?? widget.getAllSharedRecordsByStatusList[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.getAllSharedRecordsByStatusList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedPatientFamily = widget.getAllSharedRecordsByStatusList[index]; + }); + }, + child: ListTile( + title: Text(widget.getAllSharedRecordsByStatusList[index].patientName), + leading: Radio( + value: widget.getAllSharedRecordsByStatusList[index], + groupValue: widget.selectedPatientFamily, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedPatientFamily = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedPatientFamily); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart b/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart new file mode 100644 index 00000000..bea4f694 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart @@ -0,0 +1,130 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectPatientInfoDialog extends StatefulWidget { + final List patientInfoList ; + final Function(PatientInfo) onValueSelected; + PatientInfo selectedPatientInfo; + + SelectPatientInfoDialog({Key key, this.patientInfoList, this.onValueSelected,this.selectedPatientInfo}); + + @override + _SelectPatientInfoDialogState createState() => _SelectPatientInfoDialogState(); +} + +class _SelectPatientInfoDialogState extends State { + + @override + void initState() { + super.initState(); + widget.selectedPatientInfo = widget.selectedPatientInfo?? widget.patientInfoList[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.patientInfoList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedPatientInfo = widget.patientInfoList[index]; + }); + }, + child: ListTile( + title: Text(widget.patientInfoList[index].fullName), + leading: Radio( + value: widget.patientInfoList[index], + groupValue: widget.selectedPatientInfo, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedPatientInfo = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedPatientInfo); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/Blood/my_balance_page.dart b/lib/pages/Blood/my_balance_page.dart new file mode 100644 index 00000000..07d27e2d --- /dev/null +++ b/lib/pages/Blood/my_balance_page.dart @@ -0,0 +1,109 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import 'advance_payment_page.dart'; +import 'blood_donation.dart'; + +class MyBalancePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getPatientAdvanceBalanceAmount(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).myBalances, + body: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).balanceAmount, + color: Colors.black, + bold: true, + ), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.all(8), + width: double.infinity, + height: 65, + decoration: BoxDecoration( + color: Hexcolor('#B61422'), + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(7), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).totalBalance, + color: Colors.white, + ), + Texts( + '${model.totalAdvanceBalanceAmount ?? 0} SAR', + color: Colors.white, + bold: true, + ), + ], + ), + ), + SizedBox( + height: 9, + ), + ...List.generate( + model.patientAdvanceBalanceAmountList.length, + (index) => Container( + padding: EdgeInsets.all(8), + height: 65, + margin: EdgeInsets.only(top: 8), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(7), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(model.patientAdvanceBalanceAmountList[index] + .projectDescription), + Texts( + '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} SAR', + bold: true, + ), + ], + ), + ), + ), + ], + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + // color: Colors.grey[900], + textColor: Colors.white, + label: TranslationBase.of(context).createAdvancedPayment, + onTap: () { + Navigator.push(context, + //FadePage(page: AdvancePaymentPage())); + FadePage(page: BloodDonationPage())); + }, + ), + ), + ), + ); + } +} diff --git a/lib/pages/Blood/new_text_Field.dart b/lib/pages/Blood/new_text_Field.dart new file mode 100644 index 00000000..ad9eb580 --- /dev/null +++ b/lib/pages/Blood/new_text_Field.dart @@ -0,0 +1,239 @@ +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class NumberTextInputFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, TextEditingValue newValue) { + final int newTextLength = newValue.text.length; + int selectionIndex = newValue.selection.end; + int usedSubstringIndex = 0; + final StringBuffer newText = StringBuffer(); + if (newTextLength >= 1) { + newText.write('('); + if (newValue.selection.end >= 1) selectionIndex++; + } + if (newTextLength >= 4) { + newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') '); + if (newValue.selection.end >= 3) selectionIndex += 2; + } + if (newTextLength >= 7) { + newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-'); + if (newValue.selection.end >= 6) selectionIndex++; + } + if (newTextLength >= 11) { + newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' '); + if (newValue.selection.end >= 10) selectionIndex++; + } + // Dump the rest. + if (newTextLength >= usedSubstringIndex) + newText.write(newValue.text.substring(usedSubstringIndex)); + return TextEditingValue( + text: newText.toString(), + selection: TextSelection.collapsed(offset: selectionIndex), + ); + } +} + +final _mobileFormatter = NumberTextInputFormatter(); + +class NewTextFields extends StatefulWidget { + NewTextFields( + {Key key, + this.type, + this.hintText, + this.suffixIcon, + this.autoFocus, + this.onChanged, + this.initialValue, + this.minLines, + this.maxLines, + this.inputFormatters, + this.padding, + this.focus = false, + this.maxLengthEnforced = true, + this.suffixIconColor, + this.inputAction, + this.onSubmit, + this.keepPadding = true, + this.textCapitalization = TextCapitalization.none, + this.controller, + this.keyboardType, + this.validator, + this.borderOnlyError = false, + this.onSaved, + this.onSuffixTap, + this.readOnly: false, + this.maxLength, + this.prefixIcon, + this.bare = false, + this.onTap, + this.fontSize = 16.0, + this.fontWeight = FontWeight.w700, + this.autoValidate = false, + this.hintColor,this.isEnabled=true}) + : super(key: key); + + final String hintText; + + // final String initialValue; + final String type; + final bool autoFocus; + final IconData suffixIcon; + final Color suffixIconColor; + final Icon prefixIcon; + final VoidCallback onTap; + final TextEditingController controller; + final TextInputType keyboardType; + final FormFieldValidator validator; + final Function onSaved; + final Function onSuffixTap; + final Function onChanged; + final Function onSubmit; + final bool readOnly; + final int maxLength; + final int minLines; + final int maxLines; + final bool maxLengthEnforced; + final bool bare; + final bool isEnabled; + final TextInputAction inputAction; + final double fontSize; + final FontWeight fontWeight; + final bool keepPadding; + final TextCapitalization textCapitalization; + final List inputFormatters; + final bool autoValidate; + final EdgeInsets padding; + final bool focus; + final bool borderOnlyError; + final Color hintColor; + final String initialValue; + @override + _NewTextFieldsState createState() => _NewTextFieldsState(); +} + +class _NewTextFieldsState extends State { + final FocusNode _focusNode = FocusNode(); + bool focus = false; + bool view = false; + + @override + void initState() { + super.initState(); + _focusNode.addListener(() { + setState(() { + focus = _focusNode.hasFocus; + }); + }); + } + + @override + void didUpdateWidget(NewTextFields oldWidget) { + if (widget.focus) _focusNode.requestFocus(); + super.didUpdateWidget(oldWidget); + } + + @override + void dispose() { + _focusNode.dispose(); + super.dispose(); + } + + + bool _determineReadOnly() { + if (widget.readOnly != null && widget.readOnly) { + _focusNode.unfocus(); + return true; + } else { + return false; + } + } + + @override + Widget build(BuildContext context) { + return AnimatedContainer( + duration: Duration(milliseconds: 300), + decoration:BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Container( + margin: EdgeInsets.only(top: 8), + + child: TextFormField( + enabled: widget.isEnabled, + initialValue: widget.initialValue, + keyboardAppearance: Theme.of(context).brightness, + scrollPhysics: BouncingScrollPhysics(), + autovalidate: widget.autoValidate, + textCapitalization: widget.textCapitalization, + onFieldSubmitted: widget.inputAction == TextInputAction.next + ? (widget.onSubmit != null + ? widget.onSubmit + : (val) { + _focusNode.nextFocus(); + }) + : widget.onSubmit, + textInputAction: widget.inputAction, + minLines: widget.minLines ?? 1, + maxLines: widget.maxLines ?? 1, + maxLengthEnforced: widget.maxLengthEnforced, + onChanged: widget.onChanged, + focusNode: _focusNode, + maxLength: widget.maxLength ?? null, + controller: widget.controller, + keyboardType: widget.keyboardType, + readOnly: _determineReadOnly(), + obscureText: widget.type == "password" && !view ? true : false, + autofocus: widget.autoFocus ?? false, + validator: widget.validator, + onSaved: widget.onSaved, + + style: Theme.of(context) + .textTheme + .body2 + .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), + inputFormatters: widget.keyboardType == TextInputType.phone + ? [ + WhitelistingTextInputFormatter.digitsOnly, + _mobileFormatter, + ] + : widget.inputFormatters, + decoration: InputDecoration( + labelText: widget.hintText, + labelStyle: TextStyle(color: Colors.black), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .errorColor + .withOpacity(0.5), + width: 1.0), + borderRadius: BorderRadius.circular(12.0)), + focusedErrorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .errorColor + .withOpacity(0.5), + width: 1.0), + borderRadius: BorderRadius.circular(8.0)), + focusedBorder: OutlineInputBorder( + borderSide: + BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12)), + disabledBorder: OutlineInputBorder( + borderSide: + BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12)), + enabledBorder: OutlineInputBorder( + borderSide: + BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/Blood/user_agreement_page.dart b/lib/pages/Blood/user_agreement_page.dart new file mode 100644 index 00000000..075dce4d --- /dev/null +++ b/lib/pages/Blood/user_agreement_page.dart @@ -0,0 +1,55 @@ +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; + +class UserAgreementPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: "User Agreement", + + body: + Container( + child:ListView( + scrollDirection: Axis.vertical, + children: [ + /////////// + Column( + children: [ + SizedBox( + height: 20, + ), + Container( + child: Text("Communication via email, text messages and phone calls"), + ), + SizedBox( + height: 20, + ), + Container( + child: + Text("I understand that the contact number or Email that I have provided on registration will be used for communication by HMG. I hereby agree to be notified by HMG through SMS, Email or any other method for appointments notifications, current HMG’s medical services, and any services introduced by the HMG in the future or any modifications made to the services offered by the HMG. And these messages may be submitted as evidence where the HMG has the right to use at any time whatsoever and as it sees fit."), + ), + SizedBox( + height: 20, + ), + Container( + child: + Text("I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that HMG cannot guarantee the security and confidentiality of email or text communication. HMG will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct."), + ), + SizedBox( + height: 20, + ), + Container( + child: + Text("I hereby agree to receive emails, text messages, phone calls for appointments notifications, special promotions and new features or products introduced by HMG or any third party."), + ), + ], + ) + /////////// + ]) + + + + )); + } +} diff --git a/lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart b/lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart new file mode 100644 index 00000000..3d07c08c --- /dev/null +++ b/lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart @@ -0,0 +1,132 @@ +//import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectCiteisDialog extends StatefulWidget { + final List hospitals; + final Function(CitiesModel) onValueSelected; + CitiesModel selectedHospital; + + SelectCiteisDialog( + {Key key, this.hospitals, this.onValueSelected, this.selectedHospital}); + @override + _SelectCiteisDialogState createState() => _SelectCiteisDialogState(); +} + +class _SelectCiteisDialogState extends State { + @override + void initState() { + super.initState(); + + widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0]; + } + + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.hospitals.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedHospital = widget.hospitals[index]; + }); + }, + child: ListTile( + // title: Text(widget.hospitals[index].description + + // ' ${widget.hospitals[index].distanceInKilometers} KM'), + title: Text(widget.hospitals[index].description), + leading: Radio( + value: widget.hospitals[index], + groupValue: widget.selectedHospital, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedHospital = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedHospital); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index b5a2444a..8aa07a19 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,6 @@ dependencies: intl: ^0.16.1 # web view webview_flutter: ^0.3.24 - tweet_webview: ^0.2.2 # http client http: ^0.12.1 connectivity: ^0.4.9 From 0ec39920f01196e6971909afa063888fa1b97cb8 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 30 Sep 2020 15:32:08 +0300 Subject: [PATCH 2/5] Blood Denote --- lib/pages/Blood/blood_donation.dart | 84 +++++++++++++++-------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index bc262ec3..a7a1d089 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -389,51 +389,53 @@ class _BloodDonationPageState extends State { ), ), bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.1, + height: MediaQuery.of(context).size.height * 0.12, width: double.infinity, + padding: EdgeInsets.all(12), child: SecondaryButton( textColor: Colors.white, - label: TranslationBase.of(context).submit, - disabled: amount.isEmpty || - _fileTextController.text.isEmpty || - _selectedHospital == null, - onTap: () { - advanceModel.fileNumber = _fileTextController.text; - // advanceModel.hospitalsModel = _selectedHospital; - advanceModel.citiessModel = _selectedHospital; - advanceModel.note = _notesTextController.text; - advanceModel.email = email ?? model.user.emailAddress; - advanceModel.amount = amount; - - model.getPatientInfoByPatientIDAndMobileNumber().then((value) { - if (model.state != ViewState.Error && - model.state != ViewState.ErrorLocal) { - Utils.hideKeyboard(context); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => PaymentMethod())).then( - (value) { - Navigator.push( - context, - FadePage( - page: ConfirmPaymentPage( - advanceModel: advanceModel, - selectedPaymentMethod: value, - patientInfoAndMobileNumber: - model.patientInfoAndMobileNumber, - authenticatedUser: authUser, - ), - ), - ); - }, - ); - } - }).showProgressBar( - text: "Loading", - backgroundColor: Colors.blue.withOpacity(0.6)); - }, + color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), + + label: "Save", + // + + // onTap: () { + // advanceModel.fileNumber = _fileTextController.text; + // // advanceModel.hospitalsModel = _selectedHospital; + // advanceModel.citiessModel = _selectedHospital; + // advanceModel.note = _notesTextController.text; + // advanceModel.email = email ?? model.user.emailAddress; + // advanceModel.amount = amount; + // + // model.getPatientInfoByPatientIDAndMobileNumber().then((value) { + // if (model.state != ViewState.Error && + // model.state != ViewState.ErrorLocal) { + // Utils.hideKeyboard(context); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => PaymentMethod())).then( + // (value) { + // Navigator.push( + // context, + // FadePage( + // page: ConfirmPaymentPage( + // advanceModel: advanceModel, + // selectedPaymentMethod: value, + // patientInfoAndMobileNumber: + // model.patientInfoAndMobileNumber, + // authenticatedUser: authUser, + // ), + // ), + // ); + // }, + // ); + // } + // }).showProgressBar( + // text: "Loading", + // backgroundColor: Colors.blue.withOpacity(0.6)); + // }, ), )), ); From 675d5445148e1697d096c64b255486b486d7c06f Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 30 Sep 2020 15:52:12 +0300 Subject: [PATCH 3/5] Blood Denote --- lib/pages/Blood/user_agreement_page.dart | 8 ++++---- lib/widgets/buttons/secondary_button.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pages/Blood/user_agreement_page.dart b/lib/pages/Blood/user_agreement_page.dart index 075dce4d..d05725b4 100644 --- a/lib/pages/Blood/user_agreement_page.dart +++ b/lib/pages/Blood/user_agreement_page.dart @@ -20,28 +20,28 @@ class UserAgreementPage extends StatelessWidget { height: 20, ), Container( - child: Text("Communication via email, text messages and phone calls"), + child:Text("Communication via email, text messages and phone calls",textAlign: TextAlign.center,style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16)), ), SizedBox( height: 20, ), Container( child: - Text("I understand that the contact number or Email that I have provided on registration will be used for communication by HMG. I hereby agree to be notified by HMG through SMS, Email or any other method for appointments notifications, current HMG’s medical services, and any services introduced by the HMG in the future or any modifications made to the services offered by the HMG. And these messages may be submitted as evidence where the HMG has the right to use at any time whatsoever and as it sees fit."), + Text("I understand that the contact number or Email that \n I have provided on registration will be used for communication by HMG.\n I hereby agree to be notified by HMG through SMS, Email or any other method for appointments notifications, current HMG’s medical services, and any services introduced by the HMG in the future or any modifications made to the services offered by the HMG. And these messages may be submitted as evidence where the HMG has the right to use at any time whatsoever and as it sees fit.",textAlign: TextAlign.center,style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16)), ), SizedBox( height: 20, ), Container( child: - Text("I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that HMG cannot guarantee the security and confidentiality of email or text communication. HMG will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct."), + Text("I understand the risks of communicating by email and text messages, in particular the privacy risks. \nI understand that HMG cannot guarantee the security and confidentiality of email or text communication. HMG will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.",textAlign: TextAlign.center,style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16)), ), SizedBox( height: 20, ), Container( child: - Text("I hereby agree to receive emails, text messages, phone calls for appointments notifications, special promotions and new features or products introduced by HMG or any third party."), + Text("\b I hereby agree to receive emails, text messages, phone calls for appointments notifications, special promotions and new features or products introduced by HMG or any third party.",textAlign: TextAlign.center,style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16)), ), ], ) diff --git a/lib/widgets/buttons/secondary_button.dart b/lib/widgets/buttons/secondary_button.dart index 65bb8d36..f3f7b4a8 100644 --- a/lib/widgets/buttons/secondary_button.dart +++ b/lib/widgets/buttons/secondary_button.dart @@ -18,7 +18,7 @@ class SecondaryButton extends StatefulWidget { this.label = "", this.icon, this.iconOnly = false, - this.color: const Color.fromRGBO(63, 72, 74, 1), + this.color:const Color.fromRGBO(63, 72, 74, 1), this.textColor, this.onTap, this.loading: false, From a00b3a133c870fcff403a9a43caf866454d00b7e Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 30 Sep 2020 17:06:05 +0300 Subject: [PATCH 4/5] Blood Denote --- lib/config/config.dart | 4 + .../blooddonation/blood_groub_details.dart | 77 +++++++++++++++++++ .../service/blood/blood_details_servies.dart | 31 ++++++++ .../service/blood/blood_donation_service.dart | 42 +++++----- .../blood_details_view_model.dart | 27 +++++++ .../booddonation_view_model.dart | 2 - .../medical/my_balance_view_model.dart | 16 ++++ lib/locator.dart | 4 + lib/pages/Blood/blood_donation.dart | 14 +++- 9 files changed, 187 insertions(+), 30 deletions(-) create mode 100644 lib/core/model/blooddonation/blood_groub_details.dart create mode 100644 lib/core/service/blood/blood_details_servies.dart create mode 100644 lib/core/viewModels/blooddonation/blood_details_view_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 78778a94..d9db0863 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -71,6 +71,10 @@ const GET_LIVECHAT_REQUEST= const GET_CITIES_REQUEST= 'Services/Lists.svc/REST/GetAllCities'; +///BloodDetails +const GET_BLOOD_REQUEST= + 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; + ///Reports const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; diff --git a/lib/core/model/blooddonation/blood_groub_details.dart b/lib/core/model/blooddonation/blood_groub_details.dart new file mode 100644 index 00000000..34dcafe0 --- /dev/null +++ b/lib/core/model/blooddonation/blood_groub_details.dart @@ -0,0 +1,77 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +class List_BloodGroupDetailsModel { + int iD; + int patientID; + int patientType; + bool patientOutSA; + int zipCode; + String cellNumber; + String cityCode; + String city; + int gender; + String bloodGroup; + String nationalID; + bool isActive; + int createdBy; + DateTime createdOn; + int editedBy; + DateTime editedOn; + + List_BloodGroupDetailsModel( + {this.iD, + this.patientID, + this.patientType, + this.patientOutSA, + this.zipCode, + this.cellNumber, + this.cityCode, + this.city, + this.gender, + this.bloodGroup, + this.nationalID, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); + + List_BloodGroupDetailsModel.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + patientOutSA = json['PatientOutSA']; + zipCode = json['ZipCode']; + cellNumber = json['CellNumber']; + cityCode = json['CityCode']; + city = json['City']; + gender = json['Gender']; + bloodGroup = json['BloodGroup']; + nationalID = json['NationalID']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = DateUtil.convertStringToDate(json['CreatedOn']);// json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = DateUtil.convertStringToDate(json['EditedOn']);//json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['PatientOutSA'] = this.patientOutSA; + data['ZipCode'] = this.zipCode; + data['CellNumber'] = this.cellNumber; + data['CityCode'] = this.cityCode; + data['City'] = this.city; + data['Gender'] = this.gender; + data['BloodGroup'] = this.bloodGroup; + data['NationalID'] = this.nationalID; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/blood/blood_details_servies.dart b/lib/core/service/blood/blood_details_servies.dart new file mode 100644 index 00000000..644d96d9 --- /dev/null +++ b/lib/core/service/blood/blood_details_servies.dart @@ -0,0 +1,31 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; + +import '../base_service.dart'; + +class BloodDetailsService extends BaseService{ + + // List CitiesModelList = List(); + // Map body = Map(); + + List BloodModelList = List(); + Map body = Map(); + Future getAllBloodOrders() async { + hasError = false; + body['List_BloodGroupDetails'] = false; + await baseAppClient.post(GET_BLOOD_REQUEST, + onSuccess: (dynamic response, int statusCode) { + BloodModelList.clear(); + + response['List_BloodGroupDetails'].forEach((vital) { + BloodModelList.add(List_BloodGroupDetailsModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + +} \ No newline at end of file diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart index ecb9ee2d..326407a3 100644 --- a/lib/core/service/blood/blood_donation_service.dart +++ b/lib/core/service/blood/blood_donation_service.dart @@ -1,34 +1,28 @@ - - import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import '../base_service.dart'; -class BloodDonationService extends BaseService{ - - +class BloodDonationService extends BaseService { //List LivechatModelList = List(); // Map body = Map(); -List CitiesModelList = List(); -Map body = Map(); -Future getAllCitiesOrders() async { - hasError = false; - body['ListCities'] = false; - await baseAppClient.post(GET_CITIES_REQUEST, - onSuccess: (dynamic response, int statusCode) { - CitiesModelList.clear(); - - response['ListCities'].forEach((vital) { - CitiesModelList.add(CitiesModel.fromJson(vital)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + List CitiesModelList = List(); + Map body = Map(); + Future getAllCitiesOrders() async { + hasError = false; + body['ListCities'] = false; + await baseAppClient.post(GET_CITIES_REQUEST, + onSuccess: (dynamic response, int statusCode) { + CitiesModelList.clear(); + + response['ListCities'].forEach((vital) { + CitiesModelList.add(CitiesModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } } - - -} \ No newline at end of file diff --git a/lib/core/viewModels/blooddonation/blood_details_view_model.dart b/lib/core/viewModels/blooddonation/blood_details_view_model.dart new file mode 100644 index 00000000..a6b341cf --- /dev/null +++ b/lib/core/viewModels/blooddonation/blood_details_view_model.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class BloodDeatailsViewModel extends BaseViewModel{ + + + BloodDetailsService _bloodDetailsService =locator(); + List get BloodDetailsModelList => _bloodDetailsService.BloodModelList;//_bloodDonationService.CitiesModelList; + + + Future getBlood() async { + setState(ViewState.Busy); + await _bloodDetailsService .getAllBloodOrders();; + + if (_bloodDetailsService.hasError) { + error = _bloodDetailsService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + + +} \ No newline at end of file diff --git a/lib/core/viewModels/blooddonation/booddonation_view_model.dart b/lib/core/viewModels/blooddonation/booddonation_view_model.dart index d8d70a80..b9c13c57 100644 --- a/lib/core/viewModels/blooddonation/booddonation_view_model.dart +++ b/lib/core/viewModels/blooddonation/booddonation_view_model.dart @@ -7,9 +7,7 @@ import '../base_view_model.dart'; class BloodDonationViewModel extends BaseViewModel{ -// HospitalService _hospitalService = locator(); - // List get hospitals => _hospitalService.hospitals; BloodDonationService _bloodDonationService =locator(); List get CitiesModelList => _bloodDonationService.CitiesModelList; diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart index 33c89bb9..b110edcb 100644 --- a/lib/core/viewModels/medical/my_balance_view_model.dart +++ b/lib/core/viewModels/medical/my_balance_view_model.dart @@ -1,9 +1,11 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; import 'package:diplomaticquarterapp/core/service/blood/blood_donation_service.dart'; import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/my_balance_service.dart'; @@ -25,6 +27,10 @@ class MyBalanceViewModel extends BaseViewModel { //======================== BloodDonationService _bloodDonationService =locator(); List get CitiesModelList => _bloodDonationService.CitiesModelList; + BloodDetailsService _bloodDetailsService =locator(); + List get BloodDetailsModelList => _bloodDetailsService.BloodModelList;//_bloodDonationService.CitiesModelList; + + //=========================== double get totalAdvanceBalanceAmount => @@ -73,6 +79,16 @@ class MyBalanceViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + Future getBlood() async { + setState(ViewState.Busy); + await _bloodDetailsService .getAllBloodOrders();; + + if (_bloodDetailsService.hasError) { + error = _bloodDetailsService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } //=============== Future getPatientInfoByPatientID({String id}) async { diff --git a/lib/locator.dart b/lib/locator.dart index 18d629c0..9914c59b 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:get_it/get_it.dart'; import 'core/service/appointment_rate_service.dart'; +import 'core/service/blood/blood_details_servies.dart'; import 'core/service/blood/blood_donation_service.dart'; import 'core/service/contactus/finadus_service.dart'; import 'core/service/contactus/livechat_service.dart'; @@ -22,6 +23,7 @@ import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/reports_monthly_service.dart'; import 'core/service/medical/vital_sign_service.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; +import 'core/viewModels/blooddonation/blood_details_view_model.dart'; import 'core/viewModels/blooddonation/booddonation_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; import 'core/viewModels/contactus/livechat_view_model.dart'; @@ -80,6 +82,7 @@ void setupLocator() { locator.registerLazySingleton(() => LiveChatService()); locator.registerLazySingleton(() => BloodDonationService()); + locator.registerLazySingleton(() => BloodDetailsService()); /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -105,5 +108,6 @@ void setupLocator() { locator.registerFactory(() => FindusViewModel()); locator.registerFactory(() => LiveChatViewModel()); locator.registerFactory(() => BloodDonationViewModel()); + locator.registerFactory(() => BloodDeatailsViewModel()); } diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index a7a1d089..d8174307 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -1,10 +1,13 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +//import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; +import 'package:diplomaticquarterapp/core/viewModels/blooddonation/blood_details_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; @@ -48,10 +51,11 @@ class _BloodDonationPageState extends State { TextEditingController _fileTextController = TextEditingController(); TextEditingController _notesTextController = TextEditingController(); BeneficiaryType beneficiaryType = BeneficiaryType.NON; - Gender gender = Gender.NON; - Blood blood = Blood.NON; + Gender gender = Gender.Male;//Gender.NON; + Blood blood = Blood.Aminus;//Blood.NON; //HospitalsModel _selectedHospital; CitiesModel _selectedHospital; + List_BloodGroupDetailsModel _selectBlood; String amount = ""; String email; PatientInfo _selectedPatientInfo; @@ -664,7 +668,9 @@ class _BloodDonationPageState extends State { if (_selectedHospital != null) return _selectedHospital.description; else - return "Select City";//TranslationBase.of(context).selectHospital; + return + "Riyadh"; + // return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital; } String getPatientName() { From b658e7be4d3758a1a41866b5dc7dc73750a932dd Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 30 Sep 2020 17:30:29 +0300 Subject: [PATCH 5/5] Blood Denote --- lib/pages/Blood/blood_donation.dart | 60 ++++++++++------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index d8174307..6132e38c 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -55,14 +55,14 @@ class _BloodDonationPageState extends State { Blood blood = Blood.Aminus;//Blood.NON; //HospitalsModel _selectedHospital; CitiesModel _selectedHospital; - List_BloodGroupDetailsModel _selectBlood; + String amount = ""; String email; PatientInfo _selectedPatientInfo; AuthenticatedUser authenticatedUser; GetAllSharedRecordsByStatusList selectedPatientFamily; AdvanceModel advanceModel = AdvanceModel(); - + List_BloodGroupDetailsModel bloodDetails=List_BloodGroupDetailsModel(); AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUser authUser; var checkedValue = false; @@ -400,46 +400,16 @@ class _BloodDonationPageState extends State { child: SecondaryButton( textColor: Colors.white, color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), - label: "Save", // + onTap: (){ + + bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + - // onTap: () { - // advanceModel.fileNumber = _fileTextController.text; - // // advanceModel.hospitalsModel = _selectedHospital; - // advanceModel.citiessModel = _selectedHospital; - // advanceModel.note = _notesTextController.text; - // advanceModel.email = email ?? model.user.emailAddress; - // advanceModel.amount = amount; - // - // model.getPatientInfoByPatientIDAndMobileNumber().then((value) { - // if (model.state != ViewState.Error && - // model.state != ViewState.ErrorLocal) { - // Utils.hideKeyboard(context); - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => PaymentMethod())).then( - // (value) { - // Navigator.push( - // context, - // FadePage( - // page: ConfirmPaymentPage( - // advanceModel: advanceModel, - // selectedPaymentMethod: value, - // patientInfoAndMobileNumber: - // model.patientInfoAndMobileNumber, - // authenticatedUser: authUser, - // ), - // ), - // ); - // }, - // ); - // } - // }).showProgressBar( - // text: "Loading", - // backgroundColor: Colors.blue.withOpacity(0.6)); - // }, ), )), ); @@ -472,41 +442,49 @@ class _BloodDonationPageState extends State { onValueSelected: (value) { setState(() { if (value == Blood.Oplus) { + bloodDetails.bloodGroup="O+"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.Ominus) { // _fileTextController.text = model.user.patientID.toString(); + bloodDetails.bloodGroup="O-"; // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.ABplus) { + bloodDetails.bloodGroup="AB+"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.ABminus) { + bloodDetails.bloodGroup="AB-"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.Aplus) { + bloodDetails.bloodGroup="A+"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.Aminus) { + bloodDetails.bloodGroup="A-"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.Bplus) { + bloodDetails.bloodGroup="B+"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; }else if (value == Blood.Bminus) { + bloodDetails.bloodGroup="B-"; // _fileTextController.text = model.user.patientID.toString(); // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; @@ -536,10 +514,12 @@ class _BloodDonationPageState extends State { setState(() { if (value == Gender.Male) { // _fileTextController.text = model.user.patientID.toString(); + bloodDetails.patientType=1; // advanceModel.depositorName = // model.user.firstName + " " + model.user.lastName; } else - _fileTextController.text = ""; + // _fileTextController.text = ""; + {bloodDetails.gender=2;} // beneficiaryType = value; gender=value;