diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 3ba857e0..c4d2f5a5 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -305,5 +305,9 @@ const Map> localizedValues = { 'en': "EXTEND SICK LEAVE", 'ar': 'قم بتمديد الإجازة المرضية' }, - 'patient-target': {'en': 'Target Patient', 'ar': 'الهدف المريض'} + 'patient-target': {'en': 'Target Patient', 'ar': 'الهدف المريض'}, + 'no-priscription-listed': { + 'en': 'No Prescription Listed', + 'ar': 'لا وصفة طبية مدرجة' + } }; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 1dde64be..497506b3 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -338,6 +338,8 @@ class TranslationBase { localizedValues['extend-sickleave'][locale.languageCode]; String get targetPatient => localizedValues['patient-target'][locale.languageCode]; + String get noPrescription => + localizedValues['no-priscription-listed'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/medication.dart b/lib/widgets/patients/profile/medication.dart new file mode 100644 index 00000000..62494d8e --- /dev/null +++ b/lib/widgets/patients/profile/medication.dart @@ -0,0 +1,13 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class MedicationDetails extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Column( + children: [ + AppText('MEDICATION'), + ], + ); + } +} diff --git a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart index a5b9d014..1c9b4462 100644 --- a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart @@ -1,11 +1,13 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'large_avatar.dart'; @@ -19,7 +21,41 @@ class PrescriptionInPatientWidget extends StatelessWidget { Widget build(BuildContext context) { return Container( child: prescriptionReportForInPatientList.length == 0 - ? DrAppEmbeddedError(error: 'You don\'t have any Prescriptions') + ? Center( + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.all(40), + decoration: BoxDecoration( + border: + Border.all(color: HexColor('#B8382C'), width: 4), + borderRadius: BorderRadius.all(Radius.circular(100))), + child: IconButton( + icon: Icon( + Icons.add, + size: 35, + ), + onPressed: () { + // openAddPrescription(context); + }), + ), + Padding( + child: AppText( + TranslationBase.of(context).noPrescription, + fontWeight: FontWeight.bold, + ), + padding: EdgeInsets.all(10), + ), + AppText( + TranslationBase.of(context).applyNow, + fontWeight: FontWeight.bold, + color: HexColor('#B8382C'), + ) + ], + ), + )) : Container( margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, 0, SizeConfig.realScreenWidth * 0.05, 0), @@ -28,9 +64,12 @@ class PrescriptionInPatientWidget extends StatelessWidget { itemBuilder: (BuildContext context, int index) { return InkWell( onTap: () { - Navigator.of(context).pushNamed(IN_PATIENT_PRESCRIPTIONS_DETAILS, arguments: { - 'prescription': prescriptionReportForInPatientList[index] - }); + Navigator.of(context).pushNamed( + IN_PATIENT_PRESCRIPTIONS_DETAILS, + arguments: { + 'prescription': + prescriptionReportForInPatientList[index] + }); }, child: CardWithBgWidgetNew( widget: Column( diff --git a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart index bfb7b8c7..b4ceffb4 100644 --- a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart @@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; import 'package:doctor_app_flutter/screens/patients/out_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/medication.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; @@ -42,7 +43,7 @@ class PrescriptionOutPatientWidget extends StatelessWidget { ), Padding( child: AppText( - TranslationBase.of(context).noSickLeaveApplied, + TranslationBase.of(context).noPrescription, fontWeight: FontWeight.bold, ), padding: EdgeInsets.all(10), @@ -132,7 +133,7 @@ class PrescriptionOutPatientWidget extends StatelessWidget { showModalBottomSheet( context: context, builder: (context) { - return new Container(); + return MedicationDetails(); }); } }