diff --git a/lib/config/config.dart b/lib/config/config.dart index 748ef31e..11c6dfbc 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -460,7 +460,6 @@ const GENERAL_ID = 'Cs2020@2016\$2958'; const PATIENT_TYPE = 1; const PATIENT_TYPE_ID = 1; -const Color IN_PROGRESS_COLOR = Color(0xFFCC9B14); /// Timer Info const TIMER_MIN = 10; @@ -471,5 +470,6 @@ class AppGlobal { static Color appGreenColor = Color(0xFF359846); static Color appTextColor = Color(0xFF2B353E); static Color scheduleTextColor = Color(0xFF2E303A); + static Color inProgressColor = Color(0xFFCC9B14); } diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart index e8d70786..504462f1 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart @@ -34,7 +34,7 @@ class _DoctorReplyWidgetState extends State { bgColor: widget.reply.infoStatus == 99 ? Color(0xFF2B353E) : widget.reply.infoStatus == 4 - ? IN_PROGRESS_COLOR + ? AppGlobal.inProgressColor : widget.reply.infoStatus == 3 ? Color(0xFFD02127) : AppGlobal.appGreenColor, @@ -78,7 +78,7 @@ class _DoctorReplyWidgetState extends State { color: widget.reply.infoStatus == 99 ? Color(0xFF2B353E) : widget.reply.infoStatus == 4 - ? IN_PROGRESS_COLOR + ? AppGlobal.inProgressColor : widget.reply.infoStatus == 3 ? Color(0xFFD02127) : AppGlobal.appGreenColor, diff --git a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart index 9f3c7810..44ffadc1 100644 --- a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart @@ -200,7 +200,7 @@ class _AddPatientSickLeaveScreenState extends State { Icon( DoctorApp.warning, size: 20, - color: IN_PROGRESS_COLOR, + color: AppGlobal.inProgressColor, ), SizedBox( width: 10, @@ -211,7 +211,7 @@ class _AddPatientSickLeaveScreenState extends State { .recommendedSickLeaveDays, textAlign: TextAlign.start, fontSize: 12, - color: IN_PROGRESS_COLOR, + color: AppGlobal.inProgressColor, ), ), ], diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index 58f9db26..199768b7 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -121,7 +121,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referredPatient.referralStatus == 46 ? AppGlobal.appGreenColor : Colors.red[700], diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 8d9293fe..87fe16ba 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -110,7 +110,7 @@ class MyReferralDetailScreen extends StatelessWidget { fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referralPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referralPatient.referralStatus == 46 || referralPatient 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 66c443c8..d63f856b 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 @@ -156,7 +156,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referredPatient.referralStatus == 46 || referredPatient diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index fe40a7e6..c88a7699 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -11,7 +11,6 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; - import '../../../../widgets/shared/errors/error_message.dart'; class ReferredPatientScreen extends StatefulWidget { @@ -86,18 +85,21 @@ class _ReferredPatientScreenState extends State { referralStatusCode: model .getReferredPatientItem(index) .referralStatus, - patientName: - "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", + patientName: "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", + patientGender: model .getReferredPatientItem(index) .gender, - referredDate: AppDateUtils - .convertDateFromServerFormat( + referredDate: AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.convertStringToDate( model .getReferredPatientItem(index) .referralDate, - "dd/MM/yyyy"), - referredTime: AppDateUtils + ), + isMonthShort: true + ), + referredTime: + AppDateUtils .convertDateFromServerFormat( model .getReferredPatientItem(index) @@ -121,8 +123,8 @@ class _ReferredPatientScreenState extends State { doctorAvatar: model .getReferredPatientItem(index) .doctorImageURL, - referralDoctorName: - "${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}", + 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 401da0aa..6165ce1b 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 @@ -15,7 +15,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; - import '../../../../routes.dart'; class ReferredPatientDetailScreen extends StatelessWidget { @@ -156,7 +155,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referredPatient.referralStatus == 46 ? AppGlobal.appGreenColor : Colors.red[700], diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index fe129c31..0bac582f 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -64,8 +64,8 @@ class MyScheduleWidget extends StatelessWidget { ), ), Container( - width: MediaQuery.of(context).size.width * 0.70, - height: MediaQuery.of(context).size.height * 0.18, + width: MediaQuery.of(context).size.width * 0.70, + // height: MediaQuery.of(context).size.height * 0.16, child: CardWithBgWidget( padding: 12, marginLeft: 8, diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 3935bb6b..6641c253 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -1,13 +1,11 @@ import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; +import '../../util/helpers.dart'; class PatientReferralItemWidget extends StatelessWidget { final String referralStatus; @@ -51,7 +49,6 @@ class PatientReferralItemWidget extends StatelessWidget { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); return Container( margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 0.0), @@ -60,7 +57,8 @@ class PatientReferralItemWidget extends StatelessWidget { Container( child: CardWithBgWidget( bgColor: referralStatusCode == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor + //Color(0xffc4aa54) : referralStatusCode == 2 ? AppGlobal.appGreenColor : referralStatusCode == 46 @@ -81,11 +79,11 @@ class PatientReferralItemWidget extends StatelessWidget { AppText( referralStatus != null ? referralStatus : "", fontFamily: 'Poppins', - fontSize: 10.0, - letterSpacing: -0.4, + fontSize: 12.0, + letterSpacing: -0.48, fontWeight: FontWeight.w600, color: referralStatusCode == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referralStatusCode == 2 ? AppGlobal.appGreenColor : referralStatusCode == 46 @@ -104,11 +102,14 @@ class PatientReferralItemWidget extends StatelessWidget { ) ], ), + SizedBox( + height: 7, + ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - patientName ?? "", + Helpers.convertToTitleCase(patientName ?? ""), fontSize: 16.0, fontWeight: FontWeight.w600, color: Color(0xff2E303A), @@ -126,7 +127,7 @@ class PatientReferralItemWidget extends StatelessWidget { : Icon(DoctorApp.female_1, color: Color(0xffF0448D)), SizedBox( - width: 4, + width: 50, ), AppText( referredTime ?? "", @@ -134,13 +135,12 @@ class PatientReferralItemWidget extends StatelessWidget { fontWeight: FontWeight.w600, fontSize: 12.0, color: Color(0XFF575757), - letterSpacing: 0.48, - ) + letterSpacing: -0.48, + ), ], ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( @@ -163,30 +163,34 @@ class PatientReferralItemWidget extends StatelessWidget { ], ), ), - Row( - children: [ - AppText( - nationality != null ? nationality : "", - fontWeight: FontWeight.w600, - color: Color(0xFF2E303A), - fontSize: 10.0, - letterSpacing: -0.4, - ), - nationalityFlag != null - ? ClipRRect( - borderRadius: BorderRadius.circular(20.0), - child: Image.network( - nationalityFlag, - height: 25, - width: 30, - errorBuilder: (BuildContext context, - Object exception, - StackTrace stackTrace) { - return Text(''); - }, - )) - : SizedBox() - ], + Padding( + padding: const EdgeInsets.only(right: 0.1), + child: Row( + children: [ + AppText( + nationality != null ? nationality : "", + fontWeight: FontWeight.w600, + color: Color(0xFF2E303A), + fontSize: 10.0, + letterSpacing: -0.4, + ), + nationalityFlag != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + nationalityFlag, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text(''); + }, + ) + ) + : SizedBox() + ], + ), ) ], ), @@ -198,7 +202,7 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(left: 10, right: 0), + margin: EdgeInsets.only(left: 3, right: 0, top: 0.1), child: Image.asset( isReferral ? 'assets/images/patient/ic_ref_arrow_up.png' @@ -209,8 +213,8 @@ class PatientReferralItemWidget extends StatelessWidget { ), Container( margin: EdgeInsets.only( - left: 0, top: 25, right: 0, bottom: 0), - padding: EdgeInsets.only(left: 4.0, right: 4.0), + left: 0, top: 18, right: 0, bottom: 0), + padding: EdgeInsets.only(left: 4.0, right: 1.0), child: Container( width: 40, height: 40, @@ -219,8 +223,8 @@ class PatientReferralItemWidget extends StatelessWidget { borderRadius: BorderRadius.circular(20.0), child: Image.network( doctorAvatar, - height: 25, - width: 30, + height: 28, + width: 28, errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) { @@ -241,7 +245,7 @@ class PatientReferralItemWidget extends StatelessWidget { flex: 4, child: Container( margin: EdgeInsets.only( - left: 10, top: 25, right: 10, bottom: 0), + left: 10, top: 17, bottom: 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [