From e32c360f855461fc928d71fa4974753369d750e3 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 20 Jan 2021 16:23:00 +0200 Subject: [PATCH] fix DA-154,DA-150 --- .../patients/patient_search_screen.dart | 2 +- .../profile/progress_note_screen.dart | 10 ++++-- .../profile/patient-page-header-widget.dart | 2 +- .../profile/soap_update/steps_widget.dart | 34 +++++++++---------- .../soap_update/update_assessment_page.dart | 10 ++++-- .../soap_update/update_objective_page.dart | 8 ++--- .../profile/soap_update/update_plan_page.dart | 2 ++ 7 files changed, 39 insertions(+), 29 deletions(-) diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 7915a168..52fbb677 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -42,7 +42,7 @@ class _PatientSearchScreenState extends State { String itemText2 = ''; final GlobalKey _formKey = GlobalKey(); bool _autoValidate = false; - bool onlyArrived = false; + bool onlyArrived = true; var _patientSearchFormValues = PatientModel( FirstName: "0", diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart index 88e34cdb..56a5cd5e 100644 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ b/lib/screens/patients/profile/progress_note_screen.dart @@ -141,9 +141,13 @@ class _ProgressNoteState extends State { indent: 0, endIndent: 0, ), - AppText( - notesList[index]["Notes"], - margin: 5, + Row(mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + notesList[index]["Notes"], + margin: 5, + ), + ], ) ], ), diff --git a/lib/widgets/patients/profile/patient-page-header-widget.dart b/lib/widgets/patients/profile/patient-page-header-widget.dart index dd2698a9..abd2f5ad 100644 --- a/lib/widgets/patients/profile/patient-page-header-widget.dart +++ b/lib/widgets/patients/profile/patient-page-header-widget.dart @@ -77,7 +77,7 @@ class PatientPageHeaderWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).age, + TranslationBase.of(context).age , color: Colors.black, fontWeight: FontWeight.bold, ), diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index b7e9e837..ab088e36 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -1,3 +1,4 @@ +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/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -36,7 +37,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => changeCurrentTab(0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 0 ? 70 : 50, @@ -74,7 +75,7 @@ class StepsWidget extends StatelessWidget { AppText( "SUBJECTIVE", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: SizeConfig.textMultiplier * 2.0, ), ], ), @@ -86,7 +87,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => index >= 1 ? changeCurrentTab(1) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 1 ? 70 : 50, @@ -124,7 +125,7 @@ class StepsWidget extends StatelessWidget { AppText( "OBJECTIVE", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize:SizeConfig.textMultiplier * 2.0, ), ], ), @@ -139,7 +140,7 @@ class StepsWidget extends StatelessWidget { changeCurrentTab(2); }, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 2 ? 70 : 50, @@ -177,7 +178,7 @@ class StepsWidget extends StatelessWidget { AppText( "ASSESSMENT", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize:SizeConfig.textMultiplier * 2.0, ), ], ), @@ -189,7 +190,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 3 ? 70 : 50, @@ -224,13 +225,12 @@ class StepsWidget extends StatelessWidget { SizedBox( height: index == 3 ? 5 : 10, ), - Container( - margin: EdgeInsets.only(left: index == 3? 15:0), + Center( child: AppText( "PLAN", fontWeight: FontWeight.bold, textAlign: TextAlign.center, - fontSize: 14, + fontSize:SizeConfig.textMultiplier * 2.0, ), ), ], @@ -259,7 +259,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => changeCurrentTab(0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 0 ? 70 : 50, @@ -309,7 +309,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => index >= 2 ? changeCurrentTab(1) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 1 ? 70 : 50, @@ -347,7 +347,7 @@ class StepsWidget extends StatelessWidget { AppText( "هدف", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize:SizeConfig.textMultiplier * 2.0, ), ], ), @@ -359,7 +359,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(2) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 2 ? 70 : 50, @@ -400,7 +400,7 @@ class StepsWidget extends StatelessWidget { child: AppText( "تقدير", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize:SizeConfig.textMultiplier * 2.0, ), ), ], @@ -413,7 +413,7 @@ class StepsWidget extends StatelessWidget { child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( width: index == 3 ? 70 : 50, @@ -453,7 +453,7 @@ class StepsWidget extends StatelessWidget { child: AppText( "خطة", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize:SizeConfig.textMultiplier * 2.0, ), ), ], diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index ac1e547e..e6cb4654 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -381,9 +381,13 @@ class _UpdateAssessmentPageState extends State { .next, loading: model.state == ViewState.BusyLocal, onPressed: () async { - widget.changePageViewIndex(3); - widget.changeLoadingState(true); - + if (widget.mySelectedAssessmentList.isEmpty) { + helpers.showErrorToast( + TranslationBase.of(context).requiredMsg); + } else { + widget.changePageViewIndex(3); + widget.changeLoadingState(true); + } }, ), SizedBox( diff --git a/lib/widgets/patients/profile/soap_update/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/update_objective_page.dart index fe80a5c3..a5aad1bf 100644 --- a/lib/widgets/patients/profile/soap_update/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_objective_page.dart @@ -412,11 +412,11 @@ class _UpdateObjectivePageState extends State { widget.changePageViewIndex(2); } } else { - widget.changeLoadingState(true); + // widget.changeLoadingState(true); + // + // widget.changePageViewIndex(2); - widget.changePageViewIndex(2); - - // helpers.showErrorToast(TranslationBase.of(context).requiredMsg); + helpers.showErrorToast(TranslationBase.of(context).requiredMsg); } } diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index d059e445..9d4a4c39 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -321,6 +321,8 @@ class _UpdatePlanPageState extends State { } else { Navigator.of(context).pop(); } + } else { + helpers.showErrorToast(TranslationBase.of(context).requiredMsg); } }