From 0ed3481b422709709f8e9c220571b67719324b5e Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Thu, 4 Jun 2020 16:10:29 +0300 Subject: [PATCH 1/4] Localization comment --- lib/config/localized_values.dart | 14 +++++++++++ lib/screens/dashboard_screen.dart | 31 +++++++++++++----------- lib/util/translations_delegate_base.dart | 14 ++++++++++- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 727bcee4..38212262 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -19,6 +19,20 @@ const Map> localizedValues = { 'maxResponseTime':{'en': 'Max Response Time', 'ar' : 'الوقت الأقصى للرد'}, 'clinicDetailsandRemarks':{'en': 'Clinic Details and Remarks', 'ar' : 'ملاحضات وتفاصيل العيادة'}, 'answerSuggestions':{'en': 'Answer/Suggestions', 'ar' : 'ملاحضات وتفاصيل العيادة'}, + 'outPatients':{'en': 'Out-Patients', 'ar' : 'ةالمريض الخارجي'}, + 'searchPatient':{'en': 'Search Patient', 'ar' : 'البحث عن مريض'}, + 'labResult':{'en': 'Lab Result', 'ar' : 'نتيجة المختبر'}, + 'todayStatistics':{'en': 'Today Statistics', 'ar' : 'إحصائيات اليوم'}, + 'arrived':{'en': 'Arrived', 'ar' : 'وصل'}, + 'er':{'en': 'ER', 'ar' : 'حالة طوارئ'}, + 'walkIn':{'en': 'Walk-in', 'ar' : 'ادخل'}, + 'notArrived':{'en': 'Not Arrived', 'ar' : 'لم يصل'}, + 'radiology':{'en': 'Radiology', 'ar' : 'الأشعة'}, + 'referral':{'en': 'Referral', 'ar' : 'االإحالة'}, + 'inPatient':{'en': 'In-Patient', 'ar' : 'االمريض الداخلي'}, + 'operations':{'en': 'Operations', 'ar' : 'عمليات'}, + 'patientServices':{'en': 'Patient Services', 'ar' : 'خدمات المرضى'}, + }; diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 79c492a8..33f272c0 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -50,7 +50,8 @@ class _DashboardScreenState extends State { child: Container( margin: EdgeInsets.all(10), child: AppText( - "Today's Statistics", + + TranslationBase.of(context).todayStatistics, fontWeight: FontWeight.bold, ), alignment: Alignment.centerLeft, @@ -76,7 +77,7 @@ class _DashboardScreenState extends State { AppText("38", fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier * 4), - AppText("Out-Patients", + AppText(TranslationBase.of(context).outPatients, fontWeight: FontWeight.normal, fontSize: SizeConfig.textMultiplier * 1.2, color: Colors.grey[800]), @@ -103,12 +104,12 @@ class _DashboardScreenState extends State { children: [ Expanded( child: DashboardItemTexts( - "Arrived", + TranslationBase.of(context).arrived, "23", )), Expanded( child: DashboardItemTexts( - "Not Arrived", + TranslationBase.of(context).notArrived, "23", ), ), @@ -122,12 +123,13 @@ class _DashboardScreenState extends State { children: [ Expanded( child: DashboardItemTexts( - "ER", + TranslationBase.of(context).er, "23", )), Expanded( child: DashboardItemTexts( - "Walk-in", + + TranslationBase.of(context).walkIn, "23", )), ], @@ -148,7 +150,7 @@ class _DashboardScreenState extends State { child: new DashboardItemIconText( DoctorApp.home_icon, "08", - "Lab Result", + TranslationBase.of(context).labResult, backgroundColor: Colors.black45, // valueFontColor: Colors.white, // titleFontColor: Colors.white, @@ -160,7 +162,8 @@ class _DashboardScreenState extends State { child: new DashboardItemIconText( DoctorApp.home_icon, "10", - "Radiology", + + TranslationBase.of(context).radiology, backgroundColor: Colors.black45, // valueFontColor: Colors.white, // titleFontColor: Colors.white, @@ -171,7 +174,7 @@ class _DashboardScreenState extends State { child: new DashboardItemIconText( DoctorApp.home_icon, "05", - "Referral", + TranslationBase.of(context).referral, backgroundColor: Colors.black45, // valueFontColor: Colors.white, // titleFontColor: Colors.white, @@ -190,7 +193,7 @@ class _DashboardScreenState extends State { child: new DashboardItemIconText( DoctorApp.home_icon, "23", - "In-Patient", + TranslationBase.of(context).inPatient, showBorder: true, backgroundColor: Colors.red[900], ), @@ -200,7 +203,7 @@ class _DashboardScreenState extends State { child: new DashboardItemIconText( DoctorApp.home_icon, "23", - "Operations", + TranslationBase.of(context).operations, showBorder: true, backgroundColor: Colors.red[900], )), @@ -212,7 +215,7 @@ class _DashboardScreenState extends State { child: Container( margin: EdgeInsets.all(10), child: AppText( - "Patient Services", + TranslationBase.of(context).patientServices, fontWeight: FontWeight.bold, ), alignment: Alignment.centerLeft, @@ -229,7 +232,7 @@ class _DashboardScreenState extends State { child: DashboardItemIconText( DoctorApp.home_icon, "", - "Search Patient", + TranslationBase.of(context).searchPatient, showBorder: true, backgroundColor: Colors.white, valueFontColor: Colors.black, @@ -259,7 +262,7 @@ class _DashboardScreenState extends State { child: DashboardItemIconText( DoctorApp.home_icon, "", - "Doctor Reply", + TranslationBase.of(context).doctorReply, showBorder: true, backgroundColor: Colors.white, valueFontColor: Colors.black, diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index f6fc660a..c62f9cb7 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -48,7 +48,19 @@ class TranslationBase { String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; String get clinicDetailsandRemarks=> localizedValues['clinicDetailsandRemarks'][locale.languageCode]; String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; - + String get outPatients => localizedValues['outPatients'][locale.languageCode]; + String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; + String get labResult => localizedValues['labResult'][locale.languageCode]; + String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; + String get arrived => localizedValues['arrived'][locale.languageCode]; + String get er => localizedValues['er'][locale.languageCode]; + String get walkIn => localizedValues['walkIn'][locale.languageCode]; + String get notArrived => localizedValues['notArrived'][locale.languageCode]; + String get radiology => localizedValues['radiology'][locale.languageCode]; + String get referral => localizedValues['referral'][locale.languageCode]; + String get inPatient => localizedValues['inPatient'][locale.languageCode]; + String get operations => localizedValues['inPatient'][locale.languageCode]; + String get patientServices => localizedValues['patientServices'][locale.languageCode]; } From cc2c0f9a1e06f2d748d53089854ce9fc6d4ac272 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Sun, 7 Jun 2020 12:15:38 +0300 Subject: [PATCH 2/4] Modify Patiant screen List style --- lib/screens/patients/patients_screen.dart | 351 ++++++++++-------- .../shared/card_with_bgNew_widget.dart | 3 + 2 files changed, 191 insertions(+), 163 deletions(-) diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index e958244f..21da6178 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -317,7 +317,7 @@ class _PatientsScreenState extends State { child: Center( child: Padding( padding: const EdgeInsets.fromLTRB( - 0, 250, 0, 0), + 0, 0, 0, 0),//250 child: DrAppCircularProgressIndeicator(), )), @@ -367,182 +367,192 @@ class _PatientsScreenState extends State { // mainAxisAlignment: MainAxisAlignment.center, children: responseModelList .map((PatiantInformtion item) { - return InkWell( - child: CardWithBgWidgetNew( - //CardWithBgWidget( - - widget: Column( - children: [ - Row( - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment - .start, - children: - item.genderDescription == - "Male" - ? [ - SvgPicture.asset( - url + - avatarMale, - height: - 80.0, - width: - 80.0, - semanticsLabel: - 'Male Logo') - ] - : [ - SvgPicture.asset( - url + - avatarFemale, - height: - 80.0, - width: - 80.0, - semanticsLabel: - 'Female Logo') - ], - - ), - SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: - CrossAxisAlignment - .start, + return Container( + decoration: myBoxDecoration(), + child: InkWell( + child: CardWithBgWidgetNew( + //CardWithBgWidget( + + widget: Column( + children: [ + Container( + // decoration: myBoxDecoration(), + child: Row( children: [ - AppText( - item.firstName + - " " + - item.lastName, - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors.white, - ), - SizedBox( - height: 8, - ), - AppText( - "File Number:" + - item.patientId - .toString(), - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors.white, - ), + Column( + mainAxisAlignment: + MainAxisAlignment + .start, + children: + item.genderDescription == + "Male" + ? [ + SvgPicture.asset( + url + + avatarMale, + height: + 80.0, + width: + 80.0, + semanticsLabel: + 'Male Logo') + ] + : [ + SvgPicture.asset( + url + + avatarFemale, + height: + 80.0, + width: + 80.0, + semanticsLabel: + 'Female Logo') + ], - // SizedBox( - // height: 8, - // ), - AppText( - "Age:" + - item.age - .toString(), - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors.white, ), SizedBox( - height: 8, - ), - SERVICES_PATIANT2[int - .parse( - patientType)] == - "List_MyOutPatient" - ? Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: < - Widget>[ - Container( - height: - 20, - width: - 80, - decoration: - BoxDecoration( - borderRadius: - BorderRadius.circular(50), - color: - Hexcolor("#20A169"), - ), - child: - AppText( - item.startTime, - color: - Colors.white, - fontSize: - 2 * SizeConfig.textMultiplier, - textAlign: - TextAlign.center, - fontWeight: - FontWeight.bold, - ), - ), - SizedBox( - width: - 60, - ), - Container( - child: - AppText( - convertDateFormat2(item - .appointmentDate - .toString()), - fontSize: - 2.0 * SizeConfig.textMultiplier, - fontWeight: - FontWeight.bold, - ), + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + item.firstName + + " " + + item.lastName, + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight + .bold, + backGroundcolor: + Colors.white, + ), + SizedBox( + height: 8, + ), + AppText( + "File Number:" + + item.patientId + .toString(), + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight + .bold, + backGroundcolor: + Colors.white, + ), + + // SizedBox( + // height: 8, + // ), + AppText( + "Age:" + + item.age + .toString(), + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight + .bold, + backGroundcolor: + Colors.white, + ), + SizedBox( + height: 8, + ), + SERVICES_PATIANT2[int + .parse( + patientType)] == + "List_MyOutPatient" + ? Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: < + Widget>[ + Container( + height: + 20, + width: + 80, + decoration: + BoxDecoration( + borderRadius: + BorderRadius.circular(50), + color: + Hexcolor("#20A169"), + ), + child: + AppText( + item.startTime, + color: + Colors.white, + fontSize: + 2 * SizeConfig.textMultiplier, + textAlign: + TextAlign.center, + fontWeight: + FontWeight.bold, + ), + ), + SizedBox( + width: + 60, + ), + Container( + child: + AppText( + convertDateFormat2(item + .appointmentDate + .toString()), + fontSize: + 2.0 * SizeConfig.textMultiplier, + fontWeight: + FontWeight.bold, + ), + ) + ], ) - ], - ) - : AppText( - item.nationalityName, - fontSize: 2.5 * - SizeConfig - .textMultiplier, - ), + : AppText( + item.nationalityName, + fontSize: 2.5 * + SizeConfig + .textMultiplier, + ), + ], + ), + // Divider(color: Colors.grey) ], ), - ], - ), - Divider(color: Colors.grey) - ], + ), + // Divider(color: Colors.grey) + ], + ), ), + onTap: () { + Navigator.of(context).pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": item + }); + }, ), - onTap: () { - Navigator.of(context).pushNamed( - PATIENTS_PROFILE, - arguments: { - "patient": item - }); - }, ); - }).toList(), + + }).toList(), ), ), ], + ), + ) ], ), @@ -633,4 +643,19 @@ class _PatientsScreenState extends State { ), ); } + + myBoxDecoration() { + + return BoxDecoration( + border: Border( + + + bottom: BorderSide( // <--- top side + color: Colors.grey, + width: 1.0, + ), + ), + ); + + } } diff --git a/lib/widgets/shared/card_with_bgNew_widget.dart b/lib/widgets/shared/card_with_bgNew_widget.dart index 25cb509c..51822cc2 100644 --- a/lib/widgets/shared/card_with_bgNew_widget.dart +++ b/lib/widgets/shared/card_with_bgNew_widget.dart @@ -36,6 +36,7 @@ class CardWithBgWidgetNew extends StatelessWidget { children: [ Center( child: Container( + // padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 // margin: EdgeInsets.only(left: 10), child: Padding( @@ -48,4 +49,6 @@ class CardWithBgWidgetNew extends StatelessWidget { ), ); } + + } From 5ff65fc1a1a019fac11c69062a9c5fc093cd93d3 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 8 Jun 2020 11:47:20 +0300 Subject: [PATCH 3/4] improve login form --- lib/widgets/auth/login_form.dart | 12 ++-- lib/widgets/auth/verfiy_account.dart | 90 +++++++++++++++++----------- 2 files changed, 62 insertions(+), 40 deletions(-) diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index ccee038f..b93bfafa 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -23,6 +23,7 @@ Helpers helpers = Helpers(); class LoginForm extends StatefulWidget with DrAppToastMsg { LoginForm({this.changeLoadingStata}); + final Function changeLoadingStata; @override @@ -85,7 +86,7 @@ class _LoginFormState extends State { return null; }, onSaved: (value) { - userInfo.UserID = value; + userInfo.UserID = value.trim(); }, onFieldSubmitted: (_) { FocusScope.of(context).requestFocus(focusPass); @@ -184,9 +185,9 @@ class _LoginFormState extends State { ); } -/* - *@author: Elham Rababah - *@Date:20/4/2020 +/* + *@author: Elham Rababah + *@Date:20/4/2020 *@param: context, hint, asset *@return: InputDecoration *@desc: decorate input feilds @@ -337,6 +338,7 @@ class _LoginFormState extends State { userInfo.ProjectID = projectsList[index]["ID"]; projectIdController.text = projectsList[index]['Name']; }); - FocusScope.of(context).requestFocus(focusProject); + + primaryFocus.unfocus(); } } diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 0ebbeab4..9a4ad85c 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -21,7 +21,9 @@ Helpers helpers = Helpers(); class VerifyAccount extends StatefulWidget { VerifyAccount({this.changeLoadingStata}); + final Function changeLoadingStata; + @override _VerifyAccountState createState() => _VerifyAccountState(); } @@ -37,8 +39,9 @@ class _VerifyAccountState extends State { Future _loggedUserFuture; var _loggedUser; AuthProvider authProv; - bool _isInit =true; + bool _isInit = true; var model; + @override void initState() { super.initState(); @@ -93,25 +96,30 @@ class _VerifyAccountState extends State { MainAxisAlignment.spaceAround, children: [ Container( - width: SizeConfig.realScreenWidth * 0.20, - child: TextFormField( - textInputAction: TextInputAction.next, - style: buildTextStyle(), - maxLength: 1, - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - decoration: - buildInputDecoration(context), - onSaved: (val) { - verifyAccountFormValue['digit1'] = - val; - }, - validator: validateCodeDigit, - onFieldSubmitted: (_) { + width: SizeConfig.realScreenWidth * 0.20, + child: TextFormField( + textInputAction: TextInputAction.next, + style: buildTextStyle(), + maxLength: 1, + textAlign: TextAlign.center, + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + onSaved: (val) { + verifyAccountFormValue['digit1'] = val; + }, + validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus(focusD2); + }, + onChanged: (val) { + if (val.length == 1) { FocusScope.of(context) .requestFocus(focusD2); - }, - )), + } + }, + ), + ), Container( width: SizeConfig.realScreenWidth * 0.20, child: TextFormField( @@ -131,6 +139,12 @@ class _VerifyAccountState extends State { FocusScope.of(context) .requestFocus(focusD3); }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD3); + } + }, validator: validateCodeDigit), ), Container( @@ -152,6 +166,12 @@ class _VerifyAccountState extends State { FocusScope.of(context) .requestFocus(focusD4); }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + } + }, validator: validateCodeDigit)), Container( width: SizeConfig.realScreenWidth * 0.20, @@ -214,10 +234,10 @@ class _VerifyAccountState extends State { }); } -/* - *@author: Elham Rababah - *@Date:19/4/2020 - *@param: +/* + *@author: Elham Rababah + *@Date:19/4/2020 + *@param: *@return: *@desc: change the style for the input field */ @@ -234,9 +254,9 @@ class _VerifyAccountState extends State { return null; } -/* - *@author: Elham Rababah - *@Date:28/4/2020 +/* + *@author: Elham Rababah + *@Date:28/4/2020 *@param: context *@return:InputDecoration *@desc: buildInputDecoration @@ -255,10 +275,10 @@ class _VerifyAccountState extends State { )); } -/* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: +/* + *@author: Elham Rababah + *@Date:28/4/2020 + *@param: *@return: RichText *@desc: buildText */ @@ -283,9 +303,9 @@ class _VerifyAccountState extends State { ); } -/* - *@author: Elham Rababah - *@Date:15/4/2020 +/* + *@author: Elham Rababah + *@Date:15/4/2020 *@param: authProv *@return: *@desc: verify Account func call sendActivationCodeByOtpNotificationType service @@ -349,8 +369,8 @@ class _VerifyAccountState extends State { } } - /* - *@author: Elham Rababah + /* + *@author: Elham Rababah *@Date:17/5/2020 *@param: Map profile, Function changeLoadingStata *@return: @@ -385,7 +405,7 @@ class _VerifyAccountState extends State { }); } - /* + /* *@author: Elham Rababah *@Date:17/5/2020 *@param: ClinicModel clinicInfo, Function changeLoadingStata From d136537b44e01864c3a97516a5edb20f60dd5d60 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Mon, 8 Jun 2020 13:41:35 +0300 Subject: [PATCH 4/4] Modify Patiant screen List style --- lib/config/config.dart | 4 ++-- lib/screens/dashboard_screen.dart | 10 ++++++---- lib/screens/doctor/my_referral_patient_screen.dart | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index dade19d6..886430ad 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -2,8 +2,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z]"; const ONLY_DATE = "[0-9/]"; -// const BASE_URL = 'https://hmgwebservices.com/Services/'; -const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; + const BASE_URL = 'https://hmgwebservices.com/Services/'; +//const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 2db9dcfd..a00471df 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -42,7 +42,9 @@ class _DashboardScreenState extends State { child: Scaffold( body: SingleChildScrollView( child: SizedBox( - height: MediaQuery.of(context).size.height, + height: MediaQuery.of(context).size.height*1.09, + // height: MediaQuery.of(context).size.height * 0.2, + // width: SizeConfig.screenWidth * 0.9, child: Column( children: [ Expanded( @@ -290,7 +292,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 16, + titleFontSize: 14, ), onTap: () { Navigator.push( @@ -328,7 +330,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 16, + titleFontSize: 14, ), ), ), @@ -363,7 +365,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 16, + titleFontSize: 14, ), ), ), diff --git a/lib/screens/doctor/my_referral_patient_screen.dart b/lib/screens/doctor/my_referral_patient_screen.dart index d79313e4..58c6e432 100644 --- a/lib/screens/doctor/my_referral_patient_screen.dart +++ b/lib/screens/doctor/my_referral_patient_screen.dart @@ -43,6 +43,7 @@ class MyReferralPatient extends StatelessWidget { children: [ SizedBox( height: 10, + ), Container( child: Column(