From 3a7faf6b660fff971d0824f33ddd0317e207ce2b Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 12 Apr 2021 12:41:27 +0300 Subject: [PATCH] fix issues --- ios/Podfile.lock | 2 +- .../profile/patient_profile_screen.dart | 37 +++++++++++-------- .../profile/soap_update/steps_widget.dart | 2 +- .../soap_update/update_soap_index.dart | 2 +- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 878a1850..2f4607e0 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -322,4 +322,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.1 +COCOAPODS: 1.10.0.rc.1 diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 70c9f5b9..bce7fa01 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -141,24 +141,29 @@ class PatientProfileScreen extends StatelessWidget { if (patient.episodeNo != 0) BorderedButton( "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - backgroundColor: Colors.red.shade700, - textColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 12, - fontFamily: 'Poppins', - icon: Image.asset( - "assets/images/modilfy-episode.png", - color: Colors.white, - height: 30, + backgroundColor: + patient.patientStatusType == 43 + ? Colors.red.shade700 + : Colors.grey.shade700, + textColor: Colors.white, + vPadding: 8, + radius: 30, + hPadding: 20, + fontWeight: FontWeight.normal, + fontSize: 12, + fontFamily: 'Poppins', + icon: Image.asset( + "assets/images/modilfy-episode.png", + color: Colors.white, + height: 30, ), handler: () { - Navigator.of(context).pushNamed( - UPDATE_EPISODE, - arguments: {'patient': patient}); - }, + if (patient.patientStatusType == 43) { + Navigator.of(context).pushNamed( + UPDATE_EPISODE, + arguments: {'patient': patient}); + }; + } ), ], ), diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index 0abc84c7..b1432752 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -26,7 +26,7 @@ class StepsWidget extends StatelessWidget { color: Colors.transparent, child: Center( child: Container( - width: MediaQuery.of(context).size.width * 0.87, + width: MediaQuery.of(context).size.width * 0.86, child: Divider( color: Colors.grey, height: 0.75, 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 72c8c714..0c69d71d 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -95,7 +95,7 @@ class _UpdateSoapIndexState extends State child: StepsWidget( index: _currentIndex, changeCurrentTab: changePageViewIndex, - height: MediaQuery.of(context).size.height * 0.20, + height: 135,//MediaQuery.of(context).size.height * 0.17, ), ), Container(