From ff157b417e116bec3481eef2889c24cd4a1eaa42 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 13:47:17 +0300 Subject: [PATCH] fix add medication and soap index --- lib/screens/dashboard_screen.dart | 12 ++-- .../soap_update/expandable_SOAP_widget.dart | 1 - .../profile/soap_update/steps_widget.dart | 40 ++++++----- .../subjective/update_medication_widget.dart | 72 ++++++++++++------- .../soap_update/update_soap_index.dart | 27 ++++++- 5 files changed, 102 insertions(+), 50 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 13e17077..b0c3bcde 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1020,12 +1020,12 @@ class _DashboardScreenState extends State { ), hasBorder: false, onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // SearchMedicinePatientScreen(), - // )); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + SearchMedicinePatientScreen(), + )); }, ) ], diff --git a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart index 32876539..81bdf613 100644 --- a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -44,7 +44,6 @@ class ExpandableSOAPWidget extends StatelessWidget { if(isRequired) Icon( FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, size: 12, ) ], diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index b1432752..973c4138 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -24,19 +24,23 @@ class StepsWidget extends StatelessWidget { height: height == 0 ? 150 : height, width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, - child: Center( - child: Container( - width: MediaQuery.of(context).size.width * 0.86, - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, - ), - ), - ), + // child:, ), Positioned( - top: 43, + top: 30 + , + child: Center( + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), + ), + )), + Positioned( + top: 10, left: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -87,7 +91,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: MediaQuery .of(context) .size @@ -143,7 +147,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: MediaQuery .of(context) .size @@ -201,7 +205,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, @@ -271,7 +275,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -321,7 +325,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: MediaQuery .of(context) .size @@ -374,7 +378,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: MediaQuery .of(context) .size @@ -432,7 +436,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart index 2d9f5cd5..440252fa 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_medication_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/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; @@ -41,30 +42,52 @@ class _UpdateMedicationWidgetState extends State { return Column( children: [ - Container( - child: TextFields( - hintText: TranslationBase.of(context).addMedication, - borderColor: HexColor('#707070'), - borderWidth: 0.30, - fontSize: 13.5, - borderRadius: 12, - onTapTextFields: () { - openMedicationList(context); - }, - readOnly: true, - // hintColor: Colors.black, - 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: () { + openMedicationList(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).addMedication}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + )), + Icon( + Icons.add_box_rounded, + size: 25, + ) + ], + ), + ), ), SizedBox( height: 20, @@ -78,6 +101,7 @@ class _UpdateMedicationWidgetState extends State { showModalBottomSheet( backgroundColor: Colors.white, isScrollControlled: true, + isDismissible: false, context: context, builder: (context) { return AddMedication( 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 0c69d71d..2f839633 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; @@ -6,11 +7,13 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -79,6 +82,7 @@ class _UpdateSoapIndexState extends State color: Theme.of(context).scaffoldBackgroundColor), child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ // PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), @@ -87,6 +91,27 @@ class _UpdateSoapIndexState extends State height: 1, color: Color(0xffCCCCCC), ), + Container( + margin: EdgeInsets.only( + top: 10, + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + + child: AppText( + TranslationBase.of(context).createNew, + fontSize: 3 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w500, + ), + ), + Container( + margin: EdgeInsets.only( + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + child: AppText(TranslationBase.of(context).episode, + fontSize: 3.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + ), Container( color: Theme.of(context).scaffoldBackgroundColor, margin: EdgeInsets.only( @@ -95,7 +120,7 @@ class _UpdateSoapIndexState extends State child: StepsWidget( index: _currentIndex, changeCurrentTab: changePageViewIndex, - height: 135,//MediaQuery.of(context).size.height * 0.17, + height: 100,//MediaQuery.of(context).size.height * 0.17, ), ), Container(