From 5714ed95401a98df74064802baa2287ec4b4d332 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 31 Mar 2021 13:07:10 +0300 Subject: [PATCH 1/2] small fix on replay page --- lib/config/localized_values.dart | 7 +++++++ lib/util/translations_delegate_base.dart | 2 ++ lib/widgets/doctor/doctor_reply_widget.dart | 19 ++++++++----------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 9fa9c35c..94173b26 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -816,4 +816,11 @@ const Map> localizedValues = { "en": "Extend Sick Leave Request", "ar": "تمديد طلب الإجازة المرضية" }, + "unReplied": { + "en": "UnReplied", + "ar": "لم يتم الرد" + },"replied": { + "en": "Replied", + "ar": " تم الرد" + }, }; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 7ff65bb1..5ffdd939 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1193,6 +1193,8 @@ class TranslationBase { String get updateReschedule => localizedValues['update-reschedule'][locale.languageCode]; String get sickLeave => localizedValues['sick_leave'][locale.languageCode]; + String get unReplied => localizedValues['unReplied'][locale.languageCode]; + String get replied => localizedValues['replied'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index 5660fde6..d0d8c3ca 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -25,9 +25,9 @@ class _DoctorReplyWidgetState extends State { return Container( child: CardWithBgWidget( bgColor: - widget.reply.status == 1 - ? Color(0xffc4aa54) - : Colors.red[700], + widget.reply.status == 2 + ? Color(0xFF2E303A) + : Color(0xFFD02127), hasBorder: false, widget: Container( // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), @@ -45,15 +45,12 @@ class _DoctorReplyWidgetState extends State { color: Colors.black), children: [ new TextSpan( - text: widget.reply.infoStatus!=null ? widget.reply.infoStatus :'', + text: widget.reply.status==2 ? TranslationBase.of(context).replied :TranslationBase.of(context).unReplied , style: TextStyle( - color: widget.reply.status != null - ? widget.reply.status == 1 - ? Color(0xffc4aa54) - : widget.reply.status == 2 - ? Colors.green[700] - : Colors.red[700] - : Colors.grey[500], + color: widget.reply.status == 2 + ? Color(0xFF2E303A) + : Color(0xFFD02127), + fontWeight: FontWeight.w700, fontFamily: 'Poppins', fontSize: 2.0 * SizeConfig.textMultiplier)), From 578cd58daadde12db5ec3dde466f43ea6b8eba19 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 31 Mar 2021 17:28:24 +0300 Subject: [PATCH 2/2] Removing old prescription screen --- .../profile/profile_medical_info_widget.dart | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index b5afa0af..712648cc 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -124,25 +124,25 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, icon: 'patient/admission_req.png'), - (int.parse(patientType) == 7 || int.parse(patientType) == 6) - ? PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png') - : PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_HISTORY, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), + // (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // ? PatientProfileButton( + // key: key, + // patient: patient, + // patientType: patientType, + // arrivalType: arrivalType, + // route: ORDER_PRESCRIPTION, + // nameLine1: TranslationBase.of(context).orders, + // nameLine2: TranslationBase.of(context).prescription, + // icon: 'patient/order_prescription.png') + // : PatientProfileButton( + // key: key, + // patient: patient, + // patientType: patientType, + // arrivalType: arrivalType, + // route: ORDER_PRESCRIPTION_HISTORY, + // nameLine1: TranslationBase.of(context).orders, + // nameLine2: TranslationBase.of(context).prescription, + // icon: 'patient/order_prescription.png'), PatientProfileButton( key: key, patient: patient,