diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 36d51248..5b5a99a3 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; @@ -83,11 +84,10 @@ class PatientSearchViewModel extends BaseViewModel{ getPatientBasedOnDate ( {item, PatientSearchRequestModel patientSearchRequestModel, PatientType selectedPatientType, - bool isSearchWithKeyInfo })async { + bool isSearchWithKeyInfo,OutPatientFilterType outPatientFilterType })async { String dateTo; String dateFrom; - // TODO Fix this in Arabic - if (item == 'Previous') { + if (OutPatientFilterType.Previous == outPatientFilterType) { selectedFromDate = DateTime(DateTime.now().year, DateTime.now().month-1, DateTime.now().day); @@ -101,7 +101,7 @@ class PatientSearchViewModel extends BaseViewModel{ 'yyyy-MM-dd'); - } else if (item == 'Next Week') { + } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { dateTo = DateUtils.convertDateToFormat( diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index f9e4bfd7..3052c77d 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -142,7 +142,7 @@ class _OutPatientsScreenState extends State { selectedPatientType: widget.selectedPatientType, patientSearchRequestModel: widget .patientSearchRequestModel, - isSearchWithKeyInfo: widget.isSearchWithKeyInfo); + isSearchWithKeyInfo: widget.isSearchWithKeyInfo, outPatientFilterType: outPatientFilterType); GifLoaderDialogUtils.hideDialog(context); }, child: Center( diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart index da1abd28..85614b6d 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart @@ -33,7 +33,6 @@ class SOAPStepHeader extends StatelessWidget { child: StepsWidget( index: currentIndex, changeCurrentTab: changePageViewIndex, - height: 100, ), ), SizedBox( diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart index 059674a8..c5c2e8ca 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart @@ -20,23 +20,26 @@ class StepsWidget extends StatelessWidget { ? Stack( children: [ Container( - height: height == 0 ? 150 : height, + height: height == 0 ? 100 : height, width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, ), Positioned( 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, - ), + , + 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, @@ -260,17 +263,26 @@ class StepsWidget extends StatelessWidget { : Stack( children: [ Container( - height: height == 0 ? 150 : height, - width: MediaQuery.of(context).size.width, + height: height == 0 ? 100 : height, + width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, + ), + Positioned( + top: 30 + , child: Center( - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, + child: Container( + width: MediaQuery + .of(context) + .size + .width * 0.9, + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), ), - ), - ), + ),), Positioned( top: 10, right: 0, @@ -303,7 +315,7 @@ class StepsWidget extends StatelessWidget { color: Colors.white, )), ), - SizedBox(height: 5), + SizedBox(height: 3), Column( children: [ AppText(