From 802bd83ddd00c2a3fe32f05e5d57cea18898d418 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 3 May 2021 14:48:37 +0300 Subject: [PATCH] design-changes --- lib/config/localized_values.dart | 14 +- lib/screens/home/home_page_card.dart | 14 +- lib/screens/home/home_screen.dart | 9 - .../ReferralDischargedPatientDetails.dart | 2 +- .../profile/UCAF/UCAF-input-screen.dart | 10 +- .../profile_gird_for_other.dart | 376 +++++------------- .../profile_gird_for_search.dart | 222 +++++------ .../referral/patient_referral_screen.dart | 2 +- .../referral_patient_detail_in-paint.dart | 2 +- .../referral/referred-patient-screen.dart | 2 +- .../referred_patient_detail_in-paint.dart | 4 +- lib/util/translations_delegate_base.dart | 5 +- .../profile/PatientProfileButton.dart | 13 +- 13 files changed, 238 insertions(+), 437 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 183b2a0f..d8427557 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -756,12 +756,12 @@ const Map> localizedValues = { 'ar': "الإجازة المرضية في حالة الانتظار لهذا المريض" }, 'no-clinic': {'en': "No Clinic", 'ar': "لا عيادة"}, - 'otherStatistic': {'en': "Other Statistics", 'ar': "دیگر شماریات"}, - 'ptientsreferral': {'en': "Patient's Referrals", 'ar': "مریض کا حوالہ"}, - 'arrivalpatient': {'en': "Arrival Patients", 'ar': "مریضوں کی آمد"}, + 'otherStatistic': {'en': "Other Statistics", 'ar': "إحصائيات أخرى"}, + 'ptientsreferral': {'en': "Patient's Referrals", 'ar': "إحالات المريض"}, + 'arrivalpatient': {'en': "Arrival Patients", 'ar': "المرضى القادمون"}, 'searchmedicinepatient': { 'en': "Search patient or Medicines", - 'ar': "مریض یا دوائیں تلاش کریں" + 'ar': "ابحث عن المريض أو الأدوية" }, 'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"}, 'arrived_p': {'en': "Arrived", 'ar': "وصل"}, @@ -859,7 +859,7 @@ const Map> localizedValues = { "numOfDays": {"en": "Number of Days", "ar": "عدد الأيام"}, "replayBefore": {"en": "Replay Before", "ar": "رد قبل"}, "try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'}, - "refClinic": {"en": "Ref Clinic", "ar": "Ref Clinic"}, + "refClinic": {"en": "Ref Clinic", "ar": "العيادة المرجعية"}, "acknowledged": {"en": "Acknowledged", "ar": "إقرار"}, "didntCatch": { "en": "Didn't catch that. Try Speaking again", @@ -961,5 +961,7 @@ const Map> localizedValues = { 'medical': {'en': 'Medical', 'ar': 'الطبي'}, 'report': {'en': 'Report', 'ar': 'التقرير'}, 'discharge': {'en': 'Discharge', 'ar': 'discharge'}, - "discharged": {"en": "Discharged", "ar": "المصرف"}, + "discharged": {"en": "Discharged", "ar": "المفرغين"}, + "none": {"en": "None", "ar": "لا شيء"}, + "notRepliedYet": {"en": "Not Replied yet", "ar": "لم يرد بعد"}, }; diff --git a/lib/screens/home/home_page_card.dart b/lib/screens/home/home_page_card.dart index ffe56fd0..2f85ff89 100644 --- a/lib/screens/home/home_page_card.dart +++ b/lib/screens/home/home_page_card.dart @@ -8,8 +8,6 @@ class HomePageCard extends StatelessWidget { @required this.child, this.onTap, Key key, - this.width, - this.height, this.color, this.opacity = 0.4, this.margin}) @@ -18,8 +16,6 @@ class HomePageCard extends StatelessWidget { final String imageName; final Widget child; final Function onTap; - final double width; - final double height; final Color color; final double opacity; final EdgeInsets margin; @@ -28,12 +24,10 @@ class HomePageCard extends StatelessWidget { return InkWell( onTap: onTap, child: Container( - width: width != null ? width : MediaQuery.of(context).size.width * 0.28, - height: height != null - ? height - : MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.18 - : MediaQuery.of(context).size.height * 0.36, + width: 100, + height: MediaQuery.of(context).orientation == Orientation.portrait + ? 130 + : 250, margin: this.margin, decoration: BoxDecoration( color: !hasBorder diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index e95f1d1e..a6e4e258 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -520,15 +520,6 @@ class _HomeScreenState extends State { page: PatientInPatientScreen(), ), ); - // getRequestHeader(true); - // Navigator.of(context) - // .pushNamed(PATIENTS, arguments: { - // "patientSearchForm": - // _patientSearchFormValues, - // "selectedType": "1", - // "arrivalType": "1", - // "isInpatient": true - // }); }, ), HomePageCard( diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index 0b664d4b..b1829126 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -509,7 +509,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { CrossAxisAlignment.start, children: [ AppText( - "Dr ${referredPatient.referringDoctorName}", + "${TranslationBase.of(context).dr} ${referredPatient.referringDoctorName}", fontFamily: 'Poppins', fontWeight: FontWeight.w800, fontSize: 1.5 * diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index 137b4ed5..5c16d063 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -325,7 +325,7 @@ class _UCAFInputScreenState extends State { ), AppTextFieldCustom( hintText: TranslationBase.of(context).other, - dropDownText: "None", + dropDownText: TranslationBase.of(context).none, enabled: false, ), SizedBox( @@ -333,7 +333,7 @@ class _UCAFInputScreenState extends State { ), AppTextFieldCustom( hintText: TranslationBase.of(context).how, - dropDownText: "None", + dropDownText: TranslationBase.of(context).none, enabled: false, ), SizedBox( @@ -345,7 +345,7 @@ class _UCAFInputScreenState extends State { child: AppTextFieldCustom( hintText: TranslationBase.of(context).when, - dropDownText: "None", + dropDownText: TranslationBase.of(context).none, enabled: false, ), ), @@ -356,7 +356,7 @@ class _UCAFInputScreenState extends State { child: AppTextFieldCustom( hintText: TranslationBase.of(context).where, - dropDownText: "None", + dropDownText: TranslationBase.of(context).none, enabled: false, ), ), @@ -369,7 +369,7 @@ class _UCAFInputScreenState extends State { height: screenSize.height * 0.1, hintText: TranslationBase.of(context) .specifyPossibleLineManagement, - dropDownText: "None", + dropDownText: TranslationBase.of(context).none, enabled: false, minLines: 4, maxLines: 6, diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart index 66894e11..86ccd6d1 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart @@ -1,7 +1,9 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import '../../../../routes.dart'; @@ -15,290 +17,128 @@ class ProfileGridForOther extends StatelessWidget { String from; String to; - ProfileGridForOther( + ProfileGridForOther( {Key key, this.patient, this.patientType, this.arrivalType, this.height, - this.isInpatient, this.from,this.to}) + this.isInpatient, + this.from, + this.to}) : super(key: key); @override Widget build(BuildContext context) { + final List cardsList = [ + PatientProfileCardModel( + TranslationBase.of(context).vital, + TranslationBase.of(context).signs, + VITAL_SIGN_DETAILS, + 'patient/vital_signs.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).lab, + TranslationBase.of(context).result, + LAB_RESULT, + 'patient/lab_results.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).radiology, + TranslationBase.of(context).service, + RADIOLOGY_PATIENT, + 'patient/health_summary.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, + 'patient/order_prescription.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).health, + TranslationBase.of(context).summary, + HEALTH_SUMMARY, + 'patient/health_summary.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patient, + "ECG", + PATIENT_ECG, + 'patient/patient_sick_leave.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).procedures, + ORDER_PROCEDURE, + 'patient/Order_Procedures.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).insurance, + TranslationBase.of(context).service, + PATIENT_INSURANCE_APPROVALS_NEW, + 'patient/vital_signs.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patientSick, + TranslationBase.of(context).leave, + ADD_SICKLEAVE, + 'patient/patient_sick_leave.png', + isInPatient: isInpatient), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileCardModel( + TranslationBase.of(context).patient, + TranslationBase.of(context).ucaf, + PATIENT_UCAF_REQUEST, + 'patient/ucaf.png', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileCardModel( + TranslationBase.of(context).referral, + TranslationBase.of(context).patient, + REFER_PATIENT_TO_DOCTOR, + 'patient/refer_patient.png', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileCardModel( + TranslationBase.of(context).admission, + TranslationBase.of(context).request, + PATIENT_ADMISSION_REQUEST, + 'patient/admission_req.png', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), + ]; + return Column( children: [ Padding( - padding: const EdgeInsets - .symmetric( - vertical: 15.0, - horizontal: 15), - child: GridView.count( + padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), + child: StaggeredGridView.countBuilder( shrinkWrap: true, - physics: - NeverScrollableScrollPhysics(), + physics: NeverScrollableScrollPhysics(), crossAxisSpacing: 10, mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, crossAxisCount: 3, - children: [ - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - from: from, - to: to, - nameLine1: - TranslationBase.of( - context) - .vital, - nameLine2: - TranslationBase.of( - context) - .signs, - route: - VITAL_SIGN_DETAILS, - icon: - 'patient/vital_signs.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: LAB_RESULT, - nameLine1: - TranslationBase.of( - context) - .lab, - nameLine2: - TranslationBase.of( - context) - .result, - icon: - 'patient/lab_results.png'), - PatientProfileButton( - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - isInPatient: - isInpatient, - route: - RADIOLOGY_PATIENT, - nameLine1: - TranslationBase.of( - context) - .radiology, - nameLine2: - TranslationBase.of( - context) - .service, - icon: - 'patient/health_summary.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: - ORDER_PRESCRIPTION_NEW, - nameLine1: - TranslationBase.of( - context) - .orders, - nameLine2: - TranslationBase.of( - context) - .prescription, - icon: - 'patient/order_prescription.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: HEALTH_SUMMARY, - nameLine1: TranslationBase.of(context).health, - nameLine2: TranslationBase.of(context).summary, - icon: - 'patient/health_summary.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: PATIENT_ECG, - nameLine1: - TranslationBase.of( - context) - .patient, - nameLine2: "ECG", - icon: - 'patient/patient_sick_leave.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: - ORDER_PROCEDURE, - nameLine1: - TranslationBase.of( - context) - .orders, - nameLine2: - TranslationBase.of( - context) - .procedures, - icon: - 'patient/Order_Procedures.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: - PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: - TranslationBase.of( - context) - .insurance, - nameLine2: - TranslationBase.of( - context) - .service, - icon: - 'patient/vital_signs.png'), - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: ADD_SICKLEAVE, - nameLine1: - TranslationBase.of( - context) - .patientSick, - nameLine2: - TranslationBase.of( - context) - .leave, - icon: - 'patient/patient_sick_leave.png'), - if (patient.appointmentNo != - null && - patient.appointmentNo != - 0) - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: - PATIENT_UCAF_REQUEST, - isDisable: - patient.patientStatusType != - 43 - ? true - : false, - nameLine1: - TranslationBase.of( - context) - .patient, - nameLine2: - TranslationBase.of( - context) - .ucaf, - icon: - 'patient/ucaf.png'), - if (patient.appointmentNo != - null && - patient.appointmentNo != - 0) - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: - REFER_PATIENT_TO_DOCTOR, - isDisable: patient - .patientStatusType != - 43 - ? true - : false, - nameLine1: - TranslationBase.of( - context) - .referral, - nameLine2: - TranslationBase.of( - context) - .patient, - icon: - 'patient/refer_patient.png'), - if (patient.appointmentNo != - null && - patient.appointmentNo != - 0) - PatientProfileButton( - isInPatient: - isInpatient, - patient: patient, - patientType: - patientType, - arrivalType: - arrivalType, - route: - PATIENT_ADMISSION_REQUEST, - isDisable: - patient.patientStatusType != - 43 - ? true - : false, - nameLine1: - TranslationBase.of( - context) - .admission, - nameLine2: - TranslationBase.of( - context) - .request, - icon: - 'patient/admission_req.png'), - ], + itemCount: cardsList.length, + staggeredTileBuilder: (int index) => StaggeredTile.fit(1), + itemBuilder: (BuildContext context, int index) => PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: cardsList[index].nameLine1, + nameLine2: cardsList[index].nameLine2, + route: cardsList[index].route, + icon: cardsList[index].icon, + isInPatient: cardsList[index].isInPatient, + isDischargedPatient: cardsList[index].isDischargedPatient, + isDisable: cardsList[index].isDisable, + onTap: cardsList[index].onTap, + isLoading: cardsList[index].isLoading, + ), ), ), ], diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart index 2d3679cf..9c9f7d36 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart @@ -1,7 +1,9 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import '../../../../routes.dart'; @@ -25,135 +27,115 @@ class ProfileGridForSearch extends StatelessWidget { @override Widget build(BuildContext context) { + final List cardsList = [ + PatientProfileCardModel( + TranslationBase.of(context).vital, + TranslationBase.of(context).signs, + VITAL_SIGN_DETAILS, + 'patient/vital_signs.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).lab, + TranslationBase.of(context).result, + LAB_RESULT, + 'patient/lab_results.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).radiology, + TranslationBase.of(context).service, + RADIOLOGY_PATIENT, + 'patient/health_summary.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, + 'patient/order_prescription.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).health, + TranslationBase.of(context).summary, + HEALTH_SUMMARY, + 'patient/health_summary.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patient, + "ECG", + PATIENT_ECG, + 'patient/patient_sick_leave.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).procedures, + ORDER_PROCEDURE, + 'patient/Order_Procedures.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).insurance, + TranslationBase.of(context).service, + PATIENT_INSURANCE_APPROVALS_NEW, + 'patient/vital_signs.png', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patientSick, + TranslationBase.of(context).leave, + ADD_SICKLEAVE, + 'patient/patient_sick_leave.png', + isInPatient: isInpatient), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileCardModel( + TranslationBase.of(context).patient, + TranslationBase.of(context).ucaf, + PATIENT_UCAF_REQUEST, + 'patient/ucaf.png', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileCardModel( + TranslationBase.of(context).referral, + TranslationBase.of(context).patient, + REFER_PATIENT_TO_DOCTOR, + 'patient/refer_patient.png', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileCardModel( + TranslationBase.of(context).admission, + TranslationBase.of(context).request, + PATIENT_ADMISSION_REQUEST, + 'patient/admission_req.png', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), + ]; + return Column( children: [ Padding( padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), - child: GridView.count( + child: StaggeredGridView.countBuilder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), crossAxisSpacing: 10, mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, crossAxisCount: 3, - children: [ - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - route: VITAL_SIGN_DETAILS, - icon: 'patient/vital_signs.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: LAB_RESULT, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isInPatient: isInpatient, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: HEALTH_SUMMARY, - nameLine1: TranslationBase.of(context).health, - nameLine2: TranslationBase.of(context).summary, - icon: 'patient/health_summary.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PROCEDURE, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).procedures, - icon: 'patient/Order_Procedures.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ADD_SICKLEAVE, - nameLine1: TranslationBase.of(context).patientSick, - nameLine2: TranslationBase.of(context).leave, - icon: 'patient/patient_sick_leave.png'), - if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_UCAF_REQUEST, - isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).patient, - nameLine2: TranslationBase.of(context).ucaf, - icon: 'patient/ucaf.png'), - if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: REFER_PATIENT_TO_DOCTOR, - isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).referral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ADMISSION_REQUEST, - isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).admission, - nameLine2: TranslationBase.of(context).request, - icon: 'patient/admission_req.png'), - ], + itemCount: cardsList.length, + staggeredTileBuilder: (int index) => StaggeredTile.fit(1), + itemBuilder: (BuildContext context, int index) => PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: cardsList[index].nameLine1, + nameLine2: cardsList[index].nameLine2, + route: cardsList[index].route, + icon: cardsList[index].icon, + isInPatient: cardsList[index].isInPatient, + isDischargedPatient: cardsList[index].isDischargedPatient, + isDisable: cardsList[index].isDisable, + onTap: cardsList[index].onTap, + isLoading: cardsList[index].isLoading, + ), ), ), ], diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index c5aaed7a..de1d5958 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -146,7 +146,7 @@ class _PatientReferralScreen extends State with SingleTic borderWidth: 0), child: Center( child: AppText( - 'Discharged', + TranslationBase.of(context).discharged, fontSize: SizeConfig.textMultiplier * 1.8, color: index == 2 ? Colors.white : Color(0xFF2B353E), fontWeight: FontWeight.w700, diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart index cc2c7136..aff9091e 100644 --- a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -403,7 +403,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { CrossAxisAlignment.start, children: [ AppText( - "Dr ${referredPatient.referringDoctorName}", + "${TranslationBase.of(context).dr} ${referredPatient.referringDoctorName}", fontFamily: 'Poppins', fontWeight: FontWeight.w800, fontSize: 1.5 * diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index 23bbb2b9..4b06b6b9 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -103,7 +103,7 @@ class ReferredPatientScreen extends StatelessWidget { .getReferredPatientItem(index) .doctorImageURL, referralDoctorName: - "Dr. ${model.getReferredPatientItem(index).referralDoctorName}", + "${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}", clinicDescription: model .getReferredPatientItem(index) .referralClinicDescription, diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart index a9ca6c27..a37803dd 100644 --- a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -407,7 +407,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { CrossAxisAlignment.start, children: [ AppText( - "Dr ${referredPatient.referralDoctorName}", + "${TranslationBase.of(context).dr} ${referredPatient.referralDoctorName}", fontFamily: 'Poppins', fontWeight: FontWeight.w800, fontSize: 1.5 * @@ -517,7 +517,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { referredPatient .referredDoctorRemarks.isNotEmpty ? referredPatient.referredDoctorRemarks - : " Not Replied yet", + : TranslationBase.of(context).notRepliedYet, fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 1.6 * SizeConfig.textMultiplier, diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index f42437c2..f972f14f 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1333,8 +1333,9 @@ class TranslationBase { localizedValues["medical"][locale.languageCode]; String get report => localizedValues["report"][locale.languageCode]; - String get discharge => - localizedValues["discharge"][locale.languageCode]; + String get discharge => localizedValues["discharge"][locale.languageCode]; + String get none => localizedValues["none"][locale.languageCode]; + String get notRepliedYet => localizedValues["notRepliedYet"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 0c2fd2f9..dc1a9910 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -85,15 +85,14 @@ class PatientProfileButton extends StatelessWidget { children: [ AppText( !projectsProvider.isArabic ? this.nameLine1 : nameLine2, - color: Colors.black, - /*Color(0xFFB9382C),*/ + color: Color(0xFF2B353E), fontWeight: FontWeight.w600, textAlign: TextAlign.left, fontSize: SizeConfig.textMultiplier * 1.5, ), AppText( !projectsProvider.isArabic ? this.nameLine2 : nameLine1, - color: Colors.black, + color: Color(0xFF2B353E), fontWeight: FontWeight.w600, textAlign: TextAlign.left, fontSize: SizeConfig.textMultiplier * 1.5, @@ -112,14 +111,6 @@ class PatientProfileButton extends StatelessWidget { color: Color(0xffBBBBBB), width: 1, )), - /*boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.2), - spreadRadius: 5, - blurRadius: 7, - offset: Offset(0, 3), // changes position of shadow - ), - ],*/ ), ); }