From c24bb604d45187166682a038e062c2a53f249de2 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 2 May 2021 16:53:33 +0300 Subject: [PATCH] DashBoard design fix --- lib/client/base_app_client.dart | 2 +- lib/config/config.dart | 5 +- lib/screens/home/home_page_card.dart | 4 +- lib/screens/home/home_screen.dart | 311 +++++++++++------- .../prescription/add_prescription_form.dart | 17 +- lib/widgets/auth/verfiy_account.dart | 2 +- 6 files changed, 217 insertions(+), 124 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 83dfad00..07a19747 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -147,7 +147,7 @@ class BaseAppClient { : SETUP_ID; } - body['VersionID'] = 5.8; + body['VersionID'] = 5.9; body['Channel'] = CHANNEL; body['LanguageID'] = languageID == 'ar' ? 1 : 2; diff --git a/lib/config/config.dart b/lib/config/config.dart index 9596a029..b21ee8ed 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -280,7 +280,8 @@ const GET_INSURANCE_IN_PATIENT = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; -const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient"; +const GET_MY_OUT_PATIENT = + "Services/DoctorApplication.svc/REST/GetMyOutPatient"; var selectedPatientType = 1; @@ -336,7 +337,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 5.8; +const VERSION_ID = 5.9; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/screens/home/home_page_card.dart b/lib/screens/home/home_page_card.dart index 216a8c3f..ffe56fd0 100644 --- a/lib/screens/home/home_page_card.dart +++ b/lib/screens/home/home_page_card.dart @@ -28,7 +28,7 @@ class HomePageCard extends StatelessWidget { return InkWell( onTap: onTap, child: Container( - width: width != null ? width : MediaQuery.of(context).size.width * 0.29, + width: width != null ? width : MediaQuery.of(context).size.width * 0.28, height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait @@ -41,7 +41,7 @@ class HomePageCard extends StatelessWidget { ? color : HexColor('#050705').withOpacity(opacity) : Colors.white, - borderRadius: BorderRadius.circular(15.0), + borderRadius: BorderRadius.circular(17.0), border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index d3d2c827..36f86c85 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -222,7 +222,7 @@ class _HomeScreenState extends State { return DropdownMenuItem( child: AppText( item.clinicName, - textAlign: TextAlign.right, + textAlign: TextAlign.left, ), value: item.clinicID, ); @@ -470,7 +470,7 @@ class _HomeScreenState extends State { scrollDirection: Axis.horizontal, children: [ HomePageCard( - color: Colors.red[800], + color: Color(0xffD02127), margin: EdgeInsets.all(5), child: Column( mainAxisAlignment: @@ -481,10 +481,25 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.only( top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.inpatient, - size: 32, - color: Colors.white, + child: Stack( + children: [ + Positioned( + bottom: 0.1, + right: 0.5, + width: 23.0, + height: 25.0, + child: Icon( + DoctorApp.inpatient, + size: 65, + color: Colors.white12, + ), + ), + Icon( + DoctorApp.inpatient, + size: 32, + color: Colors.white, + ), + ], )), Container( padding: EdgeInsets.all(10), @@ -528,10 +543,26 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.only( top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.arrival_patients, - size: 35, - color: Colors.black, + child: Stack( + children: [ + Positioned( + bottom: 0.1, + right: 0.5, + width: 23.0, + height: 25.0, + child: Icon( + DoctorApp + .arrival_patients, + size: 65, + color: Colors.white38, + ), + ), + Icon( + DoctorApp.arrival_patients, + size: 35, + color: Colors.black, + ), + ], )), Container( padding: EdgeInsets.all(10), @@ -546,25 +577,30 @@ class _HomeScreenState extends State { ), hasBorder: false, onTap: () { - - String date = DateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day ), - 'yyyy-MM-dd'); + String date = + DateUtils.convertDateToFormat( + DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day), + 'yyyy-MM-dd'); Navigator.push( context, MaterialPageRoute( - builder: (context) => - OutPatientsScreen( - patientSearchRequestModel: - PatientSearchRequestModel(from: date, to: date,doctorID: authProvider.doctorProfile.doctorID) - ), + builder: (context) => OutPatientsScreen( + patientSearchRequestModel: + PatientSearchRequestModel( + from: date, + to: date, + doctorID: authProvider + .doctorProfile + .doctorID)), )); }, ), HomePageCard( - color: Colors.black, + color: Color(0xff2B353E), margin: EdgeInsets.all(5), child: Column( mainAxisAlignment: @@ -575,10 +611,26 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.only( top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.referral_1, - size: 35, - color: Colors.white, + child: Stack( + children: [ + Positioned( + bottom: 0.1, + right: 0.5, + width: 23.0, + height: 25.0, + child: Icon( + DoctorApp.referral_1, + size: 65, + color: Colors.white10 + .withOpacity(0.1), + ), + ), + Icon( + DoctorApp.referral_1, + size: 35, + color: Colors.white, + ), + ], )), Container( padding: EdgeInsets.all(10), @@ -603,86 +655,86 @@ class _HomeScreenState extends State { ); }, ), + // HomePageCard( + // color: Colors.red[800], + // margin: EdgeInsets.all(5), + // child: Column( + // mainAxisAlignment: + // MainAxisAlignment.center, + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Padding( + // padding: EdgeInsets.only( + // top: 10, left: 10, right: 0), + // child: Icon( + // DoctorApp.discharge_patients, + // size: 35, + // color: Colors.white, + // )), + // Container( + // padding: EdgeInsets.all(10), + // child: AppText( + // 'Discharged Patients', + // color: Colors.white, + // textAlign: TextAlign.start, + // fontSize: 15, + // )) + // ], + // ), + // hasBorder: false, + // onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // DischargedPatient(), + // // MyReferredPatient(), + // ), + // ); + // }, + // ), + // HomePageCard( + // color: Colors.grey[300], + // margin: EdgeInsets.all(5), + // child: Column( + // mainAxisAlignment: + // MainAxisAlignment.center, + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Padding( + // padding: EdgeInsets.only( + // top: 10, left: 10, right: 0), + // child: Icon( + // DoctorApp.referral_discharge, + // size: 35, + // color: Colors.black, + // )), + // Container( + // padding: EdgeInsets.all(10), + // child: AppText( + // 'Referral Discharged', + // color: Colors.black, + // textAlign: TextAlign.start, + // fontSize: 15, + // )) + // ], + // ), + // hasBorder: false, + // onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // ReferralDischargedPatientPage(), + // // MyReferredPatient(), + // ), + // ); + // }, + // ), HomePageCard( - color: Colors.red[800], - margin: EdgeInsets.all(5), - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.discharge_patients, - size: 35, - color: Colors.white, - )), - Container( - padding: EdgeInsets.all(10), - child: AppText( - 'Discharged Patients', - color: Colors.white, - textAlign: TextAlign.start, - fontSize: 15, - )) - ], - ), - hasBorder: false, - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - DischargedPatient(), - // MyReferredPatient(), - ), - ); - }, - ), - HomePageCard( - color: Colors.grey[300], - margin: EdgeInsets.all(5), - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.referral_discharge, - size: 35, - color: Colors.black, - )), - Container( - padding: EdgeInsets.all(10), - child: AppText( - 'Referral Discharged', - color: Colors.black, - textAlign: TextAlign.start, - fontSize: 15, - )) - ], - ), - hasBorder: false, - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - ReferralDischargedPatientPage(), - // MyReferredPatient(), - ), - ); - }, - ), - HomePageCard( - color: Colors.black, + color: Color(0xffD02127), margin: EdgeInsets.all(5), child: Column( mainAxisAlignment: @@ -693,10 +745,25 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.only( top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.search, - size: 32, - color: Colors.white, + child: Stack( + children: [ + Positioned( + bottom: 0.1, + right: 0.5, + width: 23.0, + height: 25.0, + child: Icon( + DoctorApp.search, + size: 65, + color: Colors.white10, + ), + ), + Icon( + DoctorApp.search, + size: 35, + color: Colors.white, + ), + ], )), Container( padding: EdgeInsets.all(10), @@ -720,7 +787,7 @@ class _HomeScreenState extends State { }, ), HomePageCard( - color: Colors.red[800], + color: Color(0xffC9C9C9), margin: EdgeInsets.all(5), child: Column( mainAxisAlignment: @@ -731,17 +798,33 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.only( top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.search_medicines, - size: 32, - color: Colors.white, + child: Stack( + children: [ + Positioned( + bottom: 0.1, + right: 0.5, + width: 23.0, + height: 25.0, + child: Icon( + DoctorApp + .search_medicines, + color: Colors.black12, + size: 65, + ), + ), + Icon( + DoctorApp.search_medicines, + size: 40, + color: Color(0xff2B353E), + ), + ], )), Container( padding: EdgeInsets.all(10), child: AppText( TranslationBase.of(context) .searchMedicine, - color: Colors.white, + color: Color(0xff2B353E), textAlign: TextAlign.start, fontSize: 13, )) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index baebe130..07bf9d81 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -564,10 +564,17 @@ class _PrescriptionFormWidgetState extends State { TranslationBase.of( context) .unit, - units != null - ? units[ + model.itemMedicineListUnit + .length == + 1 + ? model.itemMedicineListUnit[ + 0][ 'description'] - : null, + : units != + null + ? units[ + 'description'] + : null, true), enabled: false), ), @@ -1368,7 +1375,9 @@ class _PrescriptionFormWidgetState extends State { // .toList() // .join(' '), dose: strengthController.text, - doseUnit: units['parameterCode'].toString(), + doseUnit: model.itemMedicineListUnit.length == 1 + ? model.itemMedicineListUnit[0]['parameterCode'] + : units['parameterCode'].toString(), patient: widget.patient, doseTimeIn: doseTime['id'].toString(), model: widget.model, diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 535efcf5..1574d3d4 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -93,7 +93,7 @@ class _VerifyAccountState extends State { return Form( key: verifyAccountForm, child: Container( - width: SizeConfig.realScreenWidth * 0.90, + width: SizeConfig.realScreenWidth * 0.95, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [