From d9d2e40927c3c43adab1fef0d0c35e2652a8c687 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 29 Dec 2021 17:01:30 +0200 Subject: [PATCH] we fix some issues in pharmacies_items_request_model, refer-patient-screen and refer-patient-screen-in-patient --- .../pharmacies_items_request_model.dart | 2 ++ .../referral/refer-patient-screen-in-patient.dart | 10 ++++------ .../profile/referral/refer-patient-screen.dart | 15 +++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index e81ce9b3..a09736e2 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -59,6 +59,8 @@ class PharmaciesItemsRequestModel { data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; + //TODO Elham* fix it later + data['VersionID'] = 40; return data; } } diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 41686ead..554a4209 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -261,8 +261,7 @@ class _PatientMakeInPatientReferralScreenState attributeName: 'facilityName', attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; @@ -278,7 +277,6 @@ class _PatientMakeInPatientReferralScreenState DrAppToastMsg.showErrorToast( model.error); } - }); }, ); showDialog( @@ -316,8 +314,8 @@ class _PatientMakeInPatientReferralScreenState TranslationBase.of(context) .clinicSearch, okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedDoctor = null; _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog( @@ -334,7 +332,7 @@ class _PatientMakeInPatientReferralScreenState DrAppToastMsg.showErrorToast( model.error); } - }); + }, ); showDialog( diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index e9ba4770..40325374 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -174,7 +174,7 @@ class _PatientMakeReferralScreenState extends State { fontWeight: FontWeight.w700, color: HexColor("#359846"), onPressed: () async { - setState(() async { + await locator().logEvent( eventCategory: "Refer Patient", eventAction: "Submit Refer", @@ -203,7 +203,7 @@ class _PatientMakeReferralScreenState extends State { } else { doctorError = null; } - }); + if (appointmentDate == null || _selectedBranch == null || _selectedClinic == null || @@ -309,8 +309,8 @@ class _PatientMakeReferralScreenState extends State { attributeName: 'facilityName', attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; @@ -322,7 +322,7 @@ class _PatientMakeReferralScreenState extends State { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } - }); + }, ); showDialog( @@ -358,8 +358,8 @@ class _PatientMakeReferralScreenState extends State { usingSearch: true, hintSearchText: TranslationBase.of(context).clinicSearch, okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedDoctor = null; _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog(context); @@ -373,7 +373,6 @@ class _PatientMakeReferralScreenState extends State { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } - }); }, ); showDialog(