From 9f35f53fa280f4691866c508b36e644dc7798aee Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 14 Apr 2021 16:00:11 +0300 Subject: [PATCH] re-design --- .../profile/UCAF/UCAF-input-screen.dart | 30 ++- .../referral/my-referral-detail-screen.dart | 217 +++++++++++++++++- .../referral/my-referral-patient-screen.dart | 18 +- .../referral/referred-patient-screen.dart | 20 +- ...ent-profile-header-new-design-app-bar.dart | 4 +- .../patient-profile-header-new-design.dart | 4 +- 6 files changed, 264 insertions(+), 29 deletions(-) diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index c39464bd..fa94d3fa 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -419,16 +419,26 @@ class _UCAFInputScreenState extends State { ), ], ) - : Container( - child: Center( - child: AppText( - model.patientVitalSigns == null - ? TranslationBase.of(context).vitalSignEmptyMsg - : TranslationBase.of(context).chiefComplaintEmptyMsg, - fontWeight: FontWeight.normal, - color: HexColor("#B8382B"), - fontSize: SizeConfig.textMultiplier * 2.5, - ), + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + model.patientVitalSigns == null + ? TranslationBase.of(context).vitalSignEmptyMsg + : TranslationBase.of(context).chiefComplaintEmptyMsg, + fontWeight: FontWeight.normal, + color: HexColor("#B8382B"), + fontSize: SizeConfig.textMultiplier * 2.5, + ), + ) + ], ), ), ), 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 53135600..dcba8fba 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -90,6 +90,215 @@ class MyReferralDetailScreen extends StatelessWidget { ), ]), ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + pendingReferral.patientDetails.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AppText( + pendingReferral.referralStatus != null ? pendingReferral.referralStatus : "", + fontFamily: 'Poppins', + fontSize: 1.9 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700, + color: pendingReferral.referralStatus != null + ? pendingReferral.referralStatus == 'Pending' + ? Color(0xffc4aa54) + : pendingReferral.referralStatus == 'Accepted' + ? Colors.green[700] + : Colors.red[700] + : Colors.grey[500], + ), + AppText( + pendingReferral.referredOn.split(" ")[0], + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Color(0XFF28353E), + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).fileNumber, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + "${pendingReferral.patientID}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + AppText( + pendingReferral.referredOn.split(" ")[1], + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).referredFrom, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + pendingReferral.isReferralDoctorSameBranch + ? TranslationBase.of(context).sameBranch + : TranslationBase.of(context) + .otherBranch, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).remarks + " : ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + pendingReferral.remarksFromSource, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + ], + ), + ), + Row( + children: [ + AppText( + pendingReferral + .patientDetails.nationalityName != null ? pendingReferral + .patientDetails.nationalityName : "", + fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), + fontSize: 1.4 * SizeConfig.textMultiplier, + ), + pendingReferral.nationalityFlagUrl != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + pendingReferral.nationalityFlagUrl, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 10, right: 0), + child: Image.asset('assets/images/patient/ic_ref_arrow_up.png', + height: 50, + width: 30, + ), + ), + Container( + margin: EdgeInsets.only( + left: 0, top: 25, right: 0, bottom: 0), + padding: EdgeInsets.only(left: 4.0, right: 4.0), + child: Container( + width: 40, + height: 40, + child: CircleAvatar( + radius: 25.0, + backgroundImage: NetworkImage(pendingReferral.doctorImageUrl), + backgroundColor: Colors.transparent, + ), + ), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 10, top: 25, right: 10, bottom: 0), + child: Column( + children: [ + AppText( + pendingReferral.referredByDoctorInfo, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), ], ), ), @@ -103,7 +312,7 @@ class MyReferralDetailScreen extends StatelessWidget { SizedBox( height: 16, ), - Padding( + /*Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: AppText( @@ -112,8 +321,8 @@ class MyReferralDetailScreen extends StatelessWidget { fontWeight: FontWeight.bold, fontSize: 16, ), - ), - PatientReferralItemWidget( + ),*/ + /*PatientReferralItemWidget( referralStatus: pendingReferral.referralStatus, patientName: pendingReferral.patientName, patientGender: @@ -135,7 +344,7 @@ class MyReferralDetailScreen extends StatelessWidget { referralDoctorName: pendingReferral.referredByDoctorInfo, clinicDescription: null, - ), + ),*/ Padding( padding: const EdgeInsets.symmetric(horizontal: 16), diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index bda285fe..1d9bbbfd 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -27,9 +27,21 @@ class MyReferralPatientScreen extends StatelessWidget { appBarTitle: TranslationBase.of(context).referPatient, body: model.pendingReferral == null || model.pendingReferral.length == 0 ? Center( - child: AppText( - TranslationBase.of(context).referralEmptyMsg, - color: Theme.of(context).errorColor, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).referralEmptyMsg, + color: Theme.of(context).errorColor, + ), + ) + ], ), ) : SingleChildScrollView( diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index 7f59b0f8..0c8732a9 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -20,23 +20,27 @@ class ReferredPatientScreen extends StatelessWidget { body: model.listMyReferredPatientModel == null || model.listMyReferredPatientModel.length == 0 ? Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), child: AppText( TranslationBase.of(context).referralEmptyMsg, color: Theme.of(context).errorColor, ), ) + ], + ), + ) : SingleChildScrollView( child: Container( child: Column( children: [ - /*Container( - height: 75, - child: AppText( - "This is where upper view for avatar.. etc placed", - fontWeight: FontWeight.normal, - fontSize: 16, - ), - ),*/ const Divider( color: Color(0xffCCCCCC), height: 1, diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 5d67fd81..7ed8579b 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -210,11 +210,11 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget Row( children: [ AppText( - patient.nationalityName ?? patient.nationality??'', + patient.nationalityName ?? patient.nationality?? patient.nationalityId ?? '', fontWeight: FontWeight.bold, fontSize: 12, ), - patient.nationality != null + patient.nationalityFlagURL != null ? ClipRRect( borderRadius: BorderRadius.circular(20.0), child: Image.network( diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 2453f382..0349fb6c 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -208,11 +208,11 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { Row( children: [ AppText( - patient.nationalityName ?? patient.nationality??'', + patient.nationalityName ?? patient.nationality?? patient.nationalityId ?? '', fontWeight: FontWeight.bold, fontSize: 12, ), - patient.nationality != null + patient.nationalityFlagURL != null ? ClipRRect( borderRadius: BorderRadius.circular(20.0), child: Image.network(