From 1330d680ab17942e1d4fb3f8a47299e43808f406 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 7 Apr 2021 15:12:05 +0300 Subject: [PATCH 01/14] fix allergies --- .../subjective/update_allergies_widget.dart | 576 ++++++++++-------- ..._key_checkbox_search_allergies_widget.dart | 499 +++++++++++++++ 2 files changed, 833 insertions(+), 242 deletions(-) create mode 100644 lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart index c00daa6b..b7f5187e 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart @@ -13,6 +13,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -193,42 +195,9 @@ class _UpdateAllergiesWidgetState extends State { context: context, builder: (context) { return AddAllergies( - addAllergiesFun: (MySelectedAllergy mySelectedAllergy) { - if (mySelectedAllergy.selectedAllergySeverity == null || - mySelectedAllergy.selectedAllergy == null) { - helpers.showErrorToast(TranslationBase - .of(context) - .requiredMsg); - - } else { - setState(() { - List allergy = - // ignore: missing_return - widget.myAllergiesList - .where((element) => - mySelectedAllergy.selectedAllergy.id == - element.selectedAllergy.id) - .toList(); - - if (allergy.isEmpty) { - widget.myAllergiesList.add(mySelectedAllergy); - Navigator.of(context).pop(); - } else { - allergy.first.selectedAllergy = - mySelectedAllergy.selectedAllergy; - allergy.first.selectedAllergySeverity = - mySelectedAllergy.selectedAllergySeverity; - allergy.first.remark = mySelectedAllergy.remark; - allergy.first.isChecked = mySelectedAllergy.isChecked; - Navigator.of(context).pop(); - - // helpers.showErrorToast(TranslationBase - // .of(context) - // .itemExist); - } - }); - } - },); + myAllergiesList: widget.myAllergiesList, + addAllergiesFun: (){} + ); }); } @@ -236,8 +205,9 @@ class _UpdateAllergiesWidgetState extends State { class AddAllergies extends StatefulWidget { final Function addAllergiesFun; + final List myAllergiesList; - const AddAllergies({Key key, this.addAllergiesFun}) : super(key: key); + const AddAllergies({Key key, this.addAllergiesFun, this.myAllergiesList}) : super(key: key); @override _AddAllergiesState createState() => _AddAllergiesState(); @@ -251,7 +221,13 @@ class _AddAllergiesState extends State { TextEditingController remarkController = TextEditingController(); TextEditingController severityController = TextEditingController(); TextEditingController allergyController = TextEditingController(); + List myAllergiesListLocal; + @override + initState(){ + super.initState(); + myAllergiesListLocal = [...widget.myAllergiesList]; + } GlobalKey key = new GlobalKey>(); bool isFormSubmitted = false; @@ -291,7 +267,7 @@ class _AddAllergiesState extends State { .of(context) .size; return FractionallySizedBox( - heightFactor: 0.7, + heightFactor: 1, child: BaseView( onModelReady: (model) async { if (model.allergiesList.length == 0) { @@ -305,220 +281,336 @@ class _AddAllergiesState extends State { AppScaffold( baseViewModel: model, isShowAppBar: false, - body: SingleChildScrollView( - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - SizedBox( - height: 16, - ), - AppText( - TranslationBase - .of(context) - .addAllergies, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 16, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.allergiesList != null - ? () { - setState(() { - _selectedAllergy = null; - allergyController.text = null; - }); - } - : null, - child: _selectedAllergy==null? AutoCompleteTextField( - decoration: textFieldSelectorDecoration( - TranslationBase - .of(context) - .selectAllergy, - _selectedAllergy != null - ? _selectedAllergy.nameEn - : null, true, icon: EvaIcons.search), - itemSubmitted: (item) => - setState(() { - _selectedAllergy = item; - allergyController.text = - projectViewModel.isArabic - ? _selectedAllergy - .nameAr - : _selectedAllergy - .nameEn; - }), - key: key, - suggestions: model.allergiesList, - itemBuilder: (context, suggestion) => - new Padding( - child: Texts( - projectViewModel.isArabic ? suggestion - .nameAr : suggestion.nameEn), - padding: EdgeInsets.all(2.0)), - itemSorter: (a, b) => 1, - itemFilter: (suggestion, input) => - suggestion.nameAr.toLowerCase().startsWith( - input.toLowerCase()) || - suggestion.nameEn.toLowerCase() - .startsWith(input.toLowerCase()), - ) : - TextFields( - onTapTextFields: model.allergiesList != null - ? () { - setState(() { - _selectedAllergy = null; - allergyController.text = null; - }); - } - : null, - hasLabelText: allergyController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .selectAllergy, - fontSize: 13.5, - readOnly: true, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: allergyController, - suffixIcon: EvaIcons.search, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }) - ), - ), - if(isFormSubmitted && _selectedAllergy == null) - CustomValidationError(), - SizedBox( - height: 10, - ), - TextFields( - onTapTextFields: model - .allergySeverityList != null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.allergySeverityList, - okText: TranslationBase - .of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - _selectedAllergySeverity = - selectedValue; - - severityController.text = - projectViewModel.isArabic - ? _selectedAllergySeverity - .nameAr - : _selectedAllergySeverity - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: severityController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .selectSeverity, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: severityController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), SizedBox( - height: 5, - ), - if(isFormSubmitted && - _selectedAllergySeverity == null) - CustomValidationError(), + body: Center( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ - SizedBox( - height: 10, + Container( + padding: EdgeInsets.only( + left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, ), - Container( - margin: EdgeInsets.only( - left: 0, right: 0, top: 15), - child: TextFields( - hasLabelText: remarkController.text != ''?true:false, - showLabelText: true, - hintText: TranslationBase.of(context).remarks, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 10, - controller: remarkController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), SizedBox( - height: 10, + height: 115, + child: Container( + padding: EdgeInsets.only( + left: 10, right: 10), + margin: EdgeInsets.only(top: 40), + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + fontSize:20, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase.of(context). + addAllergies, + style: TextStyle( + color: Color(0xFF2B353E), + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 20)), + ], + ), + ), + InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Icon(FontAwesomeIcons.times, + size: 30, + color: Color(0xFF2B353E))) + ], + ), + ], + ), ), - AppButton( - title: TranslationBase.of(context).add.toUpperCase(), - onPressed: () { - setState(() { - isFormSubmitted = true; - }); - if(_selectedAllergy !=null && _selectedAllergySeverity !=null) { - MySelectedAllergy mySelectedAllergy = new MySelectedAllergy( - remark: remarkController.text, - selectedAllergy: _selectedAllergy, - isChecked: true, - selectedAllergySeverity: _selectedAllergySeverity,); - widget.addAllergiesFun(mySelectedAllergy); - } - - }, + ), + SizedBox( + height: 10, + ), + SizedBox( + height: 16, + ), + Expanded( + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Center( + child: NetworkBaseView( + baseViewModel: model, + child: MasterKeyCheckboxSearchAllergiesWidget( + model: model, + masterList: model.allergiesList, + removeAllergy: (history){ + setState(() { + // widget.allergie(history); + }); + }, + addAllergy: (MySelectedAllergy mySelectedAllergy){ + AddAllergyLocally(mySelectedAllergy); + }, + addSelectedAllergy: (){ + // widget.addSelectedHistories(); + }, + isServiceSelected: (master) =>isServiceSelected(master), + ), + ), + ), + ), ), - ] + ), + // Container( + // height: screenSize.height * 0.070, + // child: InkWell( + // onTap: model.allergiesList != null + // ? () { + // setState(() { + // _selectedAllergy = null; + // allergyController.text = null; + // }); + // } + // : null, + // child: _selectedAllergy==null? AutoCompleteTextField( + // decoration: textFieldSelectorDecoration( + // TranslationBase + // .of(context) + // .selectAllergy, + // _selectedAllergy != null + // ? _selectedAllergy.nameEn + // : null, true, icon: EvaIcons.search), + // itemSubmitted: (item) => + // setState(() { + // _selectedAllergy = item; + // allergyController.text = + // projectViewModel.isArabic + // ? _selectedAllergy + // .nameAr + // : _selectedAllergy + // .nameEn; + // }), + // key: key, + // suggestions: model.allergiesList, + // itemBuilder: (context, suggestion) => + // new Padding( + // child: Texts( + // projectViewModel.isArabic ? suggestion + // .nameAr : suggestion.nameEn), + // padding: EdgeInsets.all(2.0)), + // itemSorter: (a, b) => 1, + // itemFilter: (suggestion, input) => + // suggestion.nameAr.toLowerCase().startsWith( + // input.toLowerCase()) || + // suggestion.nameEn.toLowerCase() + // .startsWith(input.toLowerCase()), + // ) : + // TextFields( + // onTapTextFields: model.allergiesList != null + // ? () { + // setState(() { + // _selectedAllergy = null; + // allergyController.text = null; + // }); + // } + // : null, + // hasLabelText: allergyController.text != + // '' ? true : false, + // showLabelText: true, + // hintText: TranslationBase + // .of(context) + // .selectAllergy, + // fontSize: 13.5, + // readOnly: true, + // fontWeight: FontWeight.w600, + // maxLines: 2, + // minLines: 1, + // controller: allergyController, + // suffixIcon: EvaIcons.search, + // validator: (value) { + // if (value == null) + // return TranslationBase + // .of(context) + // .emptyMessage; + // else + // return null; + // }) + // ), + // ), + // if(isFormSubmitted && _selectedAllergy == null) + // CustomValidationError(), + // SizedBox( + // height: 10, + // ), + // TextFields( + // onTapTextFields: model + // .allergySeverityList != null + // ? () { + // MasterKeyDailog dialog = MasterKeyDailog( + // list: model.allergySeverityList, + // okText: TranslationBase + // .of(context) + // .ok, + // okFunction: (selectedValue) { + // setState(() { + // _selectedAllergySeverity = + // selectedValue; + // + // severityController.text = + // projectViewModel.isArabic + // ? _selectedAllergySeverity + // .nameAr + // : _selectedAllergySeverity + // .nameEn; + // }); + // }, + // ); + // showDialog( + // barrierDismissible: false, + // context: context, + // builder: (BuildContext context) { + // return dialog; + // }, + // ); + // } + // : null, + // hasLabelText: severityController.text != + // '' ? true : false, + // showLabelText: true, + // hintText: TranslationBase + // .of(context) + // .selectSeverity, + // fontSize: 13.5, + // readOnly: true, + // // hintColor: Colors.black, + // fontWeight: FontWeight.w600, + // maxLines: 2, + // minLines: 1, + // controller: severityController, + // validator: (value) { + // if (value == null) + // return TranslationBase + // .of(context) + // .emptyMessage; + // else + // return null; + // }), SizedBox( + // height: 5, + // ), + // if(isFormSubmitted && + // _selectedAllergySeverity == null) + // CustomValidationError(), + // + // SizedBox( + // height: 10, + // ), + // Container( + // margin: EdgeInsets.only( + // left: 0, right: 0, top: 15), + // child: TextFields( + // hasLabelText: remarkController.text != ''?true:false, + // showLabelText: true, + // hintText: TranslationBase.of(context).remarks, + // fontSize: 13.5, + // // hintColor: Colors.black, + // fontWeight: FontWeight.w600, + // maxLines: 25, + // minLines: 10, + // controller: remarkController, + // validator: (value) { + // if (value == null) + // return TranslationBase + // .of(context) + // .emptyMessage; + // else + // return null; + // }), + // ), SizedBox( + // height: 10, + // ), + // AppButton( + // title: TranslationBase.of(context).add.toUpperCase(), + // onPressed: () { + // setState(() { + // isFormSubmitted = true; + // }); + // if(_selectedAllergy !=null && _selectedAllergySeverity !=null) { + // MySelectedAllergy mySelectedAllergy = new MySelectedAllergy( + // remark: remarkController.text, + // selectedAllergy: _selectedAllergy, + // isChecked: true, + // selectedAllergySeverity: _selectedAllergySeverity,); + // widget.addAllergiesFun(mySelectedAllergy); + // } + // + // }, + // ), + ] - ), ), ), - )), + ) + + ), ), ); } + + isServiceSelected(MasterKeyModel masterKey) { + Iterable history = + myAllergiesListLocal.where((element) => + masterKey.id == element.selectedAllergy.id && + masterKey.typeId == element.selectedAllergy.typeId && + element.isChecked); + if (history.length > 0) { + return true; + } + return false; + } + + AddAllergyLocally(MySelectedAllergy mySelectedAllergy) { + if ( + mySelectedAllergy.selectedAllergy == null) { + helpers.showErrorToast(TranslationBase + .of(context) + .requiredMsg); + + } else { + setState(() { + List allergy = + // ignore: missing_return + myAllergiesListLocal + .where((element) => + mySelectedAllergy.selectedAllergy.id == + element.selectedAllergy.id) + .toList(); + + if (allergy.isEmpty) { + myAllergiesListLocal.add(mySelectedAllergy); + // Navigator.of(context).pop(); + } else { + allergy.first.selectedAllergy = + mySelectedAllergy.selectedAllergy; + allergy.first.selectedAllergySeverity = + mySelectedAllergy.selectedAllergySeverity; + allergy.first.remark = mySelectedAllergy.remark; + allergy.first.isChecked = mySelectedAllergy.isChecked; + // Navigator.of(context).pop(); + + // helpers.showErrorToast(TranslationBase + // .of(context) + // .itemExist); + } + }); + }} + } diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart new file mode 100644 index 00000000..99a012c9 --- /dev/null +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -0,0 +1,499 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'app_texts_widget.dart'; +import 'dialogs/master_key_dailog.dart'; + +class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { + final SOAPViewModel model; + final Function addSelectedAllergy; + final Function(MasterKeyModel) removeAllergy; + final Function(MySelectedAllergy mySelectedAllergy) addAllergy; + final bool Function(MasterKeyModel) isServiceSelected; + final List masterList; + final String buttonName; + final String hintSearchText; + + MasterKeyCheckboxSearchAllergiesWidget( + {Key key, + this.model, + this.addSelectedAllergy, + this.removeAllergy, + this.masterList, + this.addAllergy, + this.isServiceSelected, + this.buttonName, + this.hintSearchText}) + : super(key: key); + + @override + _MasterKeyCheckboxSearchAllergiesWidgetState createState() => + _MasterKeyCheckboxSearchAllergiesWidgetState(); +} + +class _MasterKeyCheckboxSearchAllergiesWidgetState + extends State { + List items = List(); + MasterKeyModel _selectedAllergySeverity; + + @override + void initState() { + items.addAll(widget.masterList); + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + child: Column( + children: [ + Expanded( + child: Container( + height: MediaQuery.of(context).size.height * 0.62, + child: Center( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Column( + children: [ + TextFields( + hintText: widget.hintSearchText ?? + TranslationBase.of(context).selectAllergy, + borderWidth: 0.0, + padding: EdgeInsets.all(20), + borderRadius: 0, + suffixIcon: EvaIcons.search, + onChanged: (value) { + filterSearchResults(value); + }, + ), + SizedBox( + height: 10, + ), + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + height: MediaQuery.of(context).size.height * 0.60, + child: ListView.builder( + itemCount: items.length, + itemBuilder: (context, index) { + TextEditingController remarkController = TextEditingController(text: items[index].remarks); + TextEditingController severityController = TextEditingController(text: _selectedAllergySeverity!= null ?projectViewModel + .isArabic + ? _selectedAllergySeverity + .nameAr + : _selectedAllergySeverity + .nameEn: null); + return Column( + children: [ + InkWell( + onTap: () { + setState(() { + if (widget.isServiceSelected( + items[index])) { + widget + .removeAllergy(items[index]); + } else { + // TODO add Allergy + + MySelectedAllergy + mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[index], + selectedAllergySeverity: + _selectedAllergySeverity, remark: "fdfdf", isChecked: true); + widget.addAllergy(mySelectedAllergy); + } + }); + }, + child: Column( + children: [ + Row( + children: [ + Checkbox( + value: widget + .isServiceSelected( + items[index]), + activeColor: + Colors.red[800], + onChanged: (bool newValue) { + // setState(() { + // if (widget + // .isServiceSelected(items[index])) { + // widget.removeHistory(items[index]); + // } else { + // widget.addHistory(items[index]); + // } + // }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 10, + vertical: 0), + child: AppText( + projectViewModel.isArabic + ? items[index] + .nameAr != + "" + ? items[index] + .nameAr + : items[index] + .nameEn + : items[index].nameEn, + color: Color(0xFF575757), + fontSize: 16, + fontWeight: + FontWeight.w600, + ), + ), + ), + ], + ), + if(widget + .isServiceSelected( + items[index])) + Column(children: [ + TextFields( + onTapTextFields: widget.model + .allergySeverityList != + null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: widget.model + .allergySeverityList, + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + _selectedAllergySeverity = + selectedValue; + + severityController + .text = projectViewModel + .isArabic + ? _selectedAllergySeverity + .nameAr + : _selectedAllergySeverity + .nameEn; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); + } + : null, + hasLabelText: + severityController.text != + '' + ? true + : false, + showLabelText: true, + hintText: + TranslationBase.of(context) + .selectSeverity, + fontSize: 13.5, + readOnly: true, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 2, + minLines: 1, + controller: severityController, + validator: (value) { + if (value == null) + return TranslationBase.of( + context) + .emptyMessage; + else + return null; + }), + SizedBox( + height: 5, + ), + // if(isFormSubmitted && + // _selectedAllergySeverity == null) + // CustomValidationError(), + + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only( + left: 0, right: 0, top: 15), + child: TextFields( + hasLabelText: + remarkController.text != + '' + ? true + : false, + showLabelText: true, + hintText: TranslationBase.of( + context) + .remarks, + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 10, + controller: remarkController, + validator: (value) { + if (value == null) + return TranslationBase.of( + context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 10, + ), + ],) + ], + ), + ), + // DividerWithSpacesAround(), + ], + ); + }, + ), + ), + ), + ], + ) + // ListView( + // children: [ + // TextFields( + // hintText: widget.hintSearchText ?? + // TranslationBase.of(context).searchHistory, + // borderWidth: 0.0, + // padding: EdgeInsets.all(20), + // borderRadius: 0, + // suffixIcon: EvaIcons.search, + // onChanged: (value) { + // filterSearchResults(value); + // }, + // ), + // // SizedBox(height: 15,), + // DividerWithSpacesAround(), + // + // + // // Container( + // // // padding:EdgeInsets.all(20), + // // child: Column( + // // children: items.map((historyInfo) { + // // return Column( + // // children: [ + // // InkWell( + // // onTap:(){ + // // + // // setState(() { + // // if (widget + // // .isServiceSelected(historyInfo)) { + // // widget.removeHistory(historyInfo); + // // } else { + // // widget.addHistory(historyInfo); + // // } + // // }); + // // }, + // // + // // child: Column( + // // children: [ + // // Row( + // // children: [ + // // Checkbox( + // // value:true, + // // // widget.isServiceSelected(historyInfo), + // // activeColor: Colors.red[800], + // // onChanged: (bool newValue) { + // // // setState(() { + // // // if (widget + // // // .isServiceSelected(historyInfo)) { + // // // widget.removeHistory(historyInfo); + // // // } else { + // // // widget.addHistory(historyInfo); + // // // } + // // // }); + // // }), + // // Expanded( + // // child: Padding( + // // padding: const EdgeInsets.symmetric( + // // horizontal: 10, vertical: 0), + // // child: AppText(projectViewModel.isArabic + // // ? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn + // // : historyInfo.nameEn, + // // color: Color(0xFF575757), + // // fontSize: 16, + // // fontWeight:FontWeight.w600, + // // ), + // // ), + // // ), + // // ], + // // ), + // // TextFields( + // // onTapTextFields: widget.model + // // .allergySeverityList != null + // // ? () { + // // MasterKeyDailog dialog = MasterKeyDailog( + // // list: widget.model.allergySeverityList, + // // okText: TranslationBase + // // .of(context) + // // .ok, + // // okFunction: (selectedValue) { + // // // setState(() { + // // // _selectedAllergySeverity = + // // // selectedValue; + // // // + // // // severityController.text = + // // // projectViewModel.isArabic + // // // ? _selectedAllergySeverity + // // // .nameAr + // // // : _selectedAllergySeverity + // // // .nameEn; + // // // }); + // // }, + // // ); + // // showDialog( + // // barrierDismissible: false, + // // context: context, + // // builder: (BuildContext context) { + // // return dialog; + // // }, + // // ); + // // } + // // : null, + // // hasLabelText: severityController.text != + // // '' ? true : false, + // // showLabelText: true, + // // hintText: TranslationBase + // // .of(context) + // // .selectSeverity, + // // fontSize: 13.5, + // // readOnly: true, + // // // hintColor: Colors.black, + // // fontWeight: FontWeight.w600, + // // maxLines: 2, + // // minLines: 1, + // // controller: severityController, + // // validator: (value) { + // // if (value == null) + // // return TranslationBase + // // .of(context) + // // .emptyMessage; + // // else + // // return null; + // // }), SizedBox( + // // height: 5, + // // ), + // // // if(isFormSubmitted && + // // // _selectedAllergySeverity == null) + // // // CustomValidationError(), + // // + // // SizedBox( + // // height: 10, + // // ), + // // Container( + // // margin: EdgeInsets.only( + // // left: 0, right: 0, top: 15), + // // child: TextFields( + // // hasLabelText: remarkController.text != ''?true:false, + // // showLabelText: true, + // // hintText: TranslationBase.of(context).remarks, + // // fontSize: 13.5, + // // // hintColor: Colors.black, + // // fontWeight: FontWeight.w600, + // // maxLines: 25, + // // minLines: 10, + // // controller: remarkController, + // // validator: (value) { + // // if (value == null) + // // return TranslationBase + // // .of(context) + // // .emptyMessage; + // // else + // // return null; + // // }), + // // ), SizedBox( + // // height: 10, + // // ), + // // ], + // // ), + // // ), + // // // DividerWithSpacesAround(), + // // ], + // // ); + // // }).toList(), + // // ), + // // ), + // ], + // ), + )), + ), + ), + SizedBox( + height: 10, + ), + if (widget.model.state == ViewState.Idle) + AppButton( + title: widget.buttonName ?? + TranslationBase.of(context).addSelectedHistories, + padding: 10, + color: Color(0xFF359846), + onPressed: () { + widget.addSelectedAllergy(); + }, + ), + ], + ), + ); + } + + void filterSearchResults(String query) { + List dummySearchList = List(); + dummySearchList.addAll(widget.masterList); + if (query.isNotEmpty) { + List dummyListData = List(); + dummySearchList.forEach((items) { + if (items.nameAr.toLowerCase().contains(query.toLowerCase()) || + items.nameEn.toLowerCase().contains(query.toLowerCase())) { + dummyListData.add(items); + } + }); + setState(() { + items.clear(); + items.addAll(dummyListData); + }); + return; + } else { + setState(() { + items.clear(); + items.addAll(widget.masterList); + }); + } + } +} From df3b51b9577ef7949ce5e2ed82b8045e23522ca7 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 7 Apr 2021 18:34:16 +0300 Subject: [PATCH 02/14] update allergies --- .../subjective/update_allergies_widget.dart | 44 ++++++-- ..._key_checkbox_search_allergies_widget.dart | 101 ++++++++++++------ 2 files changed, 101 insertions(+), 44 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart index b7f5187e..a1fadef0 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart @@ -24,7 +24,7 @@ import 'package:provider/provider.dart'; import '../custom_validation_error.dart'; class UpdateAllergiesWidget extends StatefulWidget { - final List myAllergiesList; + List myAllergiesList; UpdateAllergiesWidget({Key key, this.myAllergiesList}); @@ -36,6 +36,11 @@ class _UpdateAllergiesWidgetState extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + changeAllState() { + setState(() { + + }); + } return Column( children: [ @@ -48,7 +53,7 @@ class _UpdateAllergiesWidgetState extends State { fontSize: 13.5, borderRadius: 12, onTapTextFields: () { - openAllergiesList(context); + openAllergiesList(context, changeAllState); }, readOnly: true, suffixIcon: EvaIcons.plusCircleOutline, @@ -188,15 +193,23 @@ class _UpdateAllergiesWidgetState extends State { print(allergy); } - openAllergiesList(BuildContext context) { + openAllergiesList(BuildContext context, Function changeParentState) { showModalBottomSheet( backgroundColor: Colors.white, isScrollControlled: true, + isDismissible: false, context: context, builder: (context) { return AddAllergies( myAllergiesList: widget.myAllergiesList, - addAllergiesFun: (){} + addAllergiesFun: (List mySelectedAllergy){ + setState(() { + widget.myAllergiesList = [...mySelectedAllergy]; + }); + changeParentState(); + Navigator.of(context).pop(); + + } ); }); } @@ -358,10 +371,11 @@ class _AddAllergiesState extends State { addAllergy: (MySelectedAllergy mySelectedAllergy){ AddAllergyLocally(mySelectedAllergy); }, - addSelectedAllergy: (){ - // widget.addSelectedHistories(); - }, + addSelectedAllergy: ()=> + widget.addAllergiesFun(myAllergiesListLocal) + , isServiceSelected: (master) =>isServiceSelected(master), + getServiceSelectedAllergy: (master)=>getSelectedAllergy(master), ), ), ), @@ -564,17 +578,29 @@ class _AddAllergiesState extends State { } isServiceSelected(MasterKeyModel masterKey) { - Iterable history = + Iterable allergy = myAllergiesListLocal.where((element) => masterKey.id == element.selectedAllergy.id && masterKey.typeId == element.selectedAllergy.typeId && element.isChecked); - if (history.length > 0) { + if (allergy.length > 0) { return true; } return false; } + MySelectedAllergy getSelectedAllergy(MasterKeyModel masterKey) { + Iterable allergy = + myAllergiesListLocal.where((element) => + masterKey.id == element.selectedAllergy.id && + masterKey.typeId == element.selectedAllergy.typeId && + element.isChecked); + if (allergy.length > 0) { + return allergy.first; + } + return null; + } + AddAllergyLocally(MySelectedAllergy mySelectedAllergy) { if ( mySelectedAllergy.selectedAllergy == null) { diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 99a012c9..dbc01d42 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -16,10 +16,12 @@ import 'dialogs/master_key_dailog.dart'; class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { final SOAPViewModel model; - final Function addSelectedAllergy; + final Function () addSelectedAllergy; final Function(MasterKeyModel) removeAllergy; final Function(MySelectedAllergy mySelectedAllergy) addAllergy; final bool Function(MasterKeyModel) isServiceSelected; + final MySelectedAllergy Function(MasterKeyModel) getServiceSelectedAllergy; + final List masterList; final String buttonName; final String hintSearchText; @@ -33,7 +35,8 @@ class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { this.addAllergy, this.isServiceSelected, this.buttonName, - this.hintSearchText}) + this.hintSearchText, + this.getServiceSelectedAllergy}) : super(key: key); @override @@ -89,13 +92,29 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState child: ListView.builder( itemCount: items.length, itemBuilder: (context, index) { - TextEditingController remarkController = TextEditingController(text: items[index].remarks); - TextEditingController severityController = TextEditingController(text: _selectedAllergySeverity!= null ?projectViewModel - .isArabic - ? _selectedAllergySeverity - .nameAr - : _selectedAllergySeverity - .nameEn: null); + bool isSelected = widget.isServiceSelected( + items[index]); + MySelectedAllergy mySelectedAllergy; + if (isSelected) { + mySelectedAllergy = widget + .getServiceSelectedAllergy( + items[index]); + } + TextEditingController remarkController = TextEditingController( + text: isSelected ? mySelectedAllergy + .remark : null); + TextEditingController severityController = TextEditingController( + text: isSelected ? mySelectedAllergy + .selectedAllergySeverity != null + ? projectViewModel + .isArabic + ? mySelectedAllergy + .selectedAllergySeverity + .nameAr + : mySelectedAllergy + .selectedAllergySeverity + .nameEn + : null : null); return Column( children: [ InkWell( @@ -104,18 +123,22 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState if (widget.isServiceSelected( items[index])) { widget - .removeAllergy(items[index]); + .removeAllergy( + items[index]); } else { // TODO add Allergy MySelectedAllergy - mySelectedAllergy = - new MySelectedAllergy( - selectedAllergy: - items[index], - selectedAllergySeverity: - _selectedAllergySeverity, remark: "fdfdf", isChecked: true); - widget.addAllergy(mySelectedAllergy); + mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[index], + selectedAllergySeverity: + _selectedAllergySeverity, + remark: null, + isChecked: true); + widget.addAllergy( + mySelectedAllergy); } }); }, @@ -184,16 +207,9 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState okFunction: (selectedValue) { setState(() { - _selectedAllergySeverity = + mySelectedAllergy + .selectedAllergySeverity = selectedValue; - - severityController - .text = projectViewModel - .isArabic - ? _selectedAllergySeverity - .nameAr - : _selectedAllergySeverity - .nameEn; }); }, ); @@ -209,13 +225,15 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState } : null, hasLabelText: - severityController.text != - '' + mySelectedAllergy + .selectedAllergySeverity != + null ? true : false, showLabelText: true, hintText: - TranslationBase.of(context) + TranslationBase + .of(context) .selectSeverity, fontSize: 13.5, readOnly: true, @@ -226,7 +244,8 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState controller: severityController, validator: (value) { if (value == null) - return TranslationBase.of( + return TranslationBase + .of( context) .emptyMessage; else @@ -252,7 +271,8 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState ? true : false, showLabelText: true, - hintText: TranslationBase.of( + hintText: TranslationBase + .of( context) .remarks, fontSize: 13.5, @@ -260,10 +280,22 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState fontWeight: FontWeight.w600, maxLines: 25, minLines: 10, - controller: remarkController, + initialValue: isSelected + ? mySelectedAllergy + .remark : '', + // controller: remarkControlle + + onChanged: (value) { + if (isSelected) { + mySelectedAllergy + .remark = value; + }; + }, + validator: (value) { if (value == null) - return TranslationBase.of( + return TranslationBase + .of( context) .emptyMessage; else @@ -460,8 +492,7 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState ), if (widget.model.state == ViewState.Idle) AppButton( - title: widget.buttonName ?? - TranslationBase.of(context).addSelectedHistories, + title: "Add Selected Allergy", padding: 10, color: Color(0xFF359846), onPressed: () { From 19d8b9170d3f71c5a840ff81ef39826d0166043e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 7 Apr 2021 22:11:44 +0300 Subject: [PATCH 03/14] update allergies fixes --- lib/models/SOAP/GetGetProgressNoteResModel.dart | 2 +- .../profile/soap_update/subjective/update_allergies_widget.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/SOAP/GetGetProgressNoteResModel.dart b/lib/models/SOAP/GetGetProgressNoteResModel.dart index ce6c0a12..4ae7ed8c 100644 --- a/lib/models/SOAP/GetGetProgressNoteResModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteResModel.dart @@ -1,4 +1,4 @@ -class GetPatientProgressNoteResModel { +class GetPatientProgressNoteResModel { int appointmentNo; int createdBy; String createdByName; diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart index a1fadef0..b62bae0b 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart @@ -204,7 +204,7 @@ class _UpdateAllergiesWidgetState extends State { myAllergiesList: widget.myAllergiesList, addAllergiesFun: (List mySelectedAllergy){ setState(() { - widget.myAllergiesList = [...mySelectedAllergy]; + widget.myAllergiesList.addAll(mySelectedAllergy); }); changeParentState(); Navigator.of(context).pop(); From ff2c31ee3559813d4df63d73fc837d5e009ef1e9 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 09:48:08 +0300 Subject: [PATCH 04/14] allergies fixes --- .../subjective/update_allergies_widget.dart | 225 +++--------------- ..._key_checkbox_search_allergies_widget.dart | 184 ++------------ 2 files changed, 42 insertions(+), 367 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart index b62bae0b..c31e8e59 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart @@ -8,10 +8,8 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -21,8 +19,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../custom_validation_error.dart'; - class UpdateAllergiesWidget extends StatefulWidget { List myAllergiesList; @@ -202,15 +198,27 @@ class _UpdateAllergiesWidgetState extends State { builder: (context) { return AddAllergies( myAllergiesList: widget.myAllergiesList, - addAllergiesFun: (List mySelectedAllergy){ - setState(() { - widget.myAllergiesList.addAll(mySelectedAllergy); + addAllergiesFun: (List mySelectedAllergy) { + bool isAllDataFilled = true; + mySelectedAllergy.forEach((element) { + if (element.selectedAllergySeverity == null) { + isAllDataFilled = false; + } + }); + if (isAllDataFilled) { + mySelectedAllergy.forEach((element) { + if (!widget.myAllergiesList.contains(element)) { + widget.myAllergiesList.add(element); + } + }); + changeParentState(); + Navigator.of(context).pop(); + } else { + helpers.showErrorToast(TranslationBase + .of(context) + .requiredMsg); + } }); - changeParentState(); - Navigator.of(context).pop(); - - } - ); }); } @@ -363,9 +371,9 @@ class _AddAllergiesState extends State { child: MasterKeyCheckboxSearchAllergiesWidget( model: model, masterList: model.allergiesList, - removeAllergy: (history){ + removeAllergy: (master) { setState(() { - // widget.allergie(history); + removeAllergyFromLocalList(master); }); }, addAllergy: (MySelectedAllergy mySelectedAllergy){ @@ -382,190 +390,6 @@ class _AddAllergiesState extends State { ), ), ), - // Container( - // height: screenSize.height * 0.070, - // child: InkWell( - // onTap: model.allergiesList != null - // ? () { - // setState(() { - // _selectedAllergy = null; - // allergyController.text = null; - // }); - // } - // : null, - // child: _selectedAllergy==null? AutoCompleteTextField( - // decoration: textFieldSelectorDecoration( - // TranslationBase - // .of(context) - // .selectAllergy, - // _selectedAllergy != null - // ? _selectedAllergy.nameEn - // : null, true, icon: EvaIcons.search), - // itemSubmitted: (item) => - // setState(() { - // _selectedAllergy = item; - // allergyController.text = - // projectViewModel.isArabic - // ? _selectedAllergy - // .nameAr - // : _selectedAllergy - // .nameEn; - // }), - // key: key, - // suggestions: model.allergiesList, - // itemBuilder: (context, suggestion) => - // new Padding( - // child: Texts( - // projectViewModel.isArabic ? suggestion - // .nameAr : suggestion.nameEn), - // padding: EdgeInsets.all(2.0)), - // itemSorter: (a, b) => 1, - // itemFilter: (suggestion, input) => - // suggestion.nameAr.toLowerCase().startsWith( - // input.toLowerCase()) || - // suggestion.nameEn.toLowerCase() - // .startsWith(input.toLowerCase()), - // ) : - // TextFields( - // onTapTextFields: model.allergiesList != null - // ? () { - // setState(() { - // _selectedAllergy = null; - // allergyController.text = null; - // }); - // } - // : null, - // hasLabelText: allergyController.text != - // '' ? true : false, - // showLabelText: true, - // hintText: TranslationBase - // .of(context) - // .selectAllergy, - // fontSize: 13.5, - // readOnly: true, - // fontWeight: FontWeight.w600, - // maxLines: 2, - // minLines: 1, - // controller: allergyController, - // suffixIcon: EvaIcons.search, - // validator: (value) { - // if (value == null) - // return TranslationBase - // .of(context) - // .emptyMessage; - // else - // return null; - // }) - // ), - // ), - // if(isFormSubmitted && _selectedAllergy == null) - // CustomValidationError(), - // SizedBox( - // height: 10, - // ), - // TextFields( - // onTapTextFields: model - // .allergySeverityList != null - // ? () { - // MasterKeyDailog dialog = MasterKeyDailog( - // list: model.allergySeverityList, - // okText: TranslationBase - // .of(context) - // .ok, - // okFunction: (selectedValue) { - // setState(() { - // _selectedAllergySeverity = - // selectedValue; - // - // severityController.text = - // projectViewModel.isArabic - // ? _selectedAllergySeverity - // .nameAr - // : _selectedAllergySeverity - // .nameEn; - // }); - // }, - // ); - // showDialog( - // barrierDismissible: false, - // context: context, - // builder: (BuildContext context) { - // return dialog; - // }, - // ); - // } - // : null, - // hasLabelText: severityController.text != - // '' ? true : false, - // showLabelText: true, - // hintText: TranslationBase - // .of(context) - // .selectSeverity, - // fontSize: 13.5, - // readOnly: true, - // // hintColor: Colors.black, - // fontWeight: FontWeight.w600, - // maxLines: 2, - // minLines: 1, - // controller: severityController, - // validator: (value) { - // if (value == null) - // return TranslationBase - // .of(context) - // .emptyMessage; - // else - // return null; - // }), SizedBox( - // height: 5, - // ), - // if(isFormSubmitted && - // _selectedAllergySeverity == null) - // CustomValidationError(), - // - // SizedBox( - // height: 10, - // ), - // Container( - // margin: EdgeInsets.only( - // left: 0, right: 0, top: 15), - // child: TextFields( - // hasLabelText: remarkController.text != ''?true:false, - // showLabelText: true, - // hintText: TranslationBase.of(context).remarks, - // fontSize: 13.5, - // // hintColor: Colors.black, - // fontWeight: FontWeight.w600, - // maxLines: 25, - // minLines: 10, - // controller: remarkController, - // validator: (value) { - // if (value == null) - // return TranslationBase - // .of(context) - // .emptyMessage; - // else - // return null; - // }), - // ), SizedBox( - // height: 10, - // ), - // AppButton( - // title: TranslationBase.of(context).add.toUpperCase(), - // onPressed: () { - // setState(() { - // isFormSubmitted = true; - // }); - // if(_selectedAllergy !=null && _selectedAllergySeverity !=null) { - // MySelectedAllergy mySelectedAllergy = new MySelectedAllergy( - // remark: remarkController.text, - // selectedAllergy: _selectedAllergy, - // isChecked: true, - // selectedAllergySeverity: _selectedAllergySeverity,); - // widget.addAllergiesFun(mySelectedAllergy); - // } - // - // }, - // ), ] ), @@ -589,6 +413,11 @@ class _AddAllergiesState extends State { return false; } + removeAllergyFromLocalList(MasterKeyModel masterKey) { + myAllergiesListLocal.removeWhere((element) => + element.selectedAllergy.id == masterKey.id); + } + MySelectedAllergy getSelectedAllergy(MasterKeyModel masterKey) { Iterable allergy = myAllergiesListLocal.where((element) => diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index dbc01d42..68c01d62 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; @@ -48,6 +49,7 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState extends State { List items = List(); MasterKeyModel _selectedAllergySeverity; + bool isSubmitted = false; @override void initState() { @@ -254,9 +256,16 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState SizedBox( height: 5, ), - // if(isFormSubmitted && - // _selectedAllergySeverity == null) - // CustomValidationError(), + if(isSubmitted && + mySelectedAllergy + .selectedAllergySeverity == null) + Row( + + children: [ + CustomValidationError(), + ], + mainAxisAlignment: MainAxisAlignment.start, + ), SizedBox( height: 10, @@ -318,172 +327,6 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState ), ], ) - // ListView( - // children: [ - // TextFields( - // hintText: widget.hintSearchText ?? - // TranslationBase.of(context).searchHistory, - // borderWidth: 0.0, - // padding: EdgeInsets.all(20), - // borderRadius: 0, - // suffixIcon: EvaIcons.search, - // onChanged: (value) { - // filterSearchResults(value); - // }, - // ), - // // SizedBox(height: 15,), - // DividerWithSpacesAround(), - // - // - // // Container( - // // // padding:EdgeInsets.all(20), - // // child: Column( - // // children: items.map((historyInfo) { - // // return Column( - // // children: [ - // // InkWell( - // // onTap:(){ - // // - // // setState(() { - // // if (widget - // // .isServiceSelected(historyInfo)) { - // // widget.removeHistory(historyInfo); - // // } else { - // // widget.addHistory(historyInfo); - // // } - // // }); - // // }, - // // - // // child: Column( - // // children: [ - // // Row( - // // children: [ - // // Checkbox( - // // value:true, - // // // widget.isServiceSelected(historyInfo), - // // activeColor: Colors.red[800], - // // onChanged: (bool newValue) { - // // // setState(() { - // // // if (widget - // // // .isServiceSelected(historyInfo)) { - // // // widget.removeHistory(historyInfo); - // // // } else { - // // // widget.addHistory(historyInfo); - // // // } - // // // }); - // // }), - // // Expanded( - // // child: Padding( - // // padding: const EdgeInsets.symmetric( - // // horizontal: 10, vertical: 0), - // // child: AppText(projectViewModel.isArabic - // // ? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn - // // : historyInfo.nameEn, - // // color: Color(0xFF575757), - // // fontSize: 16, - // // fontWeight:FontWeight.w600, - // // ), - // // ), - // // ), - // // ], - // // ), - // // TextFields( - // // onTapTextFields: widget.model - // // .allergySeverityList != null - // // ? () { - // // MasterKeyDailog dialog = MasterKeyDailog( - // // list: widget.model.allergySeverityList, - // // okText: TranslationBase - // // .of(context) - // // .ok, - // // okFunction: (selectedValue) { - // // // setState(() { - // // // _selectedAllergySeverity = - // // // selectedValue; - // // // - // // // severityController.text = - // // // projectViewModel.isArabic - // // // ? _selectedAllergySeverity - // // // .nameAr - // // // : _selectedAllergySeverity - // // // .nameEn; - // // // }); - // // }, - // // ); - // // showDialog( - // // barrierDismissible: false, - // // context: context, - // // builder: (BuildContext context) { - // // return dialog; - // // }, - // // ); - // // } - // // : null, - // // hasLabelText: severityController.text != - // // '' ? true : false, - // // showLabelText: true, - // // hintText: TranslationBase - // // .of(context) - // // .selectSeverity, - // // fontSize: 13.5, - // // readOnly: true, - // // // hintColor: Colors.black, - // // fontWeight: FontWeight.w600, - // // maxLines: 2, - // // minLines: 1, - // // controller: severityController, - // // validator: (value) { - // // if (value == null) - // // return TranslationBase - // // .of(context) - // // .emptyMessage; - // // else - // // return null; - // // }), SizedBox( - // // height: 5, - // // ), - // // // if(isFormSubmitted && - // // // _selectedAllergySeverity == null) - // // // CustomValidationError(), - // // - // // SizedBox( - // // height: 10, - // // ), - // // Container( - // // margin: EdgeInsets.only( - // // left: 0, right: 0, top: 15), - // // child: TextFields( - // // hasLabelText: remarkController.text != ''?true:false, - // // showLabelText: true, - // // hintText: TranslationBase.of(context).remarks, - // // fontSize: 13.5, - // // // hintColor: Colors.black, - // // fontWeight: FontWeight.w600, - // // maxLines: 25, - // // minLines: 10, - // // controller: remarkController, - // // validator: (value) { - // // if (value == null) - // // return TranslationBase - // // .of(context) - // // .emptyMessage; - // // else - // // return null; - // // }), - // // ), SizedBox( - // // height: 10, - // // ), - // // ], - // // ), - // // ), - // // // DividerWithSpacesAround(), - // // ], - // // ); - // // }).toList(), - // // ), - // // ), - // ], - // ), )), ), ), @@ -496,6 +339,9 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState padding: 10, color: Color(0xFF359846), onPressed: () { + setState(() { + isSubmitted = true; + }); widget.addSelectedAllergy(); }, ), From c1adb9eeff06d733ef31429fbb19c05de9231b1c Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 10:17:49 +0300 Subject: [PATCH 05/14] fix issues --- .../subjective/update_subjective_page.dart | 8 +- .../soap_update/update_soap_index.dart | 2 - ..._key_checkbox_search_allergies_widget.dart | 428 +++++++++--------- 3 files changed, 219 insertions(+), 219 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 45202baf..a5f8bfad 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -304,7 +304,7 @@ class _UpdateSubjectivePageState extends State { isExpanded: isAllergiesExpand, ), SizedBox( - height:MediaQuery.of(context).size.height * 0.2, + height:MediaQuery.of(context).size.height * 0.16, ), ], ), @@ -324,13 +324,13 @@ class _UpdateSubjectivePageState extends State { height: MediaQuery .of(context) .size - .height * 0.15, + .height * 0.1, width: double.infinity, child: Column( children: [ SizedBox( - height: 15, + height: 10, ), Container(child: FractionallySizedBox( widthFactor: .80, @@ -351,7 +351,7 @@ class _UpdateSubjectivePageState extends State { ), ),), SizedBox( - height: 15, + height: 5, ), ], ),), diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index b14a0479..e774d913 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -68,8 +68,6 @@ class _UpdateSoapIndexState extends State // baseViewModel: model, isLoading: _isLoading, isShowAppBar: false, - // appBarTitle: TranslationBase.of(context).healthRecordInformation, - // TODO mousa removed the singleChildScrollView body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 68c01d62..e7e15076 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -87,220 +87,164 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState SizedBox( height: 10, ), - FractionallySizedBox( - widthFactor: 0.9, - child: Container( - height: MediaQuery.of(context).size.height * 0.60, - child: ListView.builder( - itemCount: items.length, - itemBuilder: (context, index) { - bool isSelected = widget.isServiceSelected( - items[index]); - MySelectedAllergy mySelectedAllergy; - if (isSelected) { - mySelectedAllergy = widget - .getServiceSelectedAllergy( + Expanded( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Container( + height: MediaQuery.of(context).size.height * 0.60, + child: ListView.builder( + itemCount: items.length, + itemBuilder: (context, index) { + bool isSelected = widget.isServiceSelected( items[index]); - } - TextEditingController remarkController = TextEditingController( - text: isSelected ? mySelectedAllergy - .remark : null); - TextEditingController severityController = TextEditingController( - text: isSelected ? mySelectedAllergy - .selectedAllergySeverity != null - ? projectViewModel - .isArabic - ? mySelectedAllergy - .selectedAllergySeverity - .nameAr - : mySelectedAllergy - .selectedAllergySeverity - .nameEn - : null : null); - return Column( - children: [ - InkWell( - onTap: () { - setState(() { - if (widget.isServiceSelected( - items[index])) { - widget - .removeAllergy( - items[index]); - } else { - // TODO add Allergy + MySelectedAllergy mySelectedAllergy; + if (isSelected) { + mySelectedAllergy = widget + .getServiceSelectedAllergy( + items[index]); + } + TextEditingController remarkController = TextEditingController( + text: isSelected ? mySelectedAllergy + .remark : null); + TextEditingController severityController = TextEditingController( + text: isSelected ? mySelectedAllergy + .selectedAllergySeverity != null + ? projectViewModel + .isArabic + ? mySelectedAllergy + .selectedAllergySeverity + .nameAr + : mySelectedAllergy + .selectedAllergySeverity + .nameEn + : null : null); + return Column( + children: [ + InkWell( + onTap: () { + setState(() { + if (widget.isServiceSelected( + items[index])) { + widget + .removeAllergy( + items[index]); + } else { + // TODO add Allergy - MySelectedAllergy - mySelectedAllergy = - new MySelectedAllergy( - selectedAllergy: - items[index], - selectedAllergySeverity: - _selectedAllergySeverity, - remark: null, - isChecked: true); - widget.addAllergy( - mySelectedAllergy); - } - }); - }, - child: Column( - children: [ - Row( - children: [ - Checkbox( - value: widget - .isServiceSelected( - items[index]), - activeColor: - Colors.red[800], - onChanged: (bool newValue) { - // setState(() { - // if (widget - // .isServiceSelected(items[index])) { - // widget.removeHistory(items[index]); - // } else { - // widget.addHistory(items[index]); - // } - // }); - }), - Expanded( - child: Padding( - padding: const EdgeInsets - .symmetric( - horizontal: 10, - vertical: 0), - child: AppText( - projectViewModel.isArabic - ? items[index] - .nameAr != - "" - ? items[index] - .nameAr - : items[index] - .nameEn - : items[index].nameEn, - color: Color(0xFF575757), - fontSize: 16, - fontWeight: - FontWeight.w600, + MySelectedAllergy + mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[index], + selectedAllergySeverity: + _selectedAllergySeverity, + remark: null, + isChecked: true); + widget.addAllergy( + mySelectedAllergy); + } + }); + }, + child: Column( + children: [ + Row( + children: [ + Checkbox( + value: widget + .isServiceSelected( + items[index]), + activeColor: + Colors.red[800], + onChanged: (bool newValue) { + // setState(() { + // if (widget + // .isServiceSelected(items[index])) { + // widget.removeHistory(items[index]); + // } else { + // widget.addHistory(items[index]); + // } + // }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 10, + vertical: 0), + child: AppText( + projectViewModel.isArabic + ? items[index] + .nameAr != + "" + ? items[index] + .nameAr + : items[index] + .nameEn + : items[index].nameEn, + color: Color(0xFF575757), + fontSize: 16, + fontWeight: + FontWeight.w600, + ), ), ), - ), - ], - ), - if(widget - .isServiceSelected( - items[index])) - Column(children: [ - TextFields( - onTapTextFields: widget.model - .allergySeverityList != - null - ? () { - MasterKeyDailog dialog = - MasterKeyDailog( - list: widget.model - .allergySeverityList, - okText: - TranslationBase.of( - context) - .ok, - okFunction: - (selectedValue) { - setState(() { - mySelectedAllergy - .selectedAllergySeverity = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: - false, - context: context, - builder: (BuildContext - context) { - return dialog; - }, - ); - } - : null, - hasLabelText: - mySelectedAllergy - .selectedAllergySeverity != - null - ? true - : false, - showLabelText: true, - hintText: - TranslationBase - .of(context) - .selectSeverity, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: severityController, - validator: (value) { - if (value == null) - return TranslationBase - .of( - context) - .emptyMessage; - else - return null; - }), - SizedBox( - height: 5, + ], ), - if(isSubmitted && - mySelectedAllergy - .selectedAllergySeverity == null) - Row( - - children: [ - CustomValidationError(), - ], - mainAxisAlignment: MainAxisAlignment.start, - ), - - SizedBox( - height: 10, - ), - Container( - margin: EdgeInsets.only( - left: 0, right: 0, top: 15), - child: TextFields( + if(widget + .isServiceSelected( + items[index])) + Column(children: [ + TextFields( + onTapTextFields: widget.model + .allergySeverityList != + null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: widget.model + .allergySeverityList, + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + mySelectedAllergy + .selectedAllergySeverity = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); + } + : null, hasLabelText: - remarkController.text != - '' + mySelectedAllergy + .selectedAllergySeverity != + null ? true : false, showLabelText: true, - hintText: TranslationBase - .of( - context) - .remarks, + hintText: + TranslationBase + .of(context) + .selectSeverity, fontSize: 13.5, + readOnly: true, // hintColor: Colors.black, fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 10, - initialValue: isSelected - ? mySelectedAllergy - .remark : '', - // controller: remarkControlle - - onChanged: (value) { - if (isSelected) { - mySelectedAllergy - .remark = value; - }; - }, - + maxLines: 2, + minLines: 1, + controller: severityController, validator: (value) { if (value == null) return TranslationBase @@ -310,18 +254,76 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState else return null; }), - ), - SizedBox( - height: 10, - ), - ],) - ], + SizedBox( + height: 5, + ), + if(isSubmitted && + mySelectedAllergy + .selectedAllergySeverity == null) + Row( + + children: [ + CustomValidationError(), + ], + mainAxisAlignment: MainAxisAlignment.start, + ), + + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only( + left: 0, right: 0, top: 15), + child: TextFields( + hasLabelText: + remarkController.text != + '' + ? true + : false, + showLabelText: true, + hintText: TranslationBase + .of( + context) + .remarks, + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 10, + initialValue: isSelected + ? mySelectedAllergy + .remark : '', + // controller: remarkControlle + + onChanged: (value) { + if (isSelected) { + mySelectedAllergy + .remark = value; + }; + }, + + validator: (value) { + if (value == null) + return TranslationBase + .of( + context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 10, + ), + ],) + ], + ), ), - ), - // DividerWithSpacesAround(), - ], - ); - }, + // DividerWithSpacesAround(), + ], + ); + }, + ), ), ), ), From e6f2ed51971f89a90e481ad1bc9389fdb416ac1e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 10:35:03 +0300 Subject: [PATCH 06/14] change the add item box --- .../subjective/update_Chief_complaints.dart | 37 +-------- .../subjective/update_allergies_widget.dart | 77 +++++++++++++----- .../subjective/update_history_widget.dart | 81 +++++++++++++------ 3 files changed, 113 insertions(+), 82 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart b/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart index fd424767..1b159ec0 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart @@ -46,40 +46,9 @@ class UpdateChiefComplaints extends StatelessWidget { child: CustomValidationError( error: complaintsControllerError, )), - - // Container( - // margin: - // EdgeInsets.only(left: 10, right: 10, top: 15), - // child: TextFields( - // hasLabelText: complaintsController.text != '' - // ? true - // : false, - // hintText: TranslationBase - // .of(context) - // .addChiefComplaints, - // fontSize: 13.5, - // // hintColor: Colors.black, - // showLabelText: true, - // fontWeight: FontWeight.w600, - // maxLines: 25, - // minLines: 13, - // controller: complaintsController, - // validator: (value) { - // if (value == null || value == "") - // return TranslationBase.of(context) - // .emptyMessage; - // else if (value.length < 25) - // return TranslationBase - // .of(context) - // .chiefComplaintLength; - // //""; - // else - // return null; - // }), - // ), - SizedBox( - height: 20, - ), + SizedBox( + height: 20, + ), NewTextFields( hintText: TranslationBase diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart index c31e8e59..2a25861a 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart @@ -1,4 +1,5 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -40,28 +41,60 @@ class _UpdateAllergiesWidgetState extends State { return Column( children: [ - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).addAllergies, - borderColor: HexColor('#707070'), - borderWidth: 0.30, - fontSize: 13.5, - borderRadius: 12, - onTapTextFields: () { - openAllergiesList(context, changeAllState); - }, - readOnly: true, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: Color(0xFF2B353E), - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context).emptyMessage; - else - return null; - }), + InkWell( + onTap: () { + openAllergiesList(context, changeAllState); + }, + child: Container( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 8.0), + margin: + EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).addAllergies}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + AppText( + "${TranslationBase.of(context).searchHere}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + ), + ], + )), + Icon( + Icons.add_box_rounded, + size: 25, + ) + ], + ), + ), ), SizedBox( height: 20, diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart index eb69e7a5..aba4af07 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart @@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; @@ -49,28 +50,60 @@ class _UpdateHistoryWidgetState extends State ProjectViewModel projectViewModel = Provider.of(context); return Column( children: [ - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).addHistory, - borderColor: HexColor('#707070'), - borderWidth: 0.30, - fontSize: 13.5, - borderRadius: 12, - onTapTextFields: () { - openHistoryList(context); - }, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: Color(0xFF2B353E), - readOnly: true, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context).emptyMessage; - else - return null; - }), + InkWell( + onTap: () { + openHistoryList(context); + }, + child: Container( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 8.0), + margin: + EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).addHistory}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + AppText( + "${TranslationBase.of(context).searchHere}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + ), + ], + )), + Icon( + Icons.add_box_rounded, + size: 25, + ) + ], + ), + ), ), SizedBox( height: 20, @@ -143,10 +176,6 @@ class _UpdateHistoryWidgetState extends State } removeHistory(MasterKeyModel historyKey) { - // Iterable history = widget.myHistoryList.where((element) => - // masterKey.id == element.id && masterKey.typeId == element.typeId); - // - List history = // ignore: missing_return widget.myHistoryList.where((element) => From d9878598656793107f3190a8cc6a57856597723c Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 11:39:51 +0300 Subject: [PATCH 07/14] make allergies as expandable widget --- lib/icons_app/config.json | 3 +- .../subjective/update_subjective_page.dart | 3 +- lib/widgets/shared/app_drawer_widget.dart | 21 +- ..._key_checkbox_search_allergies_widget.dart | 206 +++++++++++++++++- 4 files changed, 219 insertions(+), 14 deletions(-) diff --git a/lib/icons_app/config.json b/lib/icons_app/config.json index dfd00326..d215cdc1 100644 --- a/lib/icons_app/config.json +++ b/lib/icons_app/config.json @@ -2301,5 +2301,4 @@ ] } ] - } -} \ No newline at end of file + } \ No newline at end of file diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index a5f8bfad..2d475624 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -205,10 +205,11 @@ class _UpdateSubjectivePageState extends State { doctorID: ''); await model.getPatientChiefComplaint(getChiefComplaintReqModel); if (model.patientChiefComplaintList.isNotEmpty) { + isChiefExpand = true; complaintsController.text = helpers.parseHtmlString( model.patientChiefComplaintList[0].chiefComplaint); illnessController.text = model.patientChiefComplaintList[0].hopi; - medicationController.text = model.patientChiefComplaintList[0].currentMedication + '\n \n'; + medicationController.text =!(model.patientChiefComplaintList[0].currentMedication).isNotEmpty ? model.patientChiefComplaintList[0].currentMedication + '\n \n':model.patientChiefComplaintList[0].currentMedication; } await getHistory(model); diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 43106db1..41d58931 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -98,7 +98,7 @@ class _AppDrawerState extends State { // " or " + // TranslationBase.of(context).leaves, - DoctorApp.leaves, + DoctorApp.reschedule__1, // subTitle: , ), onTap: () { @@ -121,15 +121,6 @@ class _AppDrawerState extends State { margin: EdgeInsets.symmetric(horizontal: 20), child: Column( children: [ - InkWell( - child: DrawerItem( - TranslationBase.of(context).logout, Icons.settings), - onTap: () async { - Navigator.pop(context); - await helpers.logout(); - projectsProvider.isLogin = false; - }, - ), InkWell( child: DrawerItem( projectsProvider.isArabic @@ -143,6 +134,16 @@ class _AppDrawerState extends State { projectsProvider.changeLanguage('ar'); }, ), + InkWell( + child: DrawerItem( + TranslationBase.of(context).logout, DoctorApp.logout_1), + onTap: () async { + Navigator.pop(context); + await helpers.logout(); + projectsProvider.isLogin = false; + }, + ), + ], ), ), diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index e7e15076..497f35c2 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -14,6 +14,7 @@ import 'package:provider/provider.dart'; import 'app_texts_widget.dart'; import 'dialogs/master_key_dailog.dart'; +import 'expandable-widget-header-body.dart'; class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { final SOAPViewModel model; @@ -118,7 +119,210 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState .selectedAllergySeverity .nameEn : null : null); - return Column( + return HeaderBodyExpandableNotifier( + headerWidget: InkWell( + onTap: () { + setState(() { + if (widget.isServiceSelected( + items[index])) { + widget + .removeAllergy( + items[index]); + } else { + // TODO add Allergy + + MySelectedAllergy + mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[index], + selectedAllergySeverity: + _selectedAllergySeverity, + remark: null, + isChecked: true); + widget.addAllergy( + mySelectedAllergy); + } + }); + }, + child: Row( + children: [ + Checkbox( + value: widget + .isServiceSelected( + items[index]), + activeColor: + Colors.red[800], + onChanged: (bool newValue) { + // setState(() { + // if (widget + // .isServiceSelected(items[index])) { + // widget.removeHistory(items[index]); + // } else { + // widget.addHistory(items[index]); + // } + // }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 10, + vertical: 0), + child: AppText( + projectViewModel.isArabic + ? items[index] + .nameAr != + "" + ? items[index] + .nameAr + : items[index] + .nameEn + : items[index].nameEn, + color: Color(0xFF575757), + fontSize: 16, + fontWeight: + FontWeight.w600, + ), + ), + ), + InkWell( + // onTap: onTap, + child: Icon( + isSelected ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline)) + ], + ), + ), + bodyWidget: isSelected?Column(children: [ + TextFields( + onTapTextFields: widget.model + .allergySeverityList != + null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: widget.model + .allergySeverityList, + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + mySelectedAllergy + .selectedAllergySeverity = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); + } + : null, + hasLabelText: + mySelectedAllergy + .selectedAllergySeverity != + null + ? true + : false, + showLabelText: true, + hintText: + TranslationBase + .of(context) + .selectSeverity, + fontSize: 13.5, + readOnly: true, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 2, + minLines: 1, + controller: severityController, + validator: (value) { + if (value == null) + return TranslationBase + .of( + context) + .emptyMessage; + else + return null; + }), + SizedBox( + height: 5, + ), + if(isSubmitted && + mySelectedAllergy + .selectedAllergySeverity == null) + Row( + + children: [ + CustomValidationError(), + ], + mainAxisAlignment: MainAxisAlignment.start, + ), + + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only( + left: 0, right: 0, top: 15), + child: TextFields( + hasLabelText: + remarkController.text != + '' + ? true + : false, + showLabelText: true, + hintText: TranslationBase + .of( + context) + .remarks, + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 10, + initialValue: isSelected + ? mySelectedAllergy + .remark : '', + // controller: remarkControlle + + onChanged: (value) { + if (isSelected) { + mySelectedAllergy + .remark = value; + }; + }, + + validator: (value) { + if (value == null) + return TranslationBase + .of( + context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 10, + ), + ],):Column(), + isExpand: isSelected, + ); + + + + + Column( children: [ InkWell( onTap: () { From 136c839c930476ead72c087e08425e51bceb3580 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 8 Apr 2021 12:00:06 +0300 Subject: [PATCH 08/14] hot fixes --- lib/core/viewModel/procedure_View_model.dart | 2 +- .../medical-file/medical_file_details.dart | 159 ++++++++++-------- lib/screens/procedures/ProcedureCard.dart | 7 +- lib/screens/procedures/procedure_screen.dart | 47 +++--- lib/widgets/shared/bottom_nav_bar.dart | 10 +- 5 files changed, 125 insertions(+), 100 deletions(-) diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 9627353f..6632df4d 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -62,7 +62,7 @@ class ProcedureViewModel extends BaseViewModel { await _procedureService.getProcedure(mrn: mrn); if (_procedureService.hasError) { error = _procedureService.error; - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else setState(ViewState.Idle); } diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 25ea1f22..bc3323ad 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -468,10 +468,8 @@ class _MedicalFileDetailsState extends State { Row( children: [ AppText( - 'ICD', - fontWeight: - FontWeight - .w700, + 'ICD: ', + fontSize: 13.0, ), AppText( model @@ -488,14 +486,20 @@ class _MedicalFileDetailsState extends State { index] .iCD10 .trim(), + fontSize: 13.5, + fontWeight: + FontWeight + .w700, ), SizedBox( - width: 35.0), + width: 15.0), + ], + ), + Row( + children: [ AppText( 'Condition: ', - fontWeight: - FontWeight - .w700, + fontSize: 12.5, ), Expanded( child: AppText( @@ -514,6 +518,10 @@ class _MedicalFileDetailsState extends State { index] .condition .trim(), + fontSize: 13.0, + fontWeight: + FontWeight + .w700, ), ), ], @@ -539,6 +547,7 @@ class _MedicalFileDetailsState extends State { fontWeight: FontWeight .w700, + fontSize: 15.0, ), ) ], @@ -547,24 +556,29 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Type: ', - fontWeight: - FontWeight - .w700, + fontSize: 15.5, ), Expanded( - child: AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[ - 0] - .lstAssessments[ - index] - .type), + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .type, + fontSize: 16.0, + fontWeight: + FontWeight + .w700, + ), ), ], ), @@ -700,9 +714,6 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Procedure ID: ', - fontWeight: - FontWeight - .w700, ), AppText( model @@ -720,6 +731,11 @@ class _MedicalFileDetailsState extends State { index] .procedureId .trim(), + fontSize: + 13.5, + fontWeight: + FontWeight + .w700, ), ], ), @@ -729,9 +745,6 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Order Date: ', - fontWeight: - FontWeight - .w700, ), AppText( Helpers.getDateFormatted( @@ -755,6 +768,9 @@ class _MedicalFileDetailsState extends State { )), fontSize: 13.5, + fontWeight: + FontWeight + .w700, ), ], ), @@ -792,23 +808,26 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'CPT Code : ', + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstProcedure[ + index] + .patientID + .toString(), fontWeight: FontWeight .w700, ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstProcedure[ - index] - .patientID - .toString()), ], ), SizedBox( @@ -924,22 +943,25 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Exam Type: ', + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstPhysicalExam[ + index] + .examDesc, fontWeight: FontWeight .w700, ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstPhysicalExam[ - index] - .examDesc), ], ), Row( @@ -968,22 +990,25 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Abnormal: ', + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstPhysicalExam[ + index] + .abnormal, fontWeight: FontWeight .w700, ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstPhysicalExam[ - index] - .abnormal), ], ), SizedBox( diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 31595fa6..1b51ba30 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -162,12 +162,15 @@ class ProcedureCard extends StatelessWidget { ), if (entityList.categoryID == 2 || entityList.categoryID == 4) - Icon(Icons.edit) + InkWell( + child: Icon(Icons.edit), + onTap: onTap, + ) ], ) ], ), - onTap: onTap, + //onTap: onTap, ), ), ), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 7d95fd35..b4299d2e 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -115,31 +115,28 @@ class ProcedureScreen extends StatelessWidget { model.procedureList[0].entityList[index].categoryID, entityList: model.procedureList[0].entityList[index], onTap: () { - // if (model.procedureList[0].entityList[index] - // .categoryID == - // 2 || - // model.procedureList[0].entityList[index] - // .categoryID == - // 4) { - updateProcedureForm(context, - model: model, - patient: patient, - remarks: model - .procedureList[0].entityList[index].remarks, - orderType: model - .procedureList[0].entityList[index].orderType - .toString(), - orderNo: model - .procedureList[0].entityList[index].orderNo, - procedureName: model.procedureList[0] - .entityList[index].procedureName, - categoreId: model - .procedureList[0].entityList[index].categoryID - .toString(), - procedureId: model.procedureList[0] - .entityList[index].procedureId, - limetNo: model.procedureList[0].entityList[index] - .lineItemNo); + if (model.procedureList[0].entityList[index].categoryID == + 2 || + model.procedureList[0].entityList[index].categoryID == 4) + updateProcedureForm(context, + model: model, + patient: patient, + remarks: model + .procedureList[0].entityList[index].remarks, + orderType: model.procedureList[0] + .entityList[index].orderType + .toString(), + orderNo: model + .procedureList[0].entityList[index].orderNo, + procedureName: model.procedureList[0] + .entityList[index].procedureName, + categoreId: model.procedureList[0] + .entityList[index].categoryID + .toString(), + procedureId: model.procedureList[0] + .entityList[index].procedureId, + limetNo: model.procedureList[0] + .entityList[index].lineItemNo); // } else // helpers.showErrorToast( // 'You Cant Update This Procedure'); diff --git a/lib/widgets/shared/bottom_nav_bar.dart b/lib/widgets/shared/bottom_nav_bar.dart index 026f46b2..0f5673ab 100644 --- a/lib/widgets/shared/bottom_nav_bar.dart +++ b/lib/widgets/shared/bottom_nav_bar.dart @@ -37,8 +37,8 @@ class _BottomNavBarState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ BottomNavigationItem( - icon: DoctorApp.home_icon, - activeIcon: DoctorApp.home_icon_active, + icon: DoctorApp.home_icon_active, + activeIcon: DoctorApp.home_active, changeIndex: _changeIndex, index: _index, currentIndex: 0, @@ -46,7 +46,7 @@ class _BottomNavBarState extends State { ), BottomNavigationItem( icon: DoctorApp.schedule_icon, - activeIcon: DoctorApp.scdedule_icon_active, + activeIcon: DoctorApp.scdedule_icon_active_1, changeIndex: _changeIndex, index: _index, currentIndex: 1, @@ -54,7 +54,7 @@ class _BottomNavBarState extends State { ), BottomNavigationItem( icon: DoctorApp.qr_code, - activeIcon: DoctorApp.qr_code, + activeIcon: DoctorApp.qr_reader_active_1, changeIndex: _changeIndex, index: _index, currentIndex: 2, @@ -62,7 +62,7 @@ class _BottomNavBarState extends State { ), BottomNavigationItem( icon: DoctorApp.message_icon, - activeIcon: DoctorApp.message_icon_active, + activeIcon: DoctorApp.dr_reply_active_1, changeIndex: _changeIndex, index: _index, currentIndex: 3, From ed02bbc1f00a62d162858238600423e93f51aa4d Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 12:47:06 +0300 Subject: [PATCH 09/14] fix allergy --- lib/models/SOAP/my_selected_allergy.dart | 8 +- ..._key_checkbox_search_allergies_widget.dart | 249 ++++++++++-------- 2 files changed, 149 insertions(+), 108 deletions(-) diff --git a/lib/models/SOAP/my_selected_allergy.dart b/lib/models/SOAP/my_selected_allergy.dart index 5a6bd749..c4e52af7 100644 --- a/lib/models/SOAP/my_selected_allergy.dart +++ b/lib/models/SOAP/my_selected_allergy.dart @@ -5,6 +5,7 @@ class MySelectedAllergy { MasterKeyModel selectedAllergy; String remark; bool isChecked; + bool isExpanded; int createdBy; MySelectedAllergy( @@ -12,6 +13,7 @@ class MySelectedAllergy { this.selectedAllergy, this.remark, this.isChecked, + this.isExpanded = true, this.createdBy}); MySelectedAllergy.fromJson(Map json) { @@ -22,7 +24,8 @@ class MySelectedAllergy { ? new MasterKeyModel.fromJson(json['selectedAllergy']) : null; remark = json['remark']; - remark = json['isChecked']; + isChecked = json['isChecked']; + isExpanded = json['isExpanded']; createdBy = json['createdBy']; } @@ -35,7 +38,8 @@ class MySelectedAllergy { data['selectedAllergy'] = this.selectedAllergy.toJson(); } data['remark'] = this.remark; - data['isChecked'] = this.remark; + data['isChecked'] = this.isChecked; + data['isExpanded'] = this.isExpanded; data['createdBy'] = this.createdBy; return data; } diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 497f35c2..f84db092 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -96,115 +96,149 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState child: ListView.builder( itemCount: items.length, itemBuilder: (context, index) { - bool isSelected = widget.isServiceSelected( - items[index]); + bool isSelected = + widget.isServiceSelected(items[index]); MySelectedAllergy mySelectedAllergy; if (isSelected) { - mySelectedAllergy = widget - .getServiceSelectedAllergy( - items[index]); + mySelectedAllergy = + widget.getServiceSelectedAllergy( + items[index]); } - TextEditingController remarkController = TextEditingController( - text: isSelected ? mySelectedAllergy - .remark : null); - TextEditingController severityController = TextEditingController( - text: isSelected ? mySelectedAllergy - .selectedAllergySeverity != null - ? projectViewModel - .isArabic - ? mySelectedAllergy - .selectedAllergySeverity - .nameAr - : mySelectedAllergy - .selectedAllergySeverity - .nameEn - : null : null); + TextEditingController remarkController = + TextEditingController( + text: isSelected + ? mySelectedAllergy.remark + : null); + TextEditingController severityController = + TextEditingController( + text: isSelected + ? mySelectedAllergy + .selectedAllergySeverity != + null + ? projectViewModel.isArabic + ? mySelectedAllergy + .selectedAllergySeverity + .nameAr + : mySelectedAllergy + .selectedAllergySeverity + .nameEn + : null + : null); return HeaderBodyExpandableNotifier( - headerWidget: InkWell( - onTap: () { - setState(() { - if (widget.isServiceSelected( - items[index])) { - widget - .removeAllergy( - items[index]); - } else { - // TODO add Allergy + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Checkbox( + value: + widget.isServiceSelected( + items[index]), + activeColor: Colors.red[800], + onChanged: (bool newValue) { + // setState(() { + // if (widget + // .isServiceSelected(items[index])) { + // widget.removeHistory(items[index]); + // } else { + // widget.addHistory(items[index]); + // } + // }); + }), + InkWell( + onTap: () { + setState(() { + if (widget + .isServiceSelected( + items[index])) { + widget.removeAllergy( + items[index]); + } else { + // TODO add Allergy - MySelectedAllergy - mySelectedAllergy = - new MySelectedAllergy( - selectedAllergy: - items[index], - selectedAllergySeverity: - _selectedAllergySeverity, - remark: null, - isChecked: true); - widget.addAllergy( - mySelectedAllergy); - } - }); - }, - child: Row( - children: [ - Checkbox( - value: widget - .isServiceSelected( - items[index]), - activeColor: - Colors.red[800], - onChanged: (bool newValue) { - // setState(() { - // if (widget - // .isServiceSelected(items[index])) { - // widget.removeHistory(items[index]); - // } else { - // widget.addHistory(items[index]); - // } - // }); - }), - Expanded( - child: Padding( - padding: const EdgeInsets - .symmetric( - horizontal: 10, - vertical: 0), - child: AppText( - projectViewModel.isArabic - ? items[index] - .nameAr != - "" - ? items[index] - .nameAr - : items[index] - .nameEn - : items[index].nameEn, - color: Color(0xFF575757), - fontSize: 16, - fontWeight: - FontWeight.w600, + MySelectedAllergy + mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[index], + selectedAllergySeverity: + _selectedAllergySeverity, + remark: null, + isChecked: true, + isExpanded: true); + widget.addAllergy( + mySelectedAllergy); + } + }); + }, + child: Expanded( + child: Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 10, + vertical: 0), + child: Container( + + child: AppText( + projectViewModel.isArabic + ? items[index] + .nameAr != + "" + ? items[index] + .nameAr + : items[index] + .nameEn + : items[index].nameEn, + color: Color(0xFF575757), + fontSize: 16, + fontWeight: + FontWeight.w600, + ), + width: MediaQuery.of(context).size.width * 0.55, + ), + ), ), ), - ), - InkWell( - // onTap: onTap, - child: Icon( - isSelected ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline)) - ], - ), + ], + ), + InkWell( + onTap: () { + if (mySelectedAllergy != null) { + setState(() { + mySelectedAllergy + .isExpanded = + mySelectedAllergy + .isExpanded + ? false + : true; + }); + } + }, + child: Icon((mySelectedAllergy != + null + ? mySelectedAllergy + .isExpanded + : false) + ? EvaIcons + .arrowIosUpwardOutline + : EvaIcons + .arrowIosDownwardOutline)) + ], ), - bodyWidget: isSelected?Column(children: [ - TextFields( - onTapTextFields: widget.model - .allergySeverityList != - null - ? () { - MasterKeyDailog dialog = - MasterKeyDailog( - list: widget.model - .allergySeverityList, - okText: - TranslationBase.of( + bodyWidget: Column( + children: [ + TextFields( + onTapTextFields: widget.model + .allergySeverityList != + null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: widget.model + .allergySeverityList, + okText: + TranslationBase.of( context) .ok, okFunction: @@ -228,9 +262,10 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState } : null, hasLabelText: - mySelectedAllergy - .selectedAllergySeverity != - null + mySelectedAllergy != null && + mySelectedAllergy + .selectedAllergySeverity != + null ? true : false, showLabelText: true, @@ -315,8 +350,10 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState SizedBox( height: 10, ), - ],):Column(), - isExpand: isSelected, + ],), + isExpand: mySelectedAllergy != null + ? mySelectedAllergy.isExpanded + : false, ); From a768dd63cfad6fd595a7d6fd9e4ff750f2fd5238 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 14:53:38 +0300 Subject: [PATCH 10/14] fix steps --- .../profile/soap_update/steps_widget.dart | 173 +++++++++++------- .../soap_update/update_soap_index.dart | 134 +++++++------- 2 files changed, 177 insertions(+), 130 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index 3ad583d0..0abc84c7 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -22,18 +22,21 @@ class StepsWidget extends StatelessWidget { children: [ Container( height: height == 0 ? 150 : height, - width: MediaQuery.of(context).size.width, + width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, child: Center( - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, + child: Container( + width: MediaQuery.of(context).size.width * 0.87, + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), ), ), ), Positioned( - top: 50, + top: 43, left: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -84,8 +87,11 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 50, - left: MediaQuery.of(context).size.width * 0.28, + top: 43, + left: MediaQuery + .of(context) + .size + .width * 0.25, child: InkWell( onTap: () => index >= 1 ? changeCurrentTab(1) : null, child: Column( @@ -137,8 +143,11 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 50, - left: MediaQuery.of(context).size.width * 0.52, + top: 43, + left: MediaQuery + .of(context) + .size + .width * 0.50, child: InkWell( onTap: () { if (index >= 3) changeCurrentTab(2); @@ -192,7 +201,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 50, + top: 43, right: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, @@ -218,30 +227,28 @@ class StepsWidget extends StatelessWidget { ), child: Center( child: Icon( - FontAwesomeIcons.check, - size: 20, - color: Colors.white, - )), + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), ), SizedBox( height: 5, ), - Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - AppText( - "Plan", - fontWeight: FontWeight.bold, - textAlign: TextAlign.center, - fontSize: 12, - ), - StatusLabel( - selectedStepId: index, - stepId: 3, - ), - ], - ), + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + AppText( + "Plan", + fontWeight: FontWeight.bold, + // textAlign: TextAlign.center, + fontSize: 12, + ), + StatusLabel( + selectedStepId: index, + stepId: 3, + ), + ], ), ], ), @@ -264,7 +271,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 50, + top: 43, right: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -286,28 +293,39 @@ class StepsWidget extends StatelessWidget { ? Color(0xFFCC9B14) : index > 0 ? Color(0xFF359846) - : Color(0xFFCCCCCC), + : Color(0xFFCCCCCC), ), child: Center( child: Icon( - FontAwesomeIcons.check, - size: 20, - color: Colors.white, - )), + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), ), SizedBox(height: 5), - AppText( - "شخصي", - fontWeight: FontWeight.bold, - fontSize: 16, + Column( + children: [ + AppText( + "شخصي", + fontWeight: FontWeight.bold, + fontSize: 16, + ), + StatusLabel( + selectedStepId: index, + stepId: 0, + ), + ], ), ], ), ), ), Positioned( - top: 50, - right: MediaQuery.of(context).size.width * 0.28, + top: 43, + right: MediaQuery + .of(context) + .size + .width * 0.28, child: InkWell( onTap: () => index >= 2 ? changeCurrentTab(1) : null, child: Column( @@ -328,28 +346,39 @@ class StepsWidget extends StatelessWidget { ? Color(0xFFCC9B14) : index > 1 ? Color(0xFF359846) - : Color(0xFFCCCCCC), + : Color(0xFFCCCCCC), ), child: Center( child: Icon( - FontAwesomeIcons.check, - size: 20, - color: Colors.white, - )), + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), ), SizedBox(height: 5), - AppText( - "هدف", - fontWeight: FontWeight.bold, - fontSize: 14, + Column( + children: [ + AppText( + "هدف", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + StatusLabel( + selectedStepId: index, + stepId: 1, + ), + ], ), ], ), ), ), Positioned( - top: 50, - right: MediaQuery.of(context).size.width * 0.52, + top: 43, + right: MediaQuery + .of(context) + .size + .width * 0.52, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(2) : null, child: Column( @@ -384,10 +413,18 @@ class StepsWidget extends StatelessWidget { ), Padding( padding: const EdgeInsets.only(right: 2), - child: AppText( - "تقدير", - fontWeight: FontWeight.bold, - fontSize: 14, + child: Column( + children: [ + AppText( + "تقدير", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + StatusLabel( + selectedStepId: index, + stepId: 2, + ), + ], ), ), ], @@ -395,12 +432,12 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 50, + top: 43, left: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, children: [ Container( width: 38, @@ -431,10 +468,18 @@ class StepsWidget extends StatelessWidget { ), Container( margin: EdgeInsets.only(right: index == 3 ? 15 : 0), - child: AppText( - "خطة", - fontWeight: FontWeight.bold, - fontSize: 14, + child: Column( + children: [ + AppText( + "خطة", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + StatusLabel( + selectedStepId: index, + stepId: 3, + ), + ], ), ), ], diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index e774d913..db9bf63a 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -68,75 +68,77 @@ class _UpdateSoapIndexState extends State // baseViewModel: model, isLoading: _isLoading, isShowAppBar: false, - body: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - boxShadow: [], - color: Theme.of(context).scaffoldBackgroundColor), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - // PatientPageHeaderWidget(patient), - PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - Container( - color: Theme.of(context).scaffoldBackgroundColor, - margin: EdgeInsets.only( - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: StepsWidget( - index: _currentIndex, - changeCurrentTab: changePageViewIndex, - height: MediaQuery.of(context).size.height * 0.21, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + boxShadow: [], + color: Theme.of(context).scaffoldBackgroundColor), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + // PatientPageHeaderWidget(patient), + PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), ), - ), - Container( - color: Theme.of(context).scaffoldBackgroundColor, - height: MediaQuery.of(context).size.height * 0.50, - child: PageView( - physics: NeverScrollableScrollPhysics(), - controller: _controller, - onPageChanged: (index) { - setState(() { - _currentIndex = index; - }); - }, - scrollDirection: Axis.horizontal, - children: [ - UpdateSubjectivePage( - changePageViewIndex: changePageViewIndex, - myAllergiesList: myAllergiesList, - myHistoryList: myHistoryList, - patientInfo: patient, - changeLoadingState: changeLoadingState), - UpdateObjectivePage( - changePageViewIndex: changePageViewIndex, - mySelectedExamination: mySelectedExamination, - patientInfo: patient, - changeLoadingState: changeLoadingState), - UpdateAssessmentPage( - changePageViewIndex: changePageViewIndex, - mySelectedAssessmentList: mySelectedAssessment, - patientInfo: patient, - changeLoadingState: changeLoadingState), - UpdatePlanPage( - changePageViewIndex: changePageViewIndex, - patientInfo: patient, - patientProgressNote: patientProgressNote, - changeLoadingState: changeLoadingState) - ], + Container( + color: Theme.of(context).scaffoldBackgroundColor, + margin: EdgeInsets.only( + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + child: StepsWidget( + index: _currentIndex, + changeCurrentTab: changePageViewIndex, + height: MediaQuery.of(context).size.height * 0.20, + ), ), - ) - ], + Container( + color: Theme.of(context).scaffoldBackgroundColor, + height: MediaQuery.of(context).size.height * 0.50, + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + UpdateSubjectivePage( + changePageViewIndex: changePageViewIndex, + myAllergiesList: myAllergiesList, + myHistoryList: myHistoryList, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdateObjectivePage( + changePageViewIndex: changePageViewIndex, + mySelectedExamination: mySelectedExamination, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdateAssessmentPage( + changePageViewIndex: changePageViewIndex, + mySelectedAssessmentList: mySelectedAssessment, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdatePlanPage( + changePageViewIndex: changePageViewIndex, + patientInfo: patient, + patientProgressNote: patientProgressNote, + changeLoadingState: changeLoadingState) + ], + ), + ) + ], + ), ), - ), - ], + ], + ), ), ), ); From b8b3ae5c7f36f216416eb3de72de0664b1fad60e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 8 Apr 2021 16:36:59 +0300 Subject: [PATCH 11/14] add my code to sideMnue --- lib/widgets/shared/app_drawer_widget.dart | 33 ++++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 41d58931..6193204d 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -46,7 +46,7 @@ class _AppDrawerState extends State { child: ListView(padding: EdgeInsets.zero, children: [ Container( margin: EdgeInsets.symmetric(horizontal: 20), - height: SizeConfig.heightMultiplier * 50, + // height: SizeConfig.heightMultiplier * 50, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -54,9 +54,9 @@ class _AppDrawerState extends State { child: Image.asset( 'assets/images/dr_app_logo.png', ), - margin: EdgeInsets.only(top: 10, bottom: 15), + margin: EdgeInsets.only(top: 10, bottom: 10), ), - SizedBox(height: 15), + SizedBox(height: 10), if (authProvider.doctorProfile != null) InkWell( onTap: () { @@ -91,7 +91,7 @@ class _AppDrawerState extends State { ], ), ), - SizedBox(height: 15), + SizedBox(height: 10), InkWell( child: DrawerItem( TranslationBase.of(context).rescheduleLeaves, @@ -111,6 +111,29 @@ class _AppDrawerState extends State { )); }, ), + + SizedBox(height: 10), + InkWell( + child: DrawerItem( + 'My QR Code', + // " or " + + // TranslationBase.of(context).leaves, + + DoctorApp.qr_code_3, + // subTitle: , + ), + ), + + InkWell( + child: Container( + height: 80, + child: Image.asset('assets/images/qr_code.png'), + ), + onTap: () { + }, + ), + + ], ), ), @@ -121,6 +144,8 @@ class _AppDrawerState extends State { margin: EdgeInsets.symmetric(horizontal: 20), child: Column( children: [ + + InkWell( child: DrawerItem( projectsProvider.isArabic From f8f088fe8cb390135dd82718fd74ca83f003f6ed Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 8 Apr 2021 17:57:07 +0300 Subject: [PATCH 12/14] design changes --- lib/config/localized_values.dart | 7 +- .../patient-admission-request-service.dart | 7 +- .../patient-doctor-referral-service.dart | 4 +- .../patient-admission-request-viewmodel.dart | 4 +- .../viewModel/patient-referral-viewmodel.dart | 4 +- .../profile/UCAF/UCAF-detail-screen.dart | 3 + .../profile/UCAF/UCAF-input-screen.dart | 609 ++++++++++-------- .../profile/UCAF/page-stepper-widget.dart | 145 +++++ .../admission-request-first-screen.dart | 45 +- .../admission-request-third-screen.dart | 7 +- .../admission-request_second-screen.dart | 9 +- .../referral/refer-patient-screen.dart | 2 +- lib/util/translations_delegate_base.dart | 1 + ...ent-profile-header-new-design-app-bar.dart | 5 +- .../profile/profile_medical_info_widget.dart | 2 +- 15 files changed, 536 insertions(+), 318 deletions(-) create mode 100644 lib/screens/patients/profile/UCAF/page-stepper-widget.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 80e9d656..cfe6c423 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -829,8 +829,13 @@ const Map> localizedValues = { "typeHereToReply": { "en": "Type here to reply", "ar": "اكتب هنا للرد" - },"remove": { + }, + "remove": { "en": "Remove", "ar": "حذف" }, + "step": { + "en": "Step", + "ar": "خطوة" + }, }; diff --git a/lib/core/service/patient-admission-request-service.dart b/lib/core/service/patient-admission-request-service.dart index 093c4066..097047cf 100644 --- a/lib/core/service/patient-admission-request-service.dart +++ b/lib/core/service/patient-admission-request-service.dart @@ -161,9 +161,12 @@ class AdmissionRequestService extends LookupService { ); } - Future getDietTypesList() async { + Future getDietTypesList(int patientMrn) async { hasError = false; + Map body = Map(); + body['patientMRN'] = patientMrn; + await baseAppClient.post( GET_DIET_TYPES, onSuccess: (dynamic response, int statusCode) { @@ -180,7 +183,7 @@ class AdmissionRequestService extends LookupService { hasError = true; super.error = error; }, - body: Map(), + body: body, ); } diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart index 787aecae..052f78b6 100644 --- a/lib/core/service/patient-doctor-referral-service.dart +++ b/lib/core/service/patient-doctor-referral-service.dart @@ -101,12 +101,14 @@ class PatientReferralService extends LookupService { ); } - Future getDoctorsList(String clinicId) async { + Future getDoctorsList(String clinicId, int branchId) async { hasError = false; DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest(); + _doctorsByClinicIdRequest.projectID = branchId; _doctorsByClinicIdRequest.clinicID = clinicId; + await baseAppClient.post( PATIENT_GET_DOCTOR_BY_CLINIC_URL, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/core/viewModel/patient-admission-request-viewmodel.dart b/lib/core/viewModel/patient-admission-request-viewmodel.dart index 44261c26..0f0b9bf0 100644 --- a/lib/core/viewModel/patient-admission-request-viewmodel.dart +++ b/lib/core/viewModel/patient-admission-request-viewmodel.dart @@ -114,9 +114,9 @@ class AdmissionRequestViewModel extends BaseViewModel{ } } - Future getDietTypes() async { + Future getDietTypes(int patientMrn) async { setState(ViewState.BusyLocal); - await _admissionRequestService.getDietTypesList(); + await _admissionRequestService.getDietTypesList(patientMrn); if (_admissionRequestService.hasError) { error = _admissionRequestService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 7458456c..f46fe463 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -82,9 +82,9 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getClinicDoctors(String clinicId) async { + Future getClinicDoctors(String clinicId, int branchId) async { setState(ViewState.BusyLocal); - await _referralPatientService.getDoctorsList(clinicId); + await _referralPatientService.getDoctorsList(clinicId, branchId); if (_referralPatientService.hasError) { error = _referralPatientService.error; setState(ViewState.ErrorLocal); diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index f4b26f6a..99948bed 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -32,6 +32,9 @@ class _UcafDetailScreenState extends State { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + final screenSize = MediaQuery.of(context).size; return BaseView( diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index d4c1b803..18939d54 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -3,9 +3,12 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -53,337 +56,385 @@ class _UCAFInputScreenState extends State { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + final screenSize = MediaQuery.of(context).size; return BaseView( onModelReady: (model) => model.getUCAFData(patient), builder: (_, model, w) => AppScaffold( baseViewModel: model, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).ucaf, body: model.patientVitalSigns != null && model.patientChiefComplaintList != null && model.patientChiefComplaintList.length > 0 - ? SingleChildScrollView( - child: Column( - children: [ - PatientHeaderWidgetNoAvatar(patient), - Container( - margin: - EdgeInsets.symmetric(vertical: 16, horizontal: 16), + ? Column( + children: [ + Expanded( + child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - CheckboxListTile( - title: AppText( - TranslationBase.of(context).inPatient, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, + // PatientHeaderWidgetNoAvatar(patient), + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).patient}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + ), + AppText( + "${TranslationBase.of(context).ucaf}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], ), - value: _inPatient, - onChanged: (newValue) { - setState(() { - _inPatient = newValue; - }); - }, - controlAffinity: ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), ), - CheckboxListTile( - title: AppText( - TranslationBase.of(context).emergencyCase, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, - ), - value: _emergencyCase, - onChanged: (newValue) { - setState(() { - _emergencyCase = newValue; - }); - }, - controlAffinity: ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), + PageStepperWidget( + stepsCount: 2, + currentStepIndex: 1, + screenSize: screenSize, ), Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .durationOfIllness, - null, - false), - enabled: true, - controller: _durationOfIllnessController, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - keyboardType: TextInputType.number, - )), - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - AppText( - "BP (H/L)", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, + margin: EdgeInsets.symmetric( + vertical: 0, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CheckboxListTile( + title: AppText( + TranslationBase.of(context).inPatient, + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.1, ), - AppText( - "${model.patientVitalSigns.bloodPressureHigher}/${model.patientVitalSigns.bloodPressureLower}", - fontSize: SizeConfig.textMultiplier * 2, - color: Colors.grey.shade800, + value: _inPatient, + onChanged: (newValue) { + setState(() { + _inPatient = newValue; + }); + }, + controlAffinity: + ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + CheckboxListTile( + title: AppText( + TranslationBase.of(context).emergencyCase, fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.1, ), - ], - ), - SizedBox( - width: 4, - ), - Expanded( - child: Row( + value: _emergencyCase, + onChanged: (newValue) { + setState(() { + _emergencyCase = newValue; + }); + }, + controlAffinity: + ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: + TranslationBase.of(context).durationOfIllness, + dropDownText: "3", + inputType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + ), + SizedBox( + height: 16, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - AppText( - "${TranslationBase.of(context).temperature}", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, + Row( + children: [ + AppText( + "BP (H/L)", + fontSize: + SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.normal, + ), + SizedBox( + width: 8, + ), + AppText( + "${model.patientVitalSigns.bloodPressureHigher}/${model.patientVitalSigns.bloodPressureLower}", + fontSize: + SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.w700, + ), + ], ), SizedBox( - width: 8, + width: 4, ), Expanded( - child: AppText( - "${model.patientVitalSigns.temperatureCelcius}(C), ${(model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32).toStringAsFixed(2)}(F)", - fontSize: SizeConfig.textMultiplier * 2, - color: Colors.grey.shade800, - fontWeight: FontWeight.normal, + child: Row( + children: [ + AppText( + "${TranslationBase.of(context).temperature}", + fontSize: + SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.normal, + ), + SizedBox( + width: 8, + ), + Expanded( + child: AppText( + "${model.patientVitalSigns.temperatureCelcius}(C), ${(model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32).toStringAsFixed(2)}(F)", + fontSize: + SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.w700, + ), + ), + ], ), ), ], ), - ), - ], - ), - SizedBox( - height: 4, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - AppText( - "${TranslationBase.of(context).pulseBeats} :", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${model.patientVitalSigns.pulseBeatPerMinute}", - fontSize: SizeConfig.textMultiplier * 2, - color: Colors.grey.shade800, - fontWeight: FontWeight.normal, - ), - ], - ), - ], - ), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context) - .chiefComplaintsAndSymptoms, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.5, - ), - SizedBox( - height: 8, - ), - AppText( - TranslationBase.of(context) - .patientFeelsPainInHisBackAndCough, - fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 2.0, - ), - SizedBox( - height: 8, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .additionalTextComplaints, - helpers.parseHtmlString(model - .patientChiefComplaintList[0] - .chiefComplaint), - false), - enabled: false, - controller: _additionalComplaintsController, - keyboardType: TextInputType.multiline, - minLines: 1, - maxLines: 20, - )), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).otherConditions, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.0, - ), - ...List.generate( - conditionsData.length, - (index) => CheckboxListTile( - title: AppText( - conditionsData[index]['name'], - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, + SizedBox( + height: 4, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).pulseBeats} :", + fontSize: + SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.normal, + ), + SizedBox( + width: 8, + ), + AppText( + "${model.patientVitalSigns.pulseBeatPerMinute}", + fontSize: + SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.w700, + ), + ], ), - value: conditionsData[index]['isChecked'], - onChanged: (newValue) { - setState(() { - conditionsData[index]['isChecked'] = - newValue; - }); - }, - controlAffinity: - ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), - )), - SizedBox( - height: 8, - ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).other, - null, - false), - enabled: true, - controller: _otherController, - keyboardType: TextInputType.text, - )), - SizedBox( - height: 8, - ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).how, - null, - false), - enabled: true, - controller: _howController, - keyboardType: TextInputType.text, - )), - SizedBox( - height: 8, - ), - Row( - children: [ - Expanded( - child: Container( + ], + ), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).chiefComplaintsAndSymptoms, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.w700, + ), + SizedBox( + height: 4, + ), + AppText( + TranslationBase.of(context) + .patientFeelsPainInHisBackAndCough, + fontFamily: 'Poppins', + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 1.8, + ), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).instruction, + dropDownText: helpers.parseHtmlString(model + .patientChiefComplaintList[0] + .chiefComplaint), + controller: _additionalComplaintsController, + inputType: TextInputType.multiline, + enabled: false, + minLines: 1, + maxLines: 20, + ), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).otherConditions, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ...List.generate( + conditionsData.length, + (index) => CheckboxListTile( + title: AppText( + conditionsData[index]['name'], + fontWeight: FontWeight.bold, + fontSize: + SizeConfig.textMultiplier * 2.1, + ), + value: conditionsData[index] + ['isChecked'], + onChanged: (newValue) { + setState(() { + conditionsData[index] + ['isChecked'] = newValue; + }); + }, + controlAffinity: + ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + )), + SizedBox( + height: 8, + ), + Container( height: screenSize.height * 0.070, child: TextField( decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).when, + TranslationBase.of(context).other, null, false), enabled: true, - controller: _whenController, + controller: _otherController, keyboardType: TextInputType.text, )), - ), - SizedBox( - width: 4, - ), - Expanded( - child: Container( + SizedBox( + height: 8, + ), + Container( height: screenSize.height * 0.070, child: TextField( decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).where, + TranslationBase.of(context).how, null, false), enabled: true, - controller: _whereController, + controller: _howController, keyboardType: TextInputType.text, )), - ), - ], - ), - SizedBox( - height: 8, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .specifyPossibleLineManagement, - null, - false), - enabled: true, - controller: _managementsLineController, - keyboardType: TextInputType.text, - minLines: 4, - maxLines: 6, - )), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).significantSigns, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.0, - ), - SizedBox( - height: 8, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).backAbdomen, - null, - false), - enabled: true, - controller: _signsController, - keyboardType: TextInputType.multiline, - minLines: null, - maxLines: null, - )), - SizedBox( - height: 16, - ), - AppButton( - title: TranslationBase.of(context).next, - color: HexColor("#B8382B"), - onPressed: () { - Navigator.of(context).pushNamed( - PATIENT_UCAF_DETAIL, - arguments: {'patient': patient}); - }, + SizedBox( + height: 8, + ), + Row( + children: [ + Expanded( + child: Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers + .textFieldSelectorDecoration( + TranslationBase.of(context) + .when, + null, + false), + enabled: true, + controller: _whenController, + keyboardType: TextInputType.text, + )), + ), + SizedBox( + width: 4, + ), + Expanded( + child: Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers + .textFieldSelectorDecoration( + TranslationBase.of(context) + .where, + null, + false), + enabled: true, + controller: _whereController, + keyboardType: TextInputType.text, + )), + ), + ], + ), + SizedBox( + height: 8, + ), + Container( + child: TextField( + decoration: + Helpers.textFieldSelectorDecoration( + TranslationBase.of(context) + .specifyPossibleLineManagement, + null, + false), + enabled: true, + controller: _managementsLineController, + keyboardType: TextInputType.text, + minLines: 4, + maxLines: 6, + )), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).significantSigns, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + SizedBox( + height: 8, + ), + Container( + child: TextField( + decoration: + Helpers.textFieldSelectorDecoration( + TranslationBase.of(context) + .backAbdomen, + null, + false), + enabled: true, + controller: _signsController, + keyboardType: TextInputType.multiline, + minLines: null, + maxLines: null, + )), + ], + ), ), ], ), ), - ], - ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: AppButton( + title: TranslationBase.of(context).next, + color: HexColor("#D02127"), + onPressed: () { + Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, + arguments: {'patient': patient}); + }, + ), + ), + ], ) : Container( child: Center( diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart new file mode 100644 index 00000000..5e93f141 --- /dev/null +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -0,0 +1,145 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class PageStepperWidget extends StatelessWidget { + final int stepsCount; + final int currentStepIndex; + final Size screenSize; + + PageStepperWidget({this.stepsCount, this.currentStepIndex, this.screenSize}); + + @override + Widget build(BuildContext context) { + double dividerWidth = (screenSize.width / stepsCount) - (10 * stepsCount); + + return Container( + margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + for (int i = 1; i <= stepsCount; i++) + if (i == currentStepIndex) + StepWidget(i, true, i == stepsCount, i < currentStepIndex, + dividerWidth) + else + StepWidget(i, false, i == stepsCount, i < currentStepIndex, + dividerWidth) + ], + ) + ], + ), + ); + } +} + +class StepWidget extends StatelessWidget { + final int index; + final bool isInProgress; + final bool isFinalStep; + final bool isStepFinish; + final double dividerWidth; + + StepWidget(this.index, this.isInProgress, this.isFinalStep, this.isStepFinish, + this.dividerWidth); + + @override + Widget build(BuildContext context) { + StepStatus status; + if (isInProgress) { + status = StepStatus.InProgress; + } else { + if(isStepFinish){ + status = StepStatus.Completed; + }else { + status = StepStatus.Locked; + } + } + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + padding: EdgeInsets.all(0.0), + margin: EdgeInsets.symmetric(horizontal: 1), + width: 25, + height: 25, + decoration: BoxDecoration( + color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), + shape: BoxShape.circle, + border: Border.all( + color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), + width: 1), + ), + child: Center( + child: Icon( + Icons.check, + size: 20, + color: status == StepStatus.InProgress ? Colors.white : status == StepStatus.Locked ? Colors.grey.shade800 : Color(0xFF359846), + )), + ), + if (!isFinalStep) + Container( + width: dividerWidth, + height: 2, + color: Colors.grey, + ), + ], + ), + SizedBox( + height: 8, + ), + AppText( + "${TranslationBase.of(context).step} $index", + fontWeight: FontWeight.bold, + color: status == StepStatus.InProgress ? Colors.black : status == StepStatus.Locked ? Colors.grey : Color(0xFF359846), + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + ), + Container( + margin: EdgeInsets.symmetric(vertical: 4), + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), + decoration: BoxDecoration( + color: status == StepStatus.InProgress + ? Color(0xFFF1E9D3) + : status == StepStatus.Locked + ? Color(0xFFD8E8DB) + : Color(0xFFCCCCCC), + borderRadius: BorderRadius.all( + Radius.circular(8.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0.30), + ), + child: AppText( + status == StepStatus.InProgress + ? "inProgress" + : status == StepStatus.Locked + ? "Locked" + : "Completed", + fontWeight: FontWeight.bold, + textAlign: TextAlign.center, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.4, + color: status == StepStatus.InProgress + ? Color(0xFFCC9B14) + : status == StepStatus.Locked + ? Color(0xFF969696) + : Color(0xFF359846), + ), + ) + ], + ); + } +} + +enum StepStatus { + InProgress, + Locked, + Completed, +} \ No newline at end of file diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index 3fa16be2..8095d04a 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; @@ -55,7 +56,9 @@ class _AdmissionRequestThirdScreenState return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { @@ -72,9 +75,8 @@ class _AdmissionRequestThirdScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // PatientPageHeaderWidget(patient), - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), + // PatientProfileHeaderNewDesign( + // patient, patientType, arrivalType), Container( margin: EdgeInsets.all(16.0), child: Column( @@ -220,23 +222,24 @@ class _AdmissionRequestThirdScreenState SizedBox( height: 10, ), - CheckboxListTile( - title: AppText( - TranslationBase.of(context).patientPregnant, - fontWeight: FontWeight.normal, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 2.0, + if(patient.gender != 1) + CheckboxListTile( + title: AppText( + TranslationBase.of(context).patientPregnant, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.0, + ), + value: _patientPregnant, + activeColor: HexColor("#D02127"), + onChanged: (newValue) { + setState(() { + _patientPregnant = newValue; + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), ), - value: _patientPregnant, - activeColor: HexColor("#D02127"), - onChanged: (newValue) { - setState(() { - _patientPregnant = newValue; - }); - }, - controlAffinity: ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), - ), CheckboxListTile( title: AppText( TranslationBase.of(context).isSickLeaveRequired, @@ -287,7 +290,7 @@ class _AdmissionRequestThirdScreenState : () async { GifLoaderDialogUtils.showMyDialog( context); - await model.getDietTypes().then((_) => + await model.getDietTypes(patient.patientId).then((_) => GifLoaderDialogUtils.hideDialog( context)); if (model.state == ViewState.Idle && diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index b5cf732a..a48a7c45 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; @@ -51,7 +52,9 @@ class _AdmissionRequestThirdScreenState return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { @@ -67,8 +70,6 @@ class _AdmissionRequestThirdScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), Container( margin: EdgeInsets.all(16.0), child: Column( diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 987f5f43..2dcfbbf9 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; @@ -63,7 +64,9 @@ class _AdmissionRequestSecondScreenState return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { @@ -79,8 +82,8 @@ class _AdmissionRequestSecondScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), + // PatientProfileHeaderNewDesign( + // patient, patientType, arrivalType), Container( margin: EdgeInsets.all(16.0), child: Column( diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 43c1382e..2619b200 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -303,7 +303,7 @@ class _PatientMakeReferralScreenState extends State { GifLoaderDialogUtils.showMyDialog(context); await model .getClinicDoctors( - _selectedClinic['ClinicID'].toString()) + _selectedClinic['ClinicID'].toString(), _selectedBranch['facilityId']) .then((_) => GifLoaderDialogUtils.hideDialog(context)); if (model.state == ViewState.ErrorLocal) { diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6eba28fc..fab7f3b3 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1207,6 +1207,7 @@ class TranslationBase { String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode]; String get searchHere => localizedValues['searchHere'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode]; + String get step => localizedValues['step'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 3ac6888e..bfe8fcad 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -15,9 +15,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget final PatiantInformtion patient; final String patientType; final String arrivalType; + final double height; PatientProfileHeaderNewDesignAppBar( - this.patient, this.patientType, this.arrivalType); + this.patient, this.patientType, this.arrivalType, {this.height = 0.0}); @override Widget build(BuildContext context) { @@ -36,7 +37,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget decoration: BoxDecoration( color: Colors.white, ), - height: 200, + height: height == 0 ? 200 : height, child: Container( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), margin: EdgeInsets.only(top: 50), diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 512e6d49..8dc2a8c0 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -151,7 +151,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { arrivalType: arrivalType, route: REFER_PATIENT_TO_DOCTOR, isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).myReferral, + nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, icon: 'patient/refer_patient.png'), if (int.parse(patientType) == 7 || int.parse(patientType) == 6) From 8654109500c60069eab4ec70e6e04bdef39ad25e Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 8 Apr 2021 20:20:11 +0300 Subject: [PATCH 13/14] login design updated --- assets/images/verification_faceid_lg_icon.png | Bin 1913 -> 0 bytes .../verification_fingerprint_lg_icon.png | Bin 6254 -> 0 bytes assets/images/verification_sms_lg_icon.png | Bin 3183 -> 0 bytes .../images/verification_whatsapp_lg_icon.png | Bin 2881 -> 0 bytes assets/images/verify-face.png | Bin 0 -> 1072 bytes assets/images/verify-finger.png | Bin 0 -> 1487 bytes assets/images/verify-sms.png | Bin 0 -> 579 bytes assets/images/verify-whtsapp.png | Bin 0 -> 1264 bytes lib/config/config.dart | 4 +- lib/config/localized_values.dart | 35 +- lib/icons_app/config.json | 58 +++- lib/icons_app/doctor_app_icons.dart | 20 +- lib/screens/auth/login_screen.dart | 5 + .../auth/verification_methods_screen.dart | 8 +- .../add-rescheduleleave.dart | 13 +- lib/screens/sick-leave/add-sickleave.dart | 16 +- lib/util/translations_delegate_base.dart | 12 +- lib/widgets/auth/auth_header.dart | 47 +-- lib/widgets/auth/login_form.dart | 315 ++++++++++++------ lib/widgets/auth/verification_methods.dart | 297 +++++++++++------ lib/widgets/otp/sms-popup.dart | 52 ++- lib/widgets/shared/app_scaffold_widget.dart | 16 +- 22 files changed, 606 insertions(+), 292 deletions(-) delete mode 100644 assets/images/verification_faceid_lg_icon.png delete mode 100644 assets/images/verification_fingerprint_lg_icon.png delete mode 100644 assets/images/verification_sms_lg_icon.png delete mode 100644 assets/images/verification_whatsapp_lg_icon.png create mode 100644 assets/images/verify-face.png create mode 100644 assets/images/verify-finger.png create mode 100644 assets/images/verify-sms.png create mode 100644 assets/images/verify-whtsapp.png diff --git a/assets/images/verification_faceid_lg_icon.png b/assets/images/verification_faceid_lg_icon.png deleted file mode 100644 index dc20691142d1a5cc6a039956292bacff26fd2888..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1913 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 Is(Z|T0JTl&ZvX%Q diff --git a/assets/images/verification_whatsapp_lg_icon.png b/assets/images/verification_whatsapp_lg_icon.png deleted file mode 100644 index 115a2e6d3571c7ed339a428a853ba0e4fb369697..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2881 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 diff --git a/assets/images/verify-face.png b/assets/images/verify-face.png new file mode 100644 index 0000000000000000000000000000000000000000..58e1f4a6a7f08372d7167a5eacf15a39f978e1da GIT binary patch literal 1072 zcmeAS@N?(olHy`uVBq!ia0vp^>OicU#( z+A1oZGM1J=wvw^2fq{dru8p>(rG}ZAnz4hjo|T%urHY=pj;Wotv5mT(otmkQrh&P- ziM5)srK*vIwxO-2iIs-2rMi*1wtV}q@hSr+K)<7;8S*jZX*+5-Znnspj5~vqsvIbBMTp7?zW2gcRW1u+X7(#4b%im0X2e@0TJ9%7z5}SkU0=8&|wf|NQ$8v!R~<>4z?6Y zr6I^)VDlj)$ftPF|NsAubLJWWpipS^zj{==uwU%r0( z{^RGb-+%wjUMsQ&=orQ%Z+Dlb?#=&Qfb0{VE{-7@IdZC*3qPWJAH%PvR3{0Tsir5@qh8@r@t7t~7tr7+2VLB=h)--8C;&wkv#d$&Pii(anku z5q(zlFpKxOL(R=dp9wE{b-#Jsb7FTnmt-MqxSogMw@MMS#5&I_#|pfU6l-0S=`7%% zGiUaNPe-CODiki(+FkKfDKeNdJxq0ecUJ8q%e4}flINPglpH9yz3YzJVc(0Z%IuR5 zoa41rlU&zXVQL_9bWMQoIkz@%&ZPCS2YxwjTBz9IC&M!7Ci~0-%R=}AtRC08->_xO0$zRH=s=%-!gJhsiRSe^bc*L(CX zcbt3q-i+4?M^%C;kt5q!jeSc(1+az{nPS4N(r{x^|dNY)=Y{BpCZmJ7Uy2v@*KhNb`%A)GkKm!DkWk7b!td*7tPv Kb6Mw<&;$UPVTFDG literal 0 HcmV?d00001 diff --git a/assets/images/verify-finger.png b/assets/images/verify-finger.png new file mode 100644 index 0000000000000000000000000000000000000000..15d60b03926d5184d0c6208e5f61ecedf1525adc GIT binary patch literal 1487 zcmeAS@N?(olHy`uVBq!ia0vp^>OicfqpDY;3Hp zt*xTsso>xsV`&NG>gnleYdff0TdSCxD;XQ>>e^^qT56b?sTn&c>sjfTn`@hzY8uXad=WmKr8D>c-aUMpl}J78=G@>OiARtTl~6 zT7cGR8e3`_S!x(r12w7x5y(KGN}vdkYpDrRU=3u0ktI;Qy0H~lFIYX$G_ZC}pmv}* zNTU_dNg815fTjTr2eQFNfoudS0GVS5wgP6U2GBhqL7+yUEXXB52Y^VRc9?pIfiNz_ zE)WTFDo7VZBZvXk1@;cq9EdDfCCC=IUqD(wu7y|uCV^f9g#(xkwF^lWWH^uuwGN^Y z6bMigzznd)Bnp;}iI=i}i`X)@AGU%PSp?)?W3A3c8Z^x5+l zuim_U_x{7D&tJZN`~KtSuitE7H6Q!H=ee-wu z=k4dNy{z1~@O%FAn)vgT^Uhm7|GX?ooZ-MM&pkOCm>6P?pKQ4~rFd?f&0A$-mSYmx z-H&(eC_5%0oS)G5(u$ z&g(S>92Xren=%xYTxm0u2O15#R5eo zrJo1Szlfdnt^4`6wK8QHnp^kPANm)xK4{B=xm6YKX6G6yZ>nOe>t^1N5^T$6^T)DC zdH2V?6_yu|RX06v`16vf*k+OTj|l=3uSYCh=zQ;F$kyra%U11u?AiIA@rQl@tK6m7 zb(>GGF6^tiII}oM#(mK-rYzm-hE;8*))$n$drvsp-*uVTWbLla%aT&{M16<$2{o5_ zheCfHEY>v(-i)qQYsQ# zFmJkXbjH5l*<#OuQU5w(fx5Mm?a%#twZH9Xz5jUTLb?CUUBb*?6doMv02Rxgu6{1- HoD!MOicQO-(h8 zZPg8}HS}#%jV!bcZMF2RHH>VujBPXwEH#WQ)s4WUv89HgrG~M!x{;Npp|z$lP>mHx z7O2t4TEoyv6C@54u~rANfr^2$#vnnU6p#T_36cV;0qFuM(*S9NibDmBfp$R@L&PB} z5#;~>|5rq{UIIGZrXWPi<>6Fuq4 zBF^~V+>@5rHa`rX9#=lKey(z&n$jnM%2*R&!ILu-61#kBb1uG>Sv`O2;zhS>7p~vl z+$4Qze%ZMKPKI4aBpE7}JD%?|-_`kcmpbd+sQTB(J__FK_djv@huVX6f$G*4D$xOq z=E1R_{Jx%Sl=^%4d*1!C+PgAMzwdZn=)ZPHz~XPbdY69RvAur!U2anK>i_%ZBziu6 z=fN&<>FVCQY&UkTUO4OU``tb+F4NyEDYK3&E&nWA|Mh*v<+nf76RM{=NZ+xY1N1tB Mr>mdKI;Vst03>79(EtDd literal 0 HcmV?d00001 diff --git a/assets/images/verify-whtsapp.png b/assets/images/verify-whtsapp.png new file mode 100644 index 0000000000000000000000000000000000000000..9a79516caf53013b4e5c9437db7be0223b6230ad GIT binary patch literal 1264 zcmYjPX;70_6io~uM4-4pRcwoCl!Pw{Bmsp0Hp!O^Nrf0Tp@5Eou*eW9h}I56hjlb9 zWfQfEb_9_vh%AzYH5n3>rAS#?5GbWch`1Ch5U?zLfwtq!d*|KdoO|AnE9UdOEYN$= z2n51{%VGI}*B;!1rYL}C_9vDg5L@=}y#v@F4Xg^J_E4d!K&+H&*G{K4_&@-gSx)!q z#0MUbn;Rte!nMF;sVCG(cWhwd8<_+t6W_#kY=nsl`T>e7MD`>p=mZ%I$r%n(7NL<2 z$zYNcAd4tv5M(S!$|TBJkc>f;GaxBUlz|k~VSk#le!u{2e$2BpbkKzQK319Yplhl`f zzAr0%F!$0gh1tVDxYM(uL%d^o&cn`S}Hx3$K;jDJ`w2s;;?TS1*+* znwym>wdQeW&%oID#2-^Ly5}!m|M}*x`Gv(r{nFC%yOq_|HQ)5&ufPwG;YYn#_4i_* z=)lgRxGYA1Yj;FnCkd5iL^g?|dmsr#_kOZEX@YzhJanBN*|8hb^=(F~GRsy%ix0{Z zCVXMUKS4t6&%0QeADM$O5>{E?=RdF3SRXOFNs9oBGq;OX9^b6uQSp&hf;_OR$isJM)W;@> localizedValues = { 'description': {'en': 'Description', 'ar': 'الوصف'}, 'value': {'en': 'Value', 'ar': 'القيمة'}, 'range': {'en': 'Range', 'ar': 'النطاق'}, - 'enterId': {'en': 'Enter ID', 'ar': 'الهوية'}, + 'enterId': {'en': 'User ID', 'ar': 'معرف المستخدم'}, 'pleaseEnterYourID': { 'en': 'Please enter your ID', 'ar': 'الرجاء ادخال الهوية' }, - 'enterPassword': {'en': 'Enter Password', 'ar': 'الرقم السري'}, + 'enterPassword': {'en': 'Password', 'ar': 'كلمه السر'}, 'pleaseEnterPassword': { 'en': 'Please Enter Password', 'ar': 'الرجاء ادخال الرقم السري' }, - 'selectYourProject': {'en': 'Select Your Project', 'ar': 'اختر المستشفى'}, + 'selectYourProject': {'en': 'Branch', 'ar': 'فرع'}, 'pleaseEnterYourProject': { 'en': 'Please Enter Your Project', 'ar': 'الرجاء ادخال مستشفى' }, - 'login': {'en': 'LOGIN', 'ar': 'تسجيل دخول'}, + 'login': {'en': 'Login', 'ar': 'تسجيل دخول'}, 'drSulaimanAlHabib': {'en': 'Dr Sulaiman Al Habib', 'ar': 'د.سليمان الحبيب'}, 'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'}, 'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '}, @@ -306,6 +306,7 @@ const Map> localizedValues = { 'en': "No sick leave available, apply Now", 'ar': 'لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن' }, + 'no-sickleve': {'en': "No sick leave available", 'ar': 'لا توجد إجازة مرضية'}, 'applynow': {'en': "Apply Now", 'ar': 'قدم الآن'}, 'add-sickleave': {'en': "ADD SICK LEAVE", 'ar': 'أضف إجازة مرضية'}, 'add': {'en': "Add", 'ar': 'أضف'}, @@ -572,11 +573,14 @@ const Map> localizedValues = { "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات" }, "register-user": {"en": "Register", "ar": "تسجيل"}, - "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, - "verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"}, - "verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"}, - "verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"}, - "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, + "verify-with-fingerprint": {"en": "Verify through Fingerprint", "ar": "بصمة"}, + "verify-with-faceid": {"en": "Verify through Face ID", "ar": "معرف الوجه"}, + "verify-with-sms": {"en": "Verify through SMS", "ar": "الرسائل القصيرة"}, + "verify-with-whatsapp": {"en": "Verify through WhatsApp", "ar": " الواتس اب"}, + "last-login": { + "en": "Last login details:", + "ar": "تفاصيل تسجيل الدخول الأخير:" + }, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "verify-fingerprint": { "en": @@ -826,11 +830,12 @@ const Map> localizedValues = { "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"}, "searchHere": {"en": "Search here", "ar": "إبحث هنا"}, "replied": {"en": "Replied", "ar": " تم الرد"}, - "typeHereToReply": { - "en": "Type here to reply", - "ar": "اكتب هنا للرد" - },"remove": { - "en": "Remove", - "ar": "حذف" + "typeHereToReply": {"en": "Type here to reply", "ar": "اكتب هنا للرد"}, + "remove": {"en": "Remove", "ar": "حذف"}, + "changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"}, + "newSchedule": {"en": "New Schedule", "ar": "جدول جديد"}, + "enter_credentials": { + "en": "Enter the user credentials below", + "ar": "أدخل بيانات اعتماد المستخدم أدناه" }, }; diff --git a/lib/icons_app/config.json b/lib/icons_app/config.json index dfd00326..e9aaeffa 100644 --- a/lib/icons_app/config.json +++ b/lib/icons_app/config.json @@ -2299,7 +2299,63 @@ "search": [ "obese-bmi-r" ] - } + }, + { + "uid": "3375043683ed20c80d3307cef405e3ff", + "css": "verify-face", + "code": 59395, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710ZM507.5 144.9A350.9 350.9 0 1 0 858.4 495.8 350.9 350.9 0 0 0 507.5 144.9ZM637 378.9A50.3 50.3 0 1 1 586.7 429.2 50.3 50.3 0 0 1 637 378.9ZM378 378.9A50.3 50.3 0 1 1 327.7 429.2 50.3 50.3 0 0 1 378 378.9ZM696.8 617.8A229.7 229.7 0 0 1 318.1 617.8 30.7 30.7 0 1 1 368.8 582.9 168.3 168.3 0 0 0 646.3 582.9 30.7 30.7 0 1 1 696.8 617.8Z", + "width": 1015 + }, + "search": [ + "verify-face" + ] + }, + { + "uid": "49b31d628bdc0d2127dc489c84c7101b", + "css": "verify-finger", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M792.5 147.2H237.8A76.6 76.6 0 0 0 161.3 223.7V778.4A76.6 76.6 0 0 0 237.8 854.9H792.5A76.6 76.6 0 0 0 869.1 778.4V223.7A76.6 76.6 0 0 0 792.5 147.2ZM292.8 283.5C439.9 176.7 595 177.8 739.9 285.4A20.8 20.8 0 0 1 727.6 322.8C704.1 322.8 543.8 152.4 317.1 317.1A20.7 20.7 0 0 1 292.8 283.5ZM486.1 816.8A20.7 20.7 0 0 1 457.2 811.5C428 769.3 361.6 722.1 361.6 633.8A159.5 159.5 0 0 1 515.1 469.3 159.5 159.5 0 0 1 668.7 633.8V655.9A20.7 20.7 0 0 1 627.2 655.9V633.8A118 118 0 0 0 515.2 510.7 118 118 0 0 0 403.3 633.8C403.3 733.7 530.5 786.1 486.2 816.8ZM743.8 709.5A108.7 108.7 0 0 1 538.7 656C538.7 566.5 477.5 596.6 491.1 650.9A20.7 20.7 0 0 1 450.8 661C422.6 548 580.2 502.2 580.2 656A66.9 66.9 0 0 0 632.1 725C728.1 747.7 756.6 589.3 660.8 487.4 528.5 346.3 314.7 455.1 314.7 622.8A167.7 167.7 0 0 0 344.1 732.4 20.7 20.7 0 0 1 310.4 756.5 211.3 211.3 0 0 1 273.3 622.8 245.9 245.9 0 0 1 515.3 380.8C694.1 380.8 807.9 581.4 744.1 709.6ZM757.7 452.8A20.7 20.7 0 0 1 729.4 445.1C688.2 372.8 588.3 333.9 515.3 333.9A296.7 296.7 0 0 0 300.3 446.4 20.7 20.7 0 0 1 265.8 423.4 336.1 336.1 0 0 1 515.3 292.5C668.9 292.5 806 425.3 757.8 452.9ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-finger" + ] + }, + { + "uid": "f57a7cc9bc5e75095215adfc141a8b17", + "css": "verify-whtsapp", + "code": 59393, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M132.6 857.5L196.3 666.3A364.2 364.2 0 1 1 340.1 802.9ZM742 601.7C725.1 569.9 663.1 533.6 663.1 533.6 649 525.7 632.1 524.7 624.1 538.8A321.2 321.2 0 0 1 598.8 566.5 47.1 47.1 0 0 1 531.8 559.8L481 508.9 430.1 458A47.1 47.1 0 0 1 423.5 391.3 321.3 321.3 0 0 1 451.1 366C465.4 358.1 464.5 341.1 456.4 327.1 456.4 327.1 420 265 388.2 248.2A34.8 34.8 0 0 0 347.3 254.3L324.8 276.8C253.6 348 288.6 428.5 359.9 499.8L425.3 564.9 490.5 630C561.7 701.3 642.2 736.4 713.5 665.1L735.9 642.6A34.9 34.9 0 0 0 742 601.7ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.3A36.2 36.2 0 1 0 0 746.3V963.8A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.3V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-whtsapp" + ] + }, + { + "uid": "89f9e9928bf0aa0ec55c15055f8ce27a", + "css": "verify-sms", + "code": 59392, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M766.3 175.1H252.2A64.5 64.5 0 0 0 187.9 239.4V817.7L316.4 689.2H766.1A64.5 64.5 0 0 0 830.5 624.8V239.4A64.5 64.5 0 0 0 766.3 175.1ZM412.8 464.4H348.5V400H412.8ZM541.3 464.4H477.2V400H541.3ZM669.8 464.4H605.6V400H669.9ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-sms" + ] + } ] } } \ No newline at end of file diff --git a/lib/icons_app/doctor_app_icons.dart b/lib/icons_app/doctor_app_icons.dart index 00b4d547..a3a0238c 100644 --- a/lib/icons_app/doctor_app_icons.dart +++ b/lib/icons_app/doctor_app_icons.dart @@ -202,14 +202,14 @@ class DoctorApp { IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData external_link = IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_face = - IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_sms = - IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData verify_face = + // IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData verify_sms = + // IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home = IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_finger = - IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData verify_finger = + // IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData dr_reply_active = IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData dr_reply = @@ -350,4 +350,12 @@ class DoctorApp { IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home_active_1 = IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms = + IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_whtsapp = + IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger = + IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face = + IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 84121abf..957dcc66 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -101,6 +102,7 @@ class _LoginsreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, + backgroundColor: HexColor('#F8F8F8'), body: SafeArea( child: (_isLoading == false) ? ListView(children: [ @@ -116,6 +118,9 @@ class _LoginsreenState extends State { CrossAxisAlignment.start, children: [ AuthHeader(loginType.knownUser), + SizedBox( + height: 60, + ), LoginForm( changeLoadingStata: changeLoadingStata, ), diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 0045f032..40fe4bd6 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../lookups/auth_lookup.dart'; import '../../widgets/auth/auth_header.dart'; @@ -43,13 +44,18 @@ class _VerificationMethodsScreenState extends State { return AppScaffold( isLoading: _isLoading, isShowAppBar: false, + isHomeIcon: false, + backgroundColor: HexColor('#F8F8F8'), body: ListView(children: [ Container( margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AuthHeader(loginType.verificationMethods), + // AuthHeader(loginType.verificationMethods), + SizedBox( + height: 50, + ), VerificationMethods( password: widget.password, changeLoadingStata: changeLoadingStata, diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index 8981f374..41f7c6aa 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -155,9 +155,16 @@ class AddRescheduleLeavScreen extends StatelessWidget { item.requisitionType == 1 ? TranslationBase.of(context) .offTime - : TranslationBase.of(context) - .holiday + - ' ', + : item.requisitionType == 2 + ? TranslationBase.of(context) + .holiday + : item.requisitionType == 3 + ? TranslationBase.of( + context) + .changeOfSchedule + : TranslationBase.of( + context) + .newSchedule, fontWeight: FontWeight.bold, )), SizedBox( diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 1c7199fa..ba90cf6e 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -233,7 +233,21 @@ class AddSickLeavScreen extends StatelessWidget { )); }).toList(), ) - : SizedBox() + : patient.patientStatusType != 43 + ? Container( + height: 200, + width: SizeConfig.screenWidth, + color: Colors.white, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText( + TranslationBase.of(context).noSickLeave, + color: Colors.red, + ) + ]), + ) + : SizedBox() // : new Builder(builder: (context) { // return Column( // crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6eba28fc..6fa147f0 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -661,7 +661,8 @@ class TranslationBase { String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; - String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode]; + String get bmiObeseExtreme => + localizedValues['bmiObeseExtreme'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode]; @@ -1204,9 +1205,16 @@ class TranslationBase { String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get unReplied => localizedValues['unReplied'][locale.languageCode]; String get replied => localizedValues['replied'][locale.languageCode]; - String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode]; + String get typeHereToReply => + localizedValues['typeHereToReply'][locale.languageCode]; String get searchHere => localizedValues['searchHere'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode]; + String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; + String get changeOfSchedule => + localizedValues['changeOfSchedule'][locale.languageCode]; + String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; + String get enterCredentials => + localizedValues['enter_credentials'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index 8ab79b5c..364cfc85 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -23,18 +24,18 @@ class AuthHeader extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - margin: SizeConfig.isMobile - ? EdgeInsetsDirectional.fromSTEB( - 0, SizeConfig.realScreenHeight * 0.03, 0, 0) - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.realScreenWidth * 0.13, 0, 0, 0), - child: buildImageLogo(), - ), + // Container( + // margin: SizeConfig.isMobile + // ? EdgeInsetsDirectional.fromSTEB( + // 0, SizeConfig.realScreenHeight * 0.03, 0, 0) + // : EdgeInsetsDirectional.fromSTEB( + // SizeConfig.realScreenWidth * 0.13, 0, 0, 0), + // child: buildImageLogo(), + // ), SizedBox( - height: 10, + height: 30, ), - buildTextUnderLogo(context), + //buildTextUnderLogo(context), ], ), Column( @@ -146,15 +147,15 @@ class AuthHeader extends StatelessWidget { return Container(); } return Container( - margin: SizeConfig.isMobile - ? null - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.realScreenWidth * 0.13, 0, 0, 0), + // margin: SizeConfig.isMobile + // ? null + // : EdgeInsetsDirectional.fromSTEB( + // SizeConfig.realScreenWidth * 0.13, 0, 0, 0), child: Text( "Doctor App", style: TextStyle( fontSize: - SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030, + SizeConfig.isMobile ? 16 : SizeConfig.realScreenWidth * 0.030, fontWeight: FontWeight.w800, color: HexColor('#B8382C')), ), @@ -170,10 +171,10 @@ class AuthHeader extends StatelessWidget { return Text( TranslationBase.of(context).drSulaimanAlHabib, style: TextStyle( - fontWeight: FontWeight.w800, - fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, - color: HexColor('#B8382C'), - ), + fontWeight: FontWeight.w800, + fontSize: + SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, + fontFamily: 'Poppins'), ); } @@ -187,11 +188,11 @@ class AuthHeader extends StatelessWidget { userType == loginType.verificationMethods) { return Text(''); } - return Text( + return AppText( text, - style: TextStyle( - fontSize: - SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029), + // style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, ); } } diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index c52e9a77..c59c01d9 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -1,6 +1,9 @@ import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -72,119 +75,212 @@ class _LoginFormState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ buildSizedBox(), - TextFormField( - keyboardType: TextInputType.number, - textInputAction: TextInputAction.next, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).enterId, - 'assets/images/user_id_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context).pleaseEnterYourID; - } - return null; - }, - onSaved: (value) { - userInfo.userID = value.trim(); - }, - onChanged: (value) { - userInfo.userID = value.trim(); - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - }, - onEditingComplete: () {}, - autofocus: false, - ), + Padding( + child: AppText( + TranslationBase.of(context).enterCredentials, + fontSize: 18, + fontWeight: FontWeight.w600, + ), + padding: EdgeInsets.only(top: 10, bottom: 10)), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterId, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + labelText: '', + borderColor: Colors.white, + // keyboardType: TextInputType.number, + textInputAction: TextInputAction.next, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).enterId, + // 'assets/images/user_id_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourID; + } + return null; + }, + onSaved: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onChanged: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + }, + // onEditingComplete: () {}, + // autofocus: false, + ) + ])), buildSizedBox(), - TextFormField( - focusNode: focusPass, - obscureText: true, - textInputAction: TextInputAction.next, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).enterPassword, - 'assets/images/password_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context).pleaseEnterPassword; - } - return null; - }, - onSaved: (value) { - userInfo.password = value; - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - helpers.showCupertinoPicker( - context, projectsList, 'facilityName', onSelectProject); - }, - onTap: () { - this.getProjects(userInfo.userID); - }, - ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterPassword, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + focusNode: focusPass, + obscureText: true, + borderColor: Colors.white, + textInputAction: TextInputAction.next, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).enterPassword, + // 'assets/images/password_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterPassword; + } + return null; + }, + onSaved: (value) { + userInfo.password = value; + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + helpers.showCupertinoPicker(context, projectsList, + 'facilityName', onSelectProject); + }, + onTap: () { + this.getProjects(userInfo.userID); + }, + ) + ])), buildSizedBox(), projectsList.length > 0 - ? TextFormField( - focusNode: focusProject, - controller: projectIdController, - onTap: () { - helpers.showCupertinoPicker(context, projectsList, - 'facilityName', onSelectProject); - }, - showCursor: false, - //readOnly: true, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).selectYourProject, - 'assets/images/password_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context) - .pleaseEnterYourProject; - } - return null; - }) - : TextFormField( - readOnly: true, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).pleaseEnterYourProject, - 'assets/images/password_icon.png')), + ? Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + focusNode: focusProject, + controller: projectIdController, + borderColor: Colors.white, + onTap: () { + helpers.showCupertinoPicker( + context, + projectsList, + 'facilityName', + onSelectProject); + }, + // showCursor: false, + // //readOnly: true, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).selectYourProject, + // 'assets/images/password_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourProject; + } + return null; + }) + ])) + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + readOnly: true, borderColor: Colors.white + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context) + // .pleaseEnterYourProject, + // 'assets/images/password_icon.png') + + ) + ])), buildSizedBox(), + Row( - mainAxisAlignment: MainAxisAlignment.end, children: [ - RaisedButton( - onPressed: () { + Expanded( + child: Button( + title: TranslationBase.of(context).login, + color: Colors.red[700], + onTap: () { login(context, authProv, widget.changeLoadingStata); }, - textColor: Colors.white, - elevation: 0.0, - padding: const EdgeInsets.all(0.0), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), - child: Container( - padding: const EdgeInsets.all(10.0), - height: 50, - width: SizeConfig.realScreenWidth * 0.35, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(TranslationBase.of(context).login, - style: TextStyle( - fontSize: SizeConfig.isMobilePortrait - ? 2.3 * SizeConfig.textMultiplier - : 2.3 * SizeConfig.textMultiplier)), - Image.asset('assets/images/login_btn_arrow_icon.png') - ], - ), - ), - ) + )), ], - ), + ) + // Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // RaisedButton( + // onPressed: () { + // login(context, authProv, widget.changeLoadingStata); + // }, + // textColor: Colors.white, + // elevation: 0.0, + // padding: const EdgeInsets.all(0.0), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10), + // side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), + // child: Container( + // padding: const EdgeInsets.all(10.0), + // height: 50, + // width: SizeConfig.realScreenWidth * 0.35, + // child: ), + // ) + // ], + // ), ], ), ), @@ -200,23 +296,24 @@ class _LoginFormState extends State { */ InputDecoration buildInputDecoration(BuildContext context, hint, asset) { return InputDecoration( - prefixIcon: Image.asset(asset), + // prefixIcon: Image.asset(asset), hintText: hint, hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), + fillColor: Colors.white, enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), + //borderRadius: BorderRadius.all(Radius.circular(20)), borderSide: BorderSide(color: HexColor('#CCCCCC')), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + // borderRadius: BorderRadius.all(Radius.circular(10.0)), borderSide: BorderSide(color: Theme.of(context).primaryColor), ), errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + // borderRadius: BorderRadius.all(Radius.circular(10.0)), borderSide: BorderSide(color: Theme.of(context).errorColor), ), focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + // borderRadius: BorderRadius.all(Radius.circular(10.0)), borderSide: BorderSide(color: Theme.of(context).errorColor), ), ); diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 5e8d7674..cbd2e730 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -114,13 +114,13 @@ class _VerificationMethodsState extends State { } else { return SingleChildScrollView( child: Container( - height: SizeConfig.realScreenHeight, + height: SizeConfig.realScreenHeight * .9, width: SizeConfig.realScreenWidth, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - // height: SizeConfig.realScreenHeight * 0.6, child: Column( children: [ user != null && isMoreOption == false @@ -130,13 +130,13 @@ class _VerificationMethodsState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ + AppText(TranslationBase.of(context) + .welcomeBack), AppText( - TranslationBase.of(context) - .welcomeBack + - ' ' + - user.doctorName, + Helpers.capitalize(user.doctorName), fontSize: SizeConfig.textMultiplier * 3.5, + fontWeight: FontWeight.bold, ), SizedBox( height: 20, @@ -145,55 +145,86 @@ class _VerificationMethodsState extends State { TranslationBase.of(context).accountInfo, fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.w600, ), SizedBox( height: 20, ), Card( - color: Colors.grey[300], + color: Colors.white, child: Row( children: [ Flexible( + flex: 4, child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginAt, - textAlign: TextAlign.center, - overflow: - TextOverflow.ellipsis, - ), - subtitle: Text( - user.editedOn != null - ? formatDate(Helpers - .convertStringToDate( - user.editedOn)) - : user.createdOn != null - ? formatDate(Helpers - .convertStringToDate(user - .createdOn)) - : '--', - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - )), + title: Text( + TranslationBase.of( + context) + .lastLoginAt, + overflow: TextOverflow + .ellipsis, + style: TextStyle( + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600, + ), + ), + subtitle: AppText( + getType( + user.logInTypeID, + context), + ) + // Text( + // user.editedOn != null + // ? formatDate(Helpers + // .convertStringToDate( + // user.editedOn)) + // : user.createdOn != null + // ? formatDate(Helpers + // .convertStringToDate(user + // .createdOn)) + // : '--', + // overflow: + // TextOverflow.ellipsis, + // style: TextStyle( + // fontFamily: 'Poppins'), + // textAlign: + // TextAlign.center), + )), Flexible( + flex: 2, child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginWith, - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - subtitle: Text( - getType(user.logInTypeID, - context), - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - )) + title: AppText( + user.editedOn != null + ? getDate(Helpers + .convertStringToDate( + user + .editedOn)) + : user.createdOn != + null + ? getDate(Helpers + .convertStringToDate( + user.createdOn)) + : '--', + textAlign: + TextAlign.right, + ), + subtitle: AppText( + user.editedOn != null + ? getTime(Helpers + .convertStringToDate( + user + .editedOn)) + : user.createdOn != + null + ? getTime(Helpers + .convertStringToDate( + user.createdOn)) + : '--', + textAlign: + TextAlign.right, + ), + )) ], )), ], @@ -232,6 +263,11 @@ class _VerificationMethodsState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ + // Expanded( + // child: + // getButton(3, authProv)), + // Expanded( + // child: getButton(4, authProv)) Expanded( child: InkWell( onTap: () => { @@ -243,7 +279,17 @@ class _VerificationMethodsState extends State { authProv))), Expanded( child: getButton(5, authProv)) - ]) + ]), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.center, + // children: [ + // Expanded( + // child: getButton(1, authProv)), + // Expanded( + // child: getButton(2, authProv)) + // ], + // ) ]) : Column( mainAxisAlignment: MainAxisAlignment.start, @@ -290,6 +336,7 @@ class _VerificationMethodsState extends State { child: Button( title: TranslationBase.of(context) .useAnotherAccount, + color: Colors.red[700], onTap: () { Navigator.of(context).pushNamed(LOGIN); }, @@ -424,25 +471,33 @@ class _VerificationMethodsState extends State { case 2: return InkWell( onTap: () => {authenticateUser(2, true, authProv)}, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(30, 15, 30, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/login/104.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + Row( + children: [ + Image.asset( + 'assets/images/verify-whtsapp.png', + height: SizeConfig.imageSizeMultiplier * 13, + width: SizeConfig.imageSizeMultiplier * 16, + ), + ], ), SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifyWhatsApp, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 2.2, ) ], ), @@ -451,16 +506,20 @@ class _VerificationMethodsState extends State { case 1: return InkWell( onTap: () => {authenticateUser(1, true, authProv)}, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/login/103.png', + 'assets/images/verify-sms.png', height: SizeConfig.imageSizeMultiplier * 13, width: SizeConfig.imageSizeMultiplier * 16, ), @@ -475,8 +534,7 @@ class _VerificationMethodsState extends State { TranslationBase.of(context).verifySMS, fontSize: projectsProvider.isArabic ? SizeConfig.textMultiplier * 1.8 - : SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + : SizeConfig.textMultiplier * 2.2, ) ], ), @@ -488,19 +546,20 @@ class _VerificationMethodsState extends State { if (checkIfBiometricAvailable(BiometricType.fingerprint)) {authenticateUser(3, true, authProv)} }, - child: RoundedContainer( - backgroundColor: - checkIfBiometricAvailable(BiometricType.fingerprint) - ? Colors.white - : Colors.white.withOpacity(.7), - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/login/102.png', + 'assets/images/verification_fingerprint_icon.png', height: SizeConfig.imageSizeMultiplier * 13, width: SizeConfig.imageSizeMultiplier * 16, ), @@ -509,8 +568,7 @@ class _VerificationMethodsState extends State { ), AppText( TranslationBase.of(context).verifyFingerprint, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 2.2, ) ], ), @@ -523,33 +581,40 @@ class _VerificationMethodsState extends State { authenticateUser(4, true, authProv); } }, - child: RoundedContainer( - backgroundColor: checkIfBiometricAvailable(BiometricType.face) - ? Colors.white - : Colors.white.withOpacity(.7), - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/login/101.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, - ), - SizedBox( - height: 20, + child: + // RoundedContainer( + // backgroundColor: checkIfBiometricAvailable(BiometricType.face) + // ? Colors.white + // : Colors.white.withOpacity(.7), + // borderColor: Colors.grey, + // showBorder: false, + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + margin: EdgeInsets.all(10), + child: Padding( + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/verification_faceid_icon.png', + height: SizeConfig.imageSizeMultiplier * 13, + width: SizeConfig.imageSizeMultiplier * 16, + ), + SizedBox( + height: 20, + ), + AppText( + TranslationBase.of(context).verifyFaceID, + fontSize: SizeConfig.textMultiplier * 2.2, + ) + ], ), - AppText( - TranslationBase.of(context).verifyFaceID, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, - ) - ], - ), - ))); + ))); break; default: @@ -559,13 +624,19 @@ class _VerificationMethodsState extends State { isMoreOption = true; }) }, - child: RoundedContainer( - backgroundColor: Colors.white, - borderColor: Colors.grey, - showBorder: true, + child: Container( + // backgroundColor: Colors.white, + // borderColor: Colors.grey, + // showBorder: false, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 0, 5, 5), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( 'assets/images/login/more_icon.png', @@ -574,15 +645,15 @@ class _VerificationMethodsState extends State { ), projectsProvider.isArabic ? SizedBox( - height: 15, + height: 20, ) : SizedBox( height: 10, ), AppText( TranslationBase.of(context).moreVerification, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 2.2, + // textAlign: TextAlign.center, ) ], ), @@ -800,4 +871,16 @@ class _VerificationMethodsState extends State { helpers.showErrorToast(err); }); } + + getDate(DateTime date) { + final DateFormat formatter = DateFormat('dd MMM yyyy'); + + return formatter.format(date); + } + + getTime(DateTime date) { + final DateFormat formatter = DateFormat('HH:mm a'); + + return formatter.format(date); + } } diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index fb5a9a0c..951e14ed 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -59,6 +60,7 @@ class SMSOTP { builder: (context) { projectProvider = Provider.of(context); return AlertDialog( + contentPadding: EdgeInsets.fromLTRB(24.0, 20.0, 0.0, 24.0), title: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ @@ -72,8 +74,8 @@ class SMSOTP { ) ], ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0))), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.all(Radius.circular(10.0))), content: StatefulBuilder(builder: (context, setState) { if (displayTime == '') { startTimer(setState); @@ -85,11 +87,23 @@ class SMSOTP { child: Center( child: SingleChildScrollView( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ type == 1 - ? Image.asset('assets/images/login/103.png') - : Image.asset('assets/images/login/104.png'), + ? Padding( + child: Icon( + DoctorApp.verify_sms_1, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ) + : Padding( + child: Icon( + DoctorApp.verify_whtsapp, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ), Padding( padding: EdgeInsets.only(top: 5), child: AppText( @@ -98,7 +112,8 @@ class SMSOTP { mobileNo .toString() .substring(mobileNo.toString().length - 3), - textAlign: TextAlign.center, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, )), Form( key: verifyAccountForm, @@ -220,13 +235,18 @@ class SMSOTP { ), Padding( padding: EdgeInsets.only(top: 10), - child: AppText( - TranslationBase.of(context).validationMessage + - ' ' + - displayTime, - color: Colors.red, - textAlign: TextAlign.center, - )) + child: Row(children: [ + AppText( + TranslationBase.of(context).validationMessage + ' ', + fontWeight: FontWeight.w600, + ), + AppText( + displayTime, + color: Colors.red, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ) + ])) ], ))), ); @@ -248,15 +268,15 @@ class SMSOTP { // contentPadding: EdgeInsets.only(top: 20, bottom: 20), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), + borderSide: BorderSide(color: Colors.grey[100]), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).primaryColor), + borderSide: BorderSide(color: Colors.grey[100]), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).errorColor), + borderSide: BorderSide(color: Colors.grey[100]), ), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 60aa5415..337083a4 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -20,6 +20,7 @@ class AppScaffold extends StatelessWidget { final Widget bottomSheet; final Color backgroundColor; final Widget appBar; + final bool isHomeIcon; AppScaffold( {this.appBarTitle = '', this.body, @@ -28,6 +29,7 @@ class AppScaffold extends StatelessWidget { this.baseViewModel, this.bottomSheet, this.backgroundColor, + this.isHomeIcon = true, this.appBar}); @override @@ -60,12 +62,14 @@ class AppScaffold extends StatelessWidget { }), centerTitle: true, actions: [ - IconButton( - icon: Icon(DoctorApp.home_icon_active), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pushNamedAndRemoveUntil( - context, HOME, (r) => false), - ), + isHomeIcon + ? IconButton( + icon: Icon(DoctorApp.home_icon_active), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pushNamedAndRemoveUntil( + context, HOME, (r) => false), + ) + : SizedBox() ], ) : null, From bdc2be8782fe68fcd1cd76d6330bfba7b37354bf Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 8 Apr 2021 23:38:27 +0300 Subject: [PATCH 14/14] fix issues --- .../patient_profile_header_with_appointment_card_app_bar.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index a00ae6ef..9532f920 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -27,6 +27,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre final String invoiceNO; final String orderNo; final bool isPrescriptions; + final String clinic; PatientProfileHeaderWhitAppointmentAppBar( {this.patient,