From 39b4c3d55fb9f8e9add56d79803317b9baff56c0 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Mon, 28 Feb 2022 10:09:40 +0200 Subject: [PATCH] Fixing some design issues in refer-patient-screen-in-patient and refer-patient-screen --- .../referral/refer-patient-screen.dart | 71 +++++++++---------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 45f4ebbe..d5098e8e 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -161,55 +161,54 @@ class _PatientMakeReferralScreenState extends State { BottomSheetDialogButton( label: "${TranslationBase.of(context).refer}", onTap: () async { - await locator().logEvent( + await locator().logEvent( eventCategory: "Refer Patient", eventAction: "Submit Refer", - ); - if (_referTo == null) { + ); + if (_referTo == null) { branchError = - TranslationBase.of(context).fieldRequired; - } else { + TranslationBase.of(context).fieldRequired; + } else { branchError = null; - } - if (_selectedBranch == null) { + } + if (_selectedBranch == null) { hospitalError = - TranslationBase.of(context).fieldRequired; - } else { + TranslationBase.of(context).fieldRequired; + } else { hospitalError = null; - } - if (_selectedClinic == null) { + } + if (_selectedClinic == null) { clinicError = - TranslationBase.of(context).fieldRequired; - } else { + TranslationBase.of(context).fieldRequired; + } else { clinicError = null; - } - if (_selectedDoctor == null) { + } + if (_selectedDoctor == null) { doctorError = - TranslationBase.of(context).fieldRequired; - } else { + TranslationBase.of(context).fieldRequired; + } else { doctorError = null; - } + } - if (appointmentDate == null || - _selectedBranch == null || - _selectedClinic == null || - _selectedDoctor == null || - _remarksController.text == null) return; - model - .makeReferral( - patient, - appointmentDate.toIso8601String(), - _selectedBranch['facilityId'], - _selectedClinic['ClinicID'], - _selectedDoctor['DoctorID'], - _remarksController.text) - .then((_) { + if (appointmentDate == null || + _selectedBranch == null || + _selectedClinic == null || + _selectedDoctor == null || + _remarksController.text == null) return; + model + .makeReferral( + patient, + appointmentDate.toIso8601String(), + _selectedBranch['facilityId'], + _selectedClinic['ClinicID'], + _selectedDoctor['DoctorID'], + _remarksController.text) + .then((_) { DrAppToastMsg.showSuccesToast( - TranslationBase.of(context).referralSuccessMsg); + TranslationBase.of(context).referralSuccessMsg); Navigator.pop(context); - }); - } - ), + }); + }), ], ), ),