From 99ef89fa163ed601c636aee24893361c3a9261ad Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 15 Apr 2021 13:31:12 +0300 Subject: [PATCH 1/3] Hot Fixes --- .../medical-file/medical_file_page.dart | 25 +-- .../insurance_approval_screen_patient.dart | 159 +++++++++--------- .../entity_list_checkbox_search_widget.dart | 4 +- lib/screens/procedures/procedure_screen.dart | 19 ++- 4 files changed, 118 insertions(+), 89 deletions(-) diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 00648473..7c962d9d 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header- import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/Text.dart'; 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/doctor_card.dart'; @@ -160,19 +161,21 @@ class _MedicalFilePageState extends State { isPrescriptions: true, ), ); - }) - : Column( - children: [ - Container( - child: AppText( - 'THERES NO MEDICAL FILE FOR THIS Patient', + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, ), - ), - SizedBox( - height: 400, - ) - ], + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts('No Medical File Found'), + ) + ], + ), ) ], ), diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 6ef7ca9c..f6a7dbee 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -54,87 +54,94 @@ class _InsuranceApprovalScreenNewState appBarTitle: TranslationBase.of(context).approvals, body: SingleChildScrollView( child: Container( - margin: EdgeInsets.only( - left: SizeConfig.screenWidth * 0.004, - right: SizeConfig.screenWidth * 0.004, - top: SizeConfig.screenWidth * 0.04, - ), - child: model.insuranceApproval.length != 0 - ? Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - children: [ - AppText( - 'Insurance', - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - 'Approvals', - fontSize: 30.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], + margin: EdgeInsets.only( + left: SizeConfig.screenWidth * 0.004, + right: SizeConfig.screenWidth * 0.004, + top: SizeConfig.screenWidth * 0.04, + ), + child: model.insuranceApproval.length != 0 + ? Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Insurance', + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + 'Approvals', + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), ), - ), - ...List.generate( - model.insuranceApproval.length, - (index) => Container( - child: InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - InsuranceApprovalsDetails( - patient: patient, - indexInsurance: index, - )), - ); - }, - child: DoctorCardInsurance( - patientOut: model - .insuranceApproval[index].patientDescription, - profileUrl: - model.insuranceApproval[index].doctorImage, - clinic: model.insuranceApproval[index].clinicName, - doctorName: - model.insuranceApproval[index].doctorName, - branch: model.insuranceApproval[index].approvalNo - .toString(), - isPrescriptions: true, - approvalStatus: model.insuranceApproval[index] - .approvalStatusDescption ?? - '', - branch2: - model.insuranceApproval[index].projectName, + ...List.generate( + model.insuranceApproval.length, + (index) => Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InsuranceApprovalsDetails( + patient: patient, + indexInsurance: index, + )), + ); + }, + child: DoctorCardInsurance( + patientOut: model.insuranceApproval[index] + .patientDescription, + profileUrl: + model.insuranceApproval[index].doctorImage, + clinic: + model.insuranceApproval[index].clinicName, + doctorName: + model.insuranceApproval[index].doctorName, + branch: model + .insuranceApproval[index].approvalNo + .toString(), + isPrescriptions: true, + approvalStatus: model.insuranceApproval[index] + .approvalStatusDescption ?? + '', + branch2: + model.insuranceApproval[index].projectName, + ), ), ), ), + ], + ) + : 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: Texts('No Insurance Approval Found'), + ) + ], ), - ], - ) - : Column( - children: [ - Container( - height: 200, - width: double.infinity, - child: Center( - child: Text("No Insurance Approvals Found"))) - ], - ), - ), + )), ), ), ); diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 32f02057..0ca2e360 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -1,3 +1,5 @@ +import 'dart:ffi'; + import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; @@ -69,7 +71,7 @@ class _EntityListCheckboxSearchWidgetState NetworkBaseView( baseViewModel: widget.model, child: Container( - height: MediaQuery.of(context).size.height * 0.65, + height: MediaQuery.of(context).size.height * 0.75, child: Center( child: Container( margin: EdgeInsets.only(top: 15), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index f07f4a92..1e6d55a8 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; @@ -190,7 +191,23 @@ class ProcedureScreen extends StatelessWidget { ) ], ), - ) + ), + if (model.state == ViewState.ErrorLocal) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(22.0), + child: Texts(model.error), + ) + ], + ), + ), ], ), ), From ffabb8883c2528d817be867be25692a3a132e066 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 15 Apr 2021 14:22:37 +0300 Subject: [PATCH 2/3] fix in the verification methods and radiology page --- lib/core/service/radiology_service.dart | 2 +- lib/widgets/auth/verification_methods.dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/core/service/radiology_service.dart b/lib/core/service/radiology_service.dart index 9d60c4ac..c8c02fd0 100644 --- a/lib/core/service/radiology_service.dart +++ b/lib/core/service/radiology_service.dart @@ -33,7 +33,7 @@ class RadiologyService extends BaseService { patient: patient, onSuccess: (dynamic response, int statusCode) { finalRadiologyList.clear(); - response['FinalRadiologyList'].forEach((radiology) { + response['ListRAD'].forEach((radiology) { finalRadiologyList.add(FinalRadiology.fromJson(radiology)); }); }, onFailure: (String error, int statusCode) { diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 42028dcc..b4d39894 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/otp/sms-popup.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:intl/intl.dart'; @@ -24,6 +25,7 @@ import 'package:provider/provider.dart'; import '../../config/size_config.dart'; import '../../core/viewModel/auth_view_model.dart'; +import '../../landing_page.dart'; import '../../routes.dart'; import '../../util/dr_app_shared_pref.dart'; import '../../util/helpers.dart'; @@ -858,7 +860,7 @@ class _VerificationMethodsState extends State { sharedPref.setObj(DOCTOR_PROFILE, profile); projectsProvider.isLogin = true; - Navigator.of(context).popAndPushNamed(HOME); + Navigator.pushAndRemoveUntil(context, FadePage(page: LandingPage(),), (r) => false); } getDocProfiles(ClinicModel clinicInfo, authProv) { From 2e07e34c1146edc73c3104deb5ec2405a7e57195 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 15 Apr 2021 15:02:30 +0300 Subject: [PATCH 3/3] Hot Fixes --- lib/widgets/shared/doctor_card.dart | 84 ++++++++++--------- lib/widgets/shared/doctor_card_insurance.dart | 33 +++++--- 2 files changed, 65 insertions(+), 52 deletions(-) diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index df5cbe33..78576a46 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -29,7 +29,9 @@ class DoctorCard extends StatelessWidget { this.invoiceNO, this.onTap, this.appointmentDate, - this.orderNo, this.isPrescriptions=false, this.clinic}); + this.orderNo, + this.isPrescriptions = false, + this.clinic}); @override Widget build(BuildContext context) { @@ -69,13 +71,13 @@ class DoctorCard extends StatelessWidget { fontWeight: FontWeight.w600, fontSize: 14, ), - if(!isPrescriptions) - Texts( - '${DateUtils.getHour(appointmentDate)}', - fontWeight: FontWeight.w600, - color: Colors.grey[700], - fontSize: 14, - ), + if (!isPrescriptions) + Texts( + '${DateUtils.getHour(appointmentDate)}', + fontWeight: FontWeight.w600, + color: Colors.grey[700], + fontSize: 14, + ), ], ), ), @@ -106,7 +108,8 @@ class DoctorCard extends StatelessWidget { Row( children: [ Texts( - 'order No:', + TranslationBase.of(context).orderNo + + ": ", color: Colors.grey[500], fontSize: 14, ), @@ -120,7 +123,9 @@ class DoctorCard extends StatelessWidget { Row( children: [ Texts( - 'Invoice:', + TranslationBase.of(context) + .invoiceNo + + ": ", fontSize: 14, color: Colors.grey[500], ), @@ -130,34 +135,36 @@ class DoctorCard extends StatelessWidget { ) ], ), - if(clinic!=null) - Row( - children: [ - Texts( - 'Clinic: ', - color: Colors.grey[500], - fontSize: 14, - ), - Texts( - clinic, - fontSize: 14, - ) - ], - ), - if(branch!=null) - Row( - children: [ - Texts( - 'Branch: ', - fontSize: 14, - color: Colors.grey[500], - ), - Texts( - branch, - fontSize: 14, - ) - ], - ) + if (clinic != null) + Row( + children: [ + Texts( + TranslationBase.of(context).clinic + + ": ", + color: Colors.grey[500], + fontSize: 14, + ), + Texts( + clinic, + fontSize: 14, + ) + ], + ), + if (branch != null) + Row( + children: [ + Texts( + TranslationBase.of(context).branch + + ": ", + fontSize: 14, + color: Colors.grey[500], + ), + Texts( + branch, + fontSize: 14, + ) + ], + ) ]), ), ), @@ -167,7 +174,6 @@ class DoctorCard extends StatelessWidget { ], ), ), - ], ), ], diff --git a/lib/widgets/shared/doctor_card_insurance.dart b/lib/widgets/shared/doctor_card_insurance.dart index fce3e316..e305a91d 100644 --- a/lib/widgets/shared/doctor_card_insurance.dart +++ b/lib/widgets/shared/doctor_card_insurance.dart @@ -1,5 +1,6 @@ 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/patients/profile/large_avatar.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; @@ -105,7 +106,7 @@ class DoctorCardInsurance extends StatelessWidget { Expanded( child: Texts( doctorName, - fontWeight: FontWeight.w700, + bold: true, )), ], ), @@ -155,15 +156,18 @@ class DoctorCardInsurance extends StatelessWidget { Row( children: [ Texts( - 'Clinic: ', + TranslationBase.of(context).clinic + + ": ", + color: Colors.grey[500], + fontSize: 14, //fontWeight: FontWeight.w600, //color: Colors.grey[500], ), Expanded( child: Texts( clinic, - fontWeight: FontWeight.w700, - fontSize: 15.0, + //fontWeight: FontWeight.w700, + fontSize: 14.0, ), ) ], @@ -172,26 +176,30 @@ class DoctorCardInsurance extends StatelessWidget { Row( children: [ Texts( - 'Branch:', - //color: Colors.grey[500], + TranslationBase.of(context).branch + + ": ", + fontSize: 14, + color: Colors.grey[500], ), Texts( branch2, - fontWeight: FontWeight.w700, - fontSize: 15.0, + fontSize: 14.0, ) ], ), Row( children: [ Texts( - 'Approval No: ', + TranslationBase.of(context) + .approvalNo + + ": ", + fontSize: 14, + color: Colors.grey[500], //color: Colors.grey[500], ), Texts( branch, - fontWeight: FontWeight.w700, - fontSize: 15.0, + fontSize: 14.0, ) ], ), @@ -202,8 +210,7 @@ class DoctorCardInsurance extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 15.0), child: Icon( - DoctorApp.view, - size: 22.0, + EvaIcons.eye, ), ) ],