From ef8dfc5b5f44452e392dd940b604e7a2c8de12d8 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 15 Jun 2020 11:51:04 +0300 Subject: [PATCH 01/10] first step form change clinic --- lib/providers/auth_provider.dart | 7 ++ lib/screens/dashboard_screen.dart | 164 +++++++++++++++++++++++---- lib/widgets/auth/verfiy_account.dart | 8 +- 3 files changed, 151 insertions(+), 28 deletions(-) diff --git a/lib/providers/auth_provider.dart b/lib/providers/auth_provider.dart index e79192ae..9b58f43a 100644 --- a/lib/providers/auth_provider.dart +++ b/lib/providers/auth_provider.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/models/clinic_model.dart'; import 'package:flutter/cupertino.dart'; import '../models/user_model.dart'; @@ -16,6 +17,7 @@ const MEMBER_CHECK_ACTIVATION_CODE_NEW = const GET_DOC_PROFILES = 'Doctors.svc/REST/GetDocProfiles'; class AuthProvider with ChangeNotifier { + List doctorsClinicList=[]; Future login(UserModel userInfo) async { try { dynamic localRes; @@ -99,6 +101,11 @@ class AuthProvider with ChangeNotifier { await BaseAppClient.post(MEMBER_CHECK_ACTIVATION_CODE_NEW, onSuccess: (dynamic response, int statusCode) { localRes = response; + + response['List_DoctorsClinic'].forEach((v) { + doctorsClinicList.add(new ClinicModel.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { throw error; }, body: activationCodeModel); diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index d5a3dbaa..26b296ad 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1,27 +1,34 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/models/clinic_model.dart'; +import 'package:doctor_app_flutter/models/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/profile_req_Model.dart'; +import 'package:doctor_app_flutter/providers/auth_provider.dart'; import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart'; -import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/hospital_provider.dart'; +import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/referral_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referred_patient_provider.dart'; -import 'package:doctor_app_flutter/screens/QR_reader_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:provider/provider.dart'; -import '../routes.dart'; -import '../widgets/shared/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; +import 'package:platform_action_sheet/platform_action_sheet.dart'; +import 'package:provider/provider.dart'; -import '../presentation/doctor_app_icons.dart'; +import '../routes.dart'; import '../widgets/dashboard/dashboard_item_icons_texts.dart'; import '../widgets/dashboard/dashboard_item_texts_widget.dart'; +import '../widgets/shared/app_texts_widget.dart'; import '../widgets/shared/rounded_container_widget.dart'; import 'doctor/doctor_reply_screen.dart'; import 'doctor/my_referral_patient_screen.dart'; - import 'doctor/my_referred_patient_screen.dart'; +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); +Helpers helpers = Helpers(); class DashboardScreen extends StatefulWidget { DashboardScreen({Key key, this.title}) : super(key: key); @@ -33,11 +40,14 @@ class DashboardScreen extends StatefulWidget { } class _DashboardScreenState extends State { - HospitalProvider projectsProvider; + HospitalProvider hospitalProvider; + AuthProvider authProvider; @override Widget build(BuildContext context) { - projectsProvider = Provider.of(context); + hospitalProvider = Provider.of(context); + authProvider = Provider.of(context); + print(authProvider.doctorsClinicList); return SafeArea( bottom: true, child: Scaffold( @@ -60,12 +70,20 @@ class _DashboardScreenState extends State { ), alignment: Alignment.centerLeft, ), - Container( - margin: EdgeInsets.only(left: 10, top: 10, right: 10), - child: Icon( - Icons.settings, - size: SizeConfig.textMultiplier * 2.5, - )) + InkWell( + onTap: () { + showCupertinoPicker( + context: context, + actionList: authProvider.doctorsClinicList); + }, + child: Container( + margin: + EdgeInsets.only(left: 10, top: 10, right: 10), + child: Icon( + Icons.settings, + size: SizeConfig.textMultiplier * 2.5, + )), + ) ]), Container( margin: EdgeInsets.only(left: 10, top: 5), @@ -408,17 +426,119 @@ class _DashboardScreenState extends State { )), ], ), - //) - - // , - //constraints: new BoxConstraints(), ), ), ), ); - // Container( + } + + List buildActionSheetAction( + {List actionList, List defaultActionList}) { + List AList = []; + + actionList.forEach((element) { + print(element.clinicID); + AList.add(ActionSheetAction( + text: element.clinicName, + onPressed: () => Navigator.pop(context), + isCancel: true, + defaultAction: true, + )); + }); + return AList; + } + + showCupertinoPicker( + {context, List actionList, decKey, onSelectFun}) { + showModalBottomSheet( + isDismissible: false, + isScrollControlled: true, + context: context, + builder: (BuildContext builder) { + return Container( + // height: 500, + height: SizeConfig.realScreenHeight * 0.4, + color: Color(0xfff7f7f7), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + color: Color(0xfff7f7f7), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CupertinoButton( + child: Text( + 'Cancel'.toUpperCase(), + // style: TextStyle(context) + ), + onPressed: () { + Navigator.pop(context); + }, + ), + CupertinoButton( + child: Text( + 'Done'.toUpperCase(), + // style: textStyle(context), + ), + onPressed: () { + Navigator.pop(context); + // onSelectFun(cupertinoPickerIndex); + }, + ) + ], + ), + ), + Container( + height: SizeConfig.realScreenHeight * 0.3, + color: Color(0xfff7f7f7), + child: Column( + children: actionList + .map((e) => Container( + child: InkWell( + onTap: changeClinic(e.clinicID), + child: Text( + e.clinicName, + style: TextStyle(fontSize: 15), + )), + )) + .toList(), + )) + ], + ), + ); + }); + } + + changeClinic(clinicId) async{ + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = + new DoctorProfileModel.fromJson(profile); + ProfileReqModel docInfo = new ProfileReqModel( + doctorID: doctorProfile.doctorID, + clinicID: clinicId, + license: true, + projectID: doctorProfile.projectID, + tokenID: '', + languageID: 2); + + + // authProvider.getDocProfiles(docInfo) + authProvider.getDocProfiles(docInfo.toJson()).then((res)async { + if (res['MessageStatus'] == 1) { + sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); + Map profile1 = await sharedPref.getObj(DOCTOR_PROFILE); + print(1); - // ); + } else { + // changeLoadingStata(false); + // helpers.showErrorToast(res['ErrorEndUserMessage']); + } + }).catchError((err) { + + // changeLoadingStata(false); + helpers.showErrorToast(err); + }); } } diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 611bd315..bea5a1fc 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -363,7 +363,6 @@ class _VerifyAccountState extends State { 'Please Select Clinic') .then((clinicInfo) { ClinicModel clinic = ClinicModel.fromJson(clinicInfo); - print(clinicInfo); getDocProfiles(clinic, changeLoadingStata); }); } @@ -435,18 +434,15 @@ class _VerifyAccountState extends State { languageID: 2); authProv.getDocProfiles(docInfo.toJson()).then((res) { if (res['MessageStatus'] == 1) { - print("DoctorProfileList ${res['DoctorProfileList'][0]}"); loginProcessCompleted(res['DoctorProfileList'][0], changeLoadingStata); } else { changeLoadingStata(false); helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { - print('$err'); + changeLoadingStata(false); - - print('$err'); - helpers.showErrorToast(); + helpers.showErrorToast(err); }); } } From 230bdb2430dea033c7d75c19ed19d9e771a28cde Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Mon, 15 Jun 2020 12:01:22 +0300 Subject: [PATCH 02/10] Modify Dr profile data dynamic size --- lib/screens/profile_screen.dart | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 88f9565a..f1c30add 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -37,16 +37,26 @@ class _ProfileScreenState extends State { appBarTitle: 'Profile', body: ListView(padding: EdgeInsets.zero, children: [ Container( - height: SizeConfig.heightMultiplier * 30, - child: DrawerHeader( - child: ProfileImageWidget( - url:doctorProfile.doctorImageURL, - //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - name: doctorProfile.doctorName,//"Dr. Chris evans", - des: doctorProfile.clinicDescription//"Director of medical records", + height:MediaQuery.of(context).size.height * 0.35, //SizeConfig.heightMultiplier * 35, + + child: Container( + + child: DrawerHeader( + + child: Container( + + child: ProfileImageWidget( + url:doctorProfile.doctorImageURL, + //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", + name: doctorProfile.doctorName,//"Dr. Chris evans", + des: doctorProfile.clinicDescription//"Director of medical records", + ), + ), ), ), + ), + RoundedContainer( child: ListView( children: [ From 5779fb9ad7bbd16e623b259adcde371916d5ecd0 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 15 Jun 2020 13:04:01 +0300 Subject: [PATCH 03/10] change profile based on change clinic --- lib/client/base_app_client.dart | 2 +- lib/screens/dashboard_screen.dart | 31 +++++-------------------------- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 27fcb103..c5ef0ced 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -41,7 +41,7 @@ class BaseAppClient { body['DoctorID'] = doctorProfile?.doctorID; body['EditedBy'] = doctorProfile?.doctorID; body['ProjectID'] = doctorProfile?.projectID; - // if (!body.containsKey('ClinicID')) + if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; } body['TokenID'] = token ?? ''; diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 26b296ad..4e46ebf8 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -16,7 +16,6 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; -import 'package:platform_action_sheet/platform_action_sheet.dart'; import 'package:provider/provider.dart'; import '../routes.dart'; @@ -433,21 +432,7 @@ class _DashboardScreenState extends State { } - List buildActionSheetAction( - {List actionList, List defaultActionList}) { - List AList = []; - - actionList.forEach((element) { - print(element.clinicID); - AList.add(ActionSheetAction( - text: element.clinicName, - onPressed: () => Navigator.pop(context), - isCancel: true, - defaultAction: true, - )); - }); - return AList; - } + showCupertinoPicker( {context, List actionList, decKey, onSelectFun}) { @@ -497,7 +482,7 @@ class _DashboardScreenState extends State { children: actionList .map((e) => Container( child: InkWell( - onTap: changeClinic(e.clinicID), + onTap: ()=>changeClinic(e.clinicID,context), child: Text( e.clinicName, style: TextStyle(fontSize: 15), @@ -511,7 +496,7 @@ class _DashboardScreenState extends State { }); } - changeClinic(clinicId) async{ + changeClinic(clinicId , BuildContext context) async{ Map profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); @@ -526,15 +511,9 @@ class _DashboardScreenState extends State { // authProvider.getDocProfiles(docInfo) authProvider.getDocProfiles(docInfo.toJson()).then((res)async { - if (res['MessageStatus'] == 1) { sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); - Map profile1 = await sharedPref.getObj(DOCTOR_PROFILE); - print(1); - - } else { - // changeLoadingStata(false); - // helpers.showErrorToast(res['ErrorEndUserMessage']); - } + Navigator.pop(context); + }).catchError((err) { // changeLoadingStata(false); From b4570d7bd1a816224f0cb1871248c1a0a7c987d2 Mon Sep 17 00:00:00 2001 From: hussam alhababieh Date: Mon, 15 Jun 2020 15:59:11 +0300 Subject: [PATCH 04/10] translation for pages stage one --- lib/config/localized_values.dart | 40 ++++ lib/lookups/patient_lookup.dart | 18 +- lib/screens/QR_reader_screen.dart | 61 ++--- .../medicine/medicine_search_screen.dart | 38 +-- .../patients/patient_search_screen.dart | 29 ++- .../profile/insurance_approvals_screen.dart | 161 ++++++++----- .../profile/lab_result/lab_orders_screen.dart | 6 +- .../profile/patient_profile_screen.dart | 3 +- .../prescriptions/prescriptions_screen.dart | 3 +- .../profile/radiology/radiology_screen.dart | 217 +++++++++--------- .../vital_sign/vital_sign_details_screen.dart | 68 ++++-- lib/screens/profile_screen.dart | 62 ++--- lib/util/translations_delegate_base.dart | 39 ++++ .../profile/profile_medical_info_widget.dart | 25 +- 14 files changed, 477 insertions(+), 293 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 33f184d2..6577d31e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -56,4 +56,44 @@ const Map> localizedValues = { 'en': 'Only Arrived Patient', 'ar': 'المريض الذي حضر للموعد' }, + 'searchMedicineNameHere': { + 'en': 'Search Medicine Name Here', + 'ar': 'ابحث عن الدواء هنا' + }, + 'youCanFind': {'en': 'You Can Find', 'ar': 'تستطيع ان تجد '}, + 'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'}, + 'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'}, + 'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'}, + 'scanQrCode': { + 'en': 'scan Qr code to retrieve patient profile', + 'ar': 'مسح رمزاال QR لاسترداد ملف تعريف المريض ' + }, + 'scanQr': {'en': 'Scan Qr', 'ar': 'اقراء ال QR'}, + 'profile': {'en': 'Profile', 'ar': 'ملفي الشخصي'}, + 'gender': {'en': 'Gender', 'ar': 'الجنس'}, + 'clinic': {'en': 'Clinic', 'ar': 'العيادة'}, + 'hospital': {'en': 'Hospital', 'ar': 'المستشفى'}, + 'speciality': {'en': 'Speciality', 'ar': 'التخصص'}, + 'errorMessage': {'en': 'Something went wrong', 'ar': 'حدث خطأ ما'}, + 'patientProfile': {'en': 'Patient Profile', 'ar': 'ملف المريض'}, + 'vitalSign': {'en': 'Vital Sign', 'ar': 'المؤشرات الحيوية'}, + 'labOrder': {'en': 'Lab Order', 'ar': 'نتائج التحاليل'}, + 'prescription': {'en': 'Prescription', 'ar': 'الوصفات'}, + 'insuranceApprovals': {'en': 'Insurance Approvals', 'ar': 'موافقات التأمين'}, + 'bodyMeasurements': {'en': 'Body Measurements', 'ar': 'قياسات الجسم'}, + 'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'}, + 'pulse': {'en': 'Pulse', 'ar': 'النبض'}, + 'respiration': {'en': 'Respiration', 'ar': 'التنفس'}, + 'bloodPressure': {'en': 'Blood Pressure', 'ar': 'ضغط الدم'}, + 'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'}, + 'painScale': {'en': 'Pain Scale', 'ar': 'مقياس الألم'}, + 'errorNoVitalSign': { + 'en': 'You don\'t have any Vital Sign', + 'ar': 'ليس لديك اي اعراض حيوية' + }, + 'labOrders': {'en': 'Lab Orders', 'ar': 'الفحوصات الطبية'}, + 'errorNoLabOrders': { + 'en': 'You don\'t have any lab orders', + 'ar': 'ليس لديك اي فحوصات طبية' + }, }; diff --git a/lib/lookups/patient_lookup.dart b/lib/lookups/patient_lookup.dart index 0d58a407..5db5fd96 100644 --- a/lib/lookups/patient_lookup.dart +++ b/lib/lookups/patient_lookup.dart @@ -1,11 +1,15 @@ const PATIENT_TYPE = const [ - {"text": "outPatiant", "val": "0"}, - {"text": "InPatiant", "val": "1"}, - {"text": "Discharge", "val": "2"}, - {"text": "Referrd", "val": "3"}, - {"text": "Referral Discharge", "val": "4"}, - {"text": "Tomorrow Patient", "val": "5"}, - {"text": "Referral", "val": "6"}, + {"text": "outPatiant", "text_ar": "المريض الخارجي", "val": "0"}, + {"text": "InPatiant", "text_ar": "المريض المنوم", "val": "1"}, + {"text": "Discharge", "text_ar": "المريض المعافى", "val": "2"}, + {"text": "Referrd", "text_ar": "المريض المحول الي", "val": "3"}, + { + "text": "Referral Discharge", + "text_ar": "المريض المحال المعافى", + "val": "4" + }, + {"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"}, + {"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"}, ]; const LOCATIONS = const [ diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index 27afd2ee..d89000ef 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import '../routes.dart'; @@ -55,7 +56,7 @@ class _QrReaderScreenState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "QR Reader", + appBarTitle: TranslationBase.of(context).qrReader, body: Center( child: Container( margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), @@ -64,7 +65,7 @@ class _QrReaderScreenState extends State { child: ListView( children: [ AppText( - 'Start Scanning', + TranslationBase.of(context).startScanning, fontSize: 18, fontWeight: FontWeight.bold, textAlign: TextAlign.center, @@ -72,12 +73,10 @@ class _QrReaderScreenState extends State { SizedBox( height: 7, ), - AppText( - 'scan Qr code to retrieve patient profile', + AppText(TranslationBase.of(context).scanQrCode, fontSize: 14, fontWeight: FontWeight.w400, - textAlign: TextAlign.center - ), + textAlign: TextAlign.center), SizedBox( height: 15, ), @@ -92,24 +91,31 @@ class _QrReaderScreenState extends State { onTap: () { _scanQrAndGetPatient(context); }, - title: 'Scan Qr', + title: TranslationBase.of(context).scanQr, loading: isLoading, icon: Image.asset('assets/images/qr_code_white.png'), ), - isError ? Container( - margin: EdgeInsets.only(top: 8), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Theme.of(context).errorColor.withOpacity(0.06), - ), - padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0), - child: Row( - children: [ - Expanded(child: AppText(error ?? "Something went wrong.", color: Theme.of(context).errorColor)), - ], - ), - ):Container(), - + isError + ? Container( + margin: EdgeInsets.only(top: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Theme.of(context).errorColor.withOpacity(0.06), + ), + padding: EdgeInsets.symmetric( + vertical: 8.0, horizontal: 12.0), + child: Row( + children: [ + Expanded( + child: AppText( + error ?? + TranslationBase.of(context) + .errorMessage, + color: Theme.of(context).errorColor)), + ], + ), + ) + : Container(), ], ), ), @@ -118,7 +124,6 @@ class _QrReaderScreenState extends State { ); } - _scanQrAndGetPatient(BuildContext context) async { /// When give qr we will change this method to get data /// var result = await BarcodeScanner.scan(); @@ -151,7 +156,8 @@ class _QrReaderScreenState extends State { case "0": if (response['List_MyOutPatient'] != null) { setState(() { - patientList = ModelResponse.fromJson(response['List_MyOutPatient']).list; + patientList = + ModelResponse.fromJson(response['List_MyOutPatient']).list; isLoading = false; }); Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { @@ -168,7 +174,8 @@ class _QrReaderScreenState extends State { case "1": if (response['List_MyInPatient'] != null) { setState(() { - patientList = ModelResponse.fromJson(response['List_MyInPatient']).list; + patientList = + ModelResponse.fromJson(response['List_MyInPatient']).list; isLoading = false; error = ""; }); @@ -189,10 +196,10 @@ class _QrReaderScreenState extends State { isLoading = false; isError = true; }); - DrAppToastMsg.showErrorToast(response['ErrorEndUserMessage'] ?? response['ErrorMessage']); - + DrAppToastMsg.showErrorToast( + response['ErrorEndUserMessage'] ?? response['ErrorMessage']); } - }).catchError((error){ + }).catchError((error) { setState(() { isLoading = false; }); diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 368a4bd1..99bb44ca 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indei import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../util/extenstions.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); @@ -46,22 +47,21 @@ class _MedicineSearchState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Search Medicine", + appBarTitle: TranslationBase.of(context).searchMedicine, body: Column( children: [ - Padding( - padding: EdgeInsets.only( - bottom: SizeConfig.heightMultiplier * 1, - right: SizeConfig.heightMultiplier * 2, - left: SizeConfig.heightMultiplier * 2, - top: SizeConfig.heightMultiplier * 3), - child: AppTextFormField( - hintText: 'Search Medicine Name Here..', - controller: myController, - onSaved: (value) {}, - inputFormatter: ONLY_LETTERS), - ), - + Padding( + padding: EdgeInsets.only( + bottom: SizeConfig.heightMultiplier * 1, + right: SizeConfig.heightMultiplier * 2, + left: SizeConfig.heightMultiplier * 2, + top: SizeConfig.heightMultiplier * 3), + child: AppTextFormField( + hintText: TranslationBase.of(context).searchMedicineNameHere, + controller: myController, + onSaved: (value) {}, + inputFormatter: ONLY_LETTERS), + ), Container( margin: EdgeInsets.only( bottom: SizeConfig.heightMultiplier * 1, @@ -72,7 +72,7 @@ class _MedicineSearchState extends State { alignment: WrapAlignment.center, children: [ AppButton( - title: "Search", + title: TranslationBase.of(context).search, color: Color(PRIMARY_COLOR), onPressed: () { searchMedicine(context); @@ -87,9 +87,9 @@ class _MedicineSearchState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "You find " + + TranslationBase.of(context).youCanFind + (data == null ? "0" : data.length.toString()) + - " items in search", + TranslationBase.of(context).itemsInSearch, fontWeight: FontWeight.bold, margin: 5, ), @@ -127,7 +127,9 @@ class _MedicineSearchState extends State { ChangeNotifierProvider( create: (_) => MedicineProvider(), child: PharmaciesListScreen( - itemID: data[index]["ItemID"], url: data[index]["ProductImageBase64"]), + itemID: data[index]["ItemID"], + url: data[index] + ["ProductImageBase64"]), ), ), ); diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index f020ca2e..dbb937a2 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -19,6 +20,7 @@ import '../../widgets/patients/dynamic_elements.dart'; import '../../config/config.dart'; import '../../models/doctor_profile_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:provider/provider.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = Helpers(); @@ -36,6 +38,8 @@ class _PatientSearchScreenState extends State { String _selectedType = '1'; String _selectedLocation = '1'; String error = ''; + ProjectProvider projectsProvider; + String itemText = ''; final GlobalKey _formKey = GlobalKey(); bool _autoValidate = false; @@ -112,6 +116,7 @@ class _PatientSearchScreenState extends State { @override Widget build(BuildContext context) { + projectsProvider = Provider.of(context); return AppScaffold( appBarTitle: TranslationBase.of(context).searchPatient, body: ListView( @@ -174,12 +179,19 @@ class _PatientSearchScreenState extends State { return Row( mainAxisSize: MainAxisSize.max, children: [ - AppText( - item['text'], - fontSize: - SizeConfig.textMultiplier * - 2.1, - ), + !projectsProvider.isArabic + ? AppText( + item['text'], + fontSize: SizeConfig + .textMultiplier * + 2.1, + ) + : AppText( + item['text_ar'], + fontSize: SizeConfig + .textMultiplier * + 2.1, + ), ], ); }).toList(); @@ -192,9 +204,12 @@ class _PatientSearchScreenState extends State { }) }, items: PATIENT_TYPE.map((item) { + !projectsProvider.isArabic + ? itemText = item['text'] + : itemText = item['text_ar']; return DropdownMenuItem( child: Text( - '${item['text']}', + itemText, textAlign: TextAlign.end, ), value: item['val'], diff --git a/lib/screens/patients/profile/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart index 2bb59318..c4dba964 100644 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ b/lib/screens/patients/profile/insurance_approvals_screen.dart @@ -15,6 +15,7 @@ import '../../../util/dr_app_shared_pref.dart'; import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -77,7 +78,7 @@ class _InsuranceApprovalsState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Insurance Approvals", + appBarTitle: TranslationBase.of(context).insuranceApprovals, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError @@ -128,9 +129,12 @@ class _InsuranceApprovalsState extends State { : approvalsList[index][ "ApprovalStatusDescption"] .toString() - .contains("Cancelled") - ? DoctorApp.reject_icon - : DoctorApp.pending_icon, + .contains( + "Cancelled") + ? DoctorApp + .reject_icon + : DoctorApp + .pending_icon, color: approvalsList[index][ "ApprovalStatusDescption"] .toString() @@ -139,13 +143,18 @@ class _InsuranceApprovalsState extends State { : approvalsList[index][ "ApprovalStatusDescption"] .toString() - .contains("Cancelled") + .contains( + "Cancelled") ? Colors.red : Colors.yellow, ), - AppText(approvalsList[index]["ApprovalStatusDescption"], - fontSize: SizeConfig.textMultiplier * 1.5, - color: approvalsList[index][ + AppText( + approvalsList[index][ + "ApprovalStatusDescption"], + fontSize: SizeConfig + .textMultiplier * + 1.5, + color: approvalsList[index][ "ApprovalStatusDescption"] .toString() .contains("Approved") @@ -153,9 +162,11 @@ class _InsuranceApprovalsState extends State { : approvalsList[index][ "ApprovalStatusDescption"] .toString() - .contains("Cancelled") + .contains( + "Cancelled") ? Colors.red - : Colors.yellow,) + : Colors.yellow, + ) ], ), Expanded( @@ -204,31 +215,30 @@ class _InsuranceApprovalsState extends State { backgroundColor: Color(PRIMARY_COLOR), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - AppText( - approvalsList[index] - ["ApprovalNo"] - .toString(), - color: Colors.white, - fontSize: 19, - fontWeight: - FontWeight.bold, - marginTop: 10, - marginLeft: 10, - marginRight: 10, - marginBottom: 2, - ), - - AppText( - "Approval No:", - color: Colors.white, - fontSize: 16, - marginTop: 2, - marginLeft: 10, - marginBottom: 15, - marginRight: 10, - ), + AppText( + approvalsList[index] + ["ApprovalNo"] + .toString(), + color: Colors.white, + fontSize: 19, + fontWeight: FontWeight.bold, + marginTop: 10, + marginLeft: 10, + marginRight: 10, + marginBottom: 2, + ), + AppText( + "Approval No:", + color: Colors.white, + fontSize: 16, + marginTop: 2, + marginLeft: 10, + marginBottom: 15, + marginRight: 10, + ), Row( children: [ Expanded( @@ -241,24 +251,34 @@ class _InsuranceApprovalsState extends State { AppText( "PRODUCER NAME", fontSize: 10, - color: Colors.white, + color: + Colors.white, marginLeft: SizeConfig .widthMultiplier * 3, ), - AppText(checkList(approvalsList[index]["ApporvalDetails"])? - approvalsList[index] + AppText( + checkList(approvalsList[ + index] [ - "ApporvalDetails"][0] - [ - "ProcedureName"] : "", + "ApporvalDetails"]) + ? approvalsList[ + index] + [ + "ApporvalDetails"][0] + [ + "ProcedureName"] + : "", fontSize: 12, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight + .bold, marginLeft: SizeConfig .widthMultiplier * 3, marginTop: 3, - color: Colors.white, + color: + Colors.white, ), ], ), @@ -273,22 +293,26 @@ class _InsuranceApprovalsState extends State { AppText( "STATUS", fontSize: 10, - color: Colors.white, + color: + Colors.white, marginLeft: SizeConfig .widthMultiplier * 9, ), AppText( - approvalsList[index] - [ + approvalsList[ + index][ "ApprovalStatusDescption"], fontSize: 12, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight + .bold, marginLeft: SizeConfig .widthMultiplier * 9, marginTop: 3, - color: Colors.white, + color: + Colors.white, ), ], ), @@ -307,7 +331,8 @@ class _InsuranceApprovalsState extends State { AppText( "RECEIPT ON", fontSize: 10, - color: Colors.white, + color: + Colors.white, marginLeft: SizeConfig .widthMultiplier * 3, @@ -316,16 +341,25 @@ class _InsuranceApprovalsState extends State { 1.5, ), AppText( - convertDateFormat( approvalsList[index] - ["ReceiptOn"]), + convertDateFormat( + approvalsList[ + index] + [ + "ReceiptOn"]), fontSize: 12, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight + .bold, marginLeft: SizeConfig .widthMultiplier * 3, marginTop: 3, - marginBottom: SizeConfig.heightMultiplier*2, - color: Colors.white, + marginBottom: + SizeConfig + .heightMultiplier * + 2, + color: + Colors.white, ), ], ), @@ -340,7 +374,8 @@ class _InsuranceApprovalsState extends State { AppText( "EXPIRY DATE", fontSize: 10, - color: Colors.white, + color: + Colors.white, marginTop: SizeConfig .heightMultiplier * 1.5, @@ -351,16 +386,23 @@ class _InsuranceApprovalsState extends State { AppText( convertDateFormat( approvalsList[ - index][ + index] + [ "ExpiryDate"]), fontSize: 12, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight + .bold, marginLeft: SizeConfig .widthMultiplier * 9, marginTop: 3, - marginBottom: SizeConfig.heightMultiplier*2, - color: Colors.white, + marginBottom: + SizeConfig + .heightMultiplier * + 2, + color: + Colors.white, ), ], ), @@ -434,7 +476,8 @@ class _InsuranceApprovalsState extends State { return newDate.toString(); } - bool checkList(List list){ + + bool checkList(List list) { return list.length > 0 ? true : false; } } diff --git a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart index b0a4a13d..ce50504c 100644 --- a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart +++ b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart @@ -18,6 +18,7 @@ import '../../../../widgets/shared/card_with_bg_widget.dart'; import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../../widgets/shared/profile_image_widget.dart'; import 'lab_result_secreen.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -72,13 +73,14 @@ class _LabOrdersScreenState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Lab Orders", + appBarTitle: TranslationBase.of(context).labOrders, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) : patientsProv.patientLabResultOrdersList.length == 0 - ? DrAppEmbeddedError(error: 'You don\'t have any Orders') + ? DrAppEmbeddedError( + error: TranslationBase.of(context).errorNoLabOrders) : Container( margin: EdgeInsets.fromLTRB( SizeConfig.realScreenWidth * 0.05, diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 2ee3d939..d95eb766 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import '../../../widgets/patients/profile/patient_profile_widget.dart'; import '../../../widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class PatientProfileScreen extends StatelessWidget { const PatientProfileScreen({Key key}) : super(key: key); @@ -9,7 +10,7 @@ class PatientProfileScreen extends StatelessWidget { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: 'Patient Profile', + appBarTitle: TranslationBase.of(context).patientProfile, body: PatientProfileWidget(), ); } diff --git a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart index b2ee2f48..39e809e3 100644 --- a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart +++ b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart @@ -17,6 +17,7 @@ import '../../../../widgets/shared/app_scaffold_widget.dart'; import '../../../../widgets/shared/app_texts_widget.dart'; import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../../widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -83,7 +84,7 @@ class _PrescriptionScreenState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Prescriptions", + appBarTitle: TranslationBase.of(context).prescription, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError diff --git a/lib/screens/patients/profile/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart index 4b47956c..19962c43 100644 --- a/lib/screens/patients/profile/radiology/radiology_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_screen.dart @@ -15,6 +15,7 @@ import '../../../../widgets/shared/app_texts_widget.dart'; import '../../../../widgets/shared/card_with_bg_widget.dart'; import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../../widgets/shared/profile_image_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -75,116 +76,124 @@ class _RadiologyScreenState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Radiology", + appBarTitle: TranslationBase.of(context).radiology, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError - ? DrAppEmbeddedError(error: patientsProv.error) - : patientsProv.patientRadiologyList.length == 0 - ? DrAppEmbeddedError(error: 'You don\'t have any Vital Sign') - : Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: Container( - margin: EdgeInsets.symmetric(vertical: 10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(20.0), - ), - ), - child: ListView.builder( - itemCount: patientsProv.patientRadiologyList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => RadiologyReportScreen(reportData: patientsProv.patientRadiologyList[index].reportData,)),); - }, - child: Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), - border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - LargeAvatar( - url: patientsProv - .patientRadiologyList[index] - .doctorImageURL, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.fromLTRB( - 8, 0, 0, 0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - '${patientsProv.patientRadiologyList[index].doctorName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold), - SizedBox( - height: 8, - ), - AppText( - 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${patientsProv.patientRadiologyList[index].clinicName}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Theme.of(context) - .primaryColor, - ), - SizedBox( - height: 8, + ? DrAppEmbeddedError(error: patientsProv.error) + : patientsProv.patientRadiologyList.length == 0 + ? DrAppEmbeddedError( + error: TranslationBase.of(context).errorNoVitalSign) + : Container( + margin: EdgeInsets.fromLTRB( + SizeConfig.realScreenWidth * 0.05, + 0, + SizeConfig.realScreenWidth * 0.05, + 0), + child: Container( + margin: EdgeInsets.symmetric(vertical: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(20.0), + ), + ), + child: ListView.builder( + itemCount: patientsProv.patientRadiologyList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + RadiologyReportScreen( + reportData: patientsProv + .patientRadiologyList[index] + .reportData, + )), + ); + }, + child: Container( + padding: EdgeInsets.all(10), + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(10)), + border: Border( + bottom: BorderSide( + color: Colors.grey, width: 0.5), + top: BorderSide( + color: Colors.grey, width: 0.5), + left: BorderSide( + color: Colors.grey, width: 0.5), + right: BorderSide( + color: Colors.grey, width: 0.5), ), - ], + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + LargeAvatar( + url: patientsProv + .patientRadiologyList[index] + .doctorImageURL, + ), + Expanded( + child: Padding( + padding: + const EdgeInsets.fromLTRB( + 8, 0, 0, 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + '${patientsProv.patientRadiologyList[index].doctorName}', + fontSize: 2.5 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight.bold), + SizedBox( + height: 8, + ), + AppText( + 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', + fontSize: 2 * + SizeConfig + .textMultiplier, + ), + SizedBox( + height: 8, + ), + AppText( + ' ${patientsProv.patientRadiologyList[index].clinicName}', + fontSize: 2 * + SizeConfig + .textMultiplier, + color: Theme.of(context) + .primaryColor, + ), + SizedBox( + height: 8, + ), + ], + ), + ), + ) + ], + ), + ], + ), ), - ), - ) - ], - ), - ], + ); + }), + ), ), - ), - ); - }), - ), - ), ); } } diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 68966553..8317cb2a 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -14,6 +14,7 @@ import '../../../../routes.dart'; import '../../../../screens/patients/profile/vital_sign/vital_sign_item.dart'; import '../../../../util/dr_app_shared_pref.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -30,9 +31,9 @@ class _VitalSignDetailsScreenState extends State { PatientsProvider patientsProv; var _isInit = true; - /* - *@author: Elham Rababah - *@Date:28/4/2020 + /* + *@author: Elham Rababah + *@Date:28/4/2020 *@param: context *@return: *@desc: getVitalSignList Function @@ -76,7 +77,7 @@ class _VitalSignDetailsScreenState extends State { final routeArgs = ModalRoute.of(context).settings.arguments as Map; vitalSing = routeArgs['vitalSing']; return AppScaffold( - appBarTitle: "vital Sing", + appBarTitle: TranslationBase.of(context).vitalSign, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError @@ -101,9 +102,13 @@ class _VitalSignDetailsScreenState extends State { }, child: Container( child: VitalSignItem( - des: 'Body Measurements', + des: TranslationBase.of(context) + .bodyMeasurements, url: url + 'heartbeat.png', - lastVal: patientsProv.patientVitalSignOrderdSubList[0].heightCm.toString(), + lastVal: patientsProv + .patientVitalSignOrderdSubList[0] + .heightCm + .toString(), unit: 'Cm', ), ), @@ -115,16 +120,18 @@ class _VitalSignDetailsScreenState extends State { arguments: { 'title': 'Temperature', 'key': vitalSignDetails.temperature, - }); }, child: Container( child: VitalSignItem( - des: 'Temperature', + des: TranslationBase.of(context) + .temperature, url: url + 'heartbeat.png', - lastVal: patientsProv.patientVitalSignOrderdSubList[0].temperatureCelcius.toString(), + lastVal: patientsProv + .patientVitalSignOrderdSubList[0] + .temperatureCelcius + .toString(), unit: 'C', - ), ), ), @@ -142,10 +149,13 @@ class _VitalSignDetailsScreenState extends State { }); }, child: VitalSignItem( - des: 'Pulse', + des: TranslationBase.of(context).pulse, url: url + 'heartbeat.png', - lastVal: patientsProv.patientVitalSignOrderdSubList[0].pulseBeatPerMinute.toString(), - unit: 'M', + lastVal: patientsProv + .patientVitalSignOrderdSubList[0] + .pulseBeatPerMinute + .toString(), + unit: 'M', ), ), InkWell( @@ -158,11 +168,14 @@ class _VitalSignDetailsScreenState extends State { }); }, child: VitalSignItem( - des: 'Respiration', + des: + TranslationBase.of(context).respiration, url: url + 'heartbeat.png', - - lastVal: patientsProv.patientVitalSignOrderdSubList[0].respirationBeatPerMinute.toString(), - unit: 'M', + lastVal: patientsProv + .patientVitalSignOrderdSubList[0] + .respirationBeatPerMinute + .toString(), + unit: 'M', ), ), ], @@ -179,10 +192,14 @@ class _VitalSignDetailsScreenState extends State { }); }, child: VitalSignItem( - des: 'Blood Pressure', + des: TranslationBase.of(context) + .bloodPressure, url: url + 'heartbeat.png', - lastVal: patientsProv.patientVitalSignOrderdSubList[0].bloodPressure.toString(), - unit: '', + lastVal: patientsProv + .patientVitalSignOrderdSubList[0] + .bloodPressure + .toString(), + unit: '', ), ), InkWell( @@ -195,10 +212,13 @@ class _VitalSignDetailsScreenState extends State { }); }, child: VitalSignItem( - des: 'Oxygenation', + des: + TranslationBase.of(context).oxygenation, url: url + 'heartbeat.png', - lastVal: patientsProv.patientVitalSignOrderdSubList[0].fIO2.toString(), - unit: '', + lastVal: patientsProv + .patientVitalSignOrderdSubList[0].fIO2 + .toString(), + unit: '', ), ), ], @@ -216,7 +236,7 @@ class _VitalSignDetailsScreenState extends State { }); }, child: VitalSignItem( - des: 'Pain Scale', + des: TranslationBase.of(context).painScale, url: url + 'heartbeat.png', ), ), diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 88f9565a..61ac08c3 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/models/doctor_profile_model.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; ////////////// @@ -9,12 +8,13 @@ import '../widgets/shared/app_scaffold_widget.dart'; import '../widgets/shared/drawer_item_widget.dart'; import '../widgets/shared/profile_image_widget.dart'; import '../widgets/shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class ProfileScreen extends StatefulWidget { - ProfileScreen({Key key, this.title,this.doctorProfileall}) : super(key: key); + ProfileScreen({Key key, this.title, this.doctorProfileall}) : super(key: key); final String title; - DoctorProfileModel doctorProfileall ; + DoctorProfileModel doctorProfileall; @override _ProfileScreenState createState() => _ProfileScreenState(); @@ -22,59 +22,60 @@ class ProfileScreen extends StatefulWidget { class _ProfileScreenState extends State { //************************** - DoctorProfileModel doctorProfile ; - //AppDrawer dr; + DoctorProfileModel doctorProfile; + //AppDrawer dr; //****************** @override Widget build(BuildContext context) { - - Map arg=ModalRoute.of(context).settings.arguments as Map;//ModalRoute.of(context).settings.arguments; - doctorProfile = arg['doctorProfileall']; - print("******************"); - //print(doctorProfile.doctorName); - print("******************"); + Map arg = ModalRoute.of(context).settings.arguments + as Map; //ModalRoute.of(context).settings.arguments; + doctorProfile = arg['doctorProfileall']; + print("******************"); + //print(doctorProfile.doctorName); + print("******************"); return AppScaffold( - appBarTitle: 'Profile', + appBarTitle: TranslationBase.of(context).profile, body: ListView(padding: EdgeInsets.zero, children: [ Container( height: SizeConfig.heightMultiplier * 30, child: DrawerHeader( child: ProfileImageWidget( - url:doctorProfile.doctorImageURL, - //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - name: doctorProfile.doctorName,//"Dr. Chris evans", - des: doctorProfile.clinicDescription//"Director of medical records", - ), + url: doctorProfile.doctorImageURL, + //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", + name: doctorProfile.doctorName, //"Dr. Chris evans", + des: doctorProfile + .clinicDescription //"Director of medical records", + ), ), ), RoundedContainer( child: ListView( children: [ DrawerItem( - "Gender" - , + TranslationBase.of(context).gender, Icons.person_pin, color: Colors.black, - subTitle: doctorProfile.genderDescription//"Male" + subTitle: doctorProfile.genderDescription //"Male" , ), + DrawerItem(TranslationBase.of(context).clinic, Icons.build, + color: Colors.black, + subTitle: + doctorProfile.clinicDescription //"Neurology Clinic", + ), DrawerItem( - "Clinic", - Icons.build, - color: Colors.black, - subTitle: doctorProfile.clinicDescription//"Neurology Clinic", - ), - DrawerItem( - "Hospital", + TranslationBase.of(context).hospital, Icons.local_hospital, color: Colors.black, - subTitle: doctorProfile.projectName,//"Al-Takkassussi", + subTitle: doctorProfile.projectName, //"Al-Takkassussi", ), DrawerItem( - "Speciality", + TranslationBase.of(context).speciality, Icons.crop_square, color: Colors.black, - subTitle: doctorProfile.doctorRate==0 ?"being bad":"being great", + subTitle: doctorProfile.doctorRate == 0 + ? "being bad" + : "being great", ), ], ), @@ -84,4 +85,3 @@ class _ProfileScreenState extends State { ])); } } - diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 41a923f5..b9e63bf4 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -86,6 +86,45 @@ class TranslationBase { String get search => localizedValues['search'][locale.languageCode]; String get onlyArrivedPatient => localizedValues['onlyArrivedPatient'][locale.languageCode]; + String get searchMedicineNameHere => + localizedValues['searchMedicineNameHere'][locale.languageCode]; + String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; + String get itemsInSearch => + localizedValues['itemsInSearch'][locale.languageCode]; + String get qrReader => localizedValues['qrReader'][locale.languageCode]; + String get startScanning => + localizedValues['startScanning'][locale.languageCode]; + String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; + String get scanQr => localizedValues['scanQr'][locale.languageCode]; + String get profile => localizedValues['profile'][locale.languageCode]; + String get gender => localizedValues['gender'][locale.languageCode]; + String get clinic => localizedValues['clinic'][locale.languageCode]; + String get hospital => localizedValues['hospital'][locale.languageCode]; + String get speciality => localizedValues['speciality'][locale.languageCode]; + String get errorMessage => + localizedValues['errorMessage'][locale.languageCode]; + String get patientProfile => + localizedValues['patientProfile'][locale.languageCode]; + String get vitalSign => localizedValues['vitalSign'][locale.languageCode]; + String get labOrder => localizedValues['labOrder'][locale.languageCode]; + String get prescription => + localizedValues['prescription'][locale.languageCode]; + String get insuranceApprovals => + localizedValues['insuranceApprovals'][locale.languageCode]; + String get bodyMeasurements => + localizedValues['bodyMeasurements'][locale.languageCode]; + String get temperature => localizedValues['temperature'][locale.languageCode]; + String get pulse => localizedValues['pulse'][locale.languageCode]; + String get respiration => localizedValues['respiration'][locale.languageCode]; + String get bloodPressure => + localizedValues['bloodPressure'][locale.languageCode]; + String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; + String get painScale => localizedValues['painScale'][locale.languageCode]; + String get errorNoVitalSign => + localizedValues['errorNoVitalSign'][locale.languageCode]; + String get labOrders => localizedValues['labOrders'][locale.languageCode]; + String get errorNoLabOrders => + localizedValues['errorNoLabOrders'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 16c9a0bd..8cad6daf 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -8,6 +8,7 @@ import 'package:hexcolor/hexcolor.dart'; import '../../../config/size_config.dart'; import '../../shared/app_texts_widget.dart'; import '../../shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; /* *@author: Elham Rababah @@ -32,26 +33,26 @@ class ProfileMedicalInfoWidget extends StatelessWidget { PatientProfileButton( key: key, patient: patient, - name: 'Vital Sign', + name: TranslationBase.of(context).vitalSign, route: VITAL_SIGN_DETAILS, icon: 'heartbeat.png'), PatientProfileButton( key: key, patient: patient, route: LAB_ORDERS, - name: 'Lab Order', + name: TranslationBase.of(context).labOrder, icon: 'lab.png'), PatientProfileButton( key: key, patient: patient, route: PRESCRIPTIONS, - name: 'Prescription', + name: TranslationBase.of(context).prescription, icon: 'note.png'), PatientProfileButton( key: key, patient: patient, route: RADIOLOGY, - name: 'Radiology', + name: TranslationBase.of(context).radiology, icon: 'radiology-1.png'), Visibility( visible: selectedPatientType != 0 && selectedPatientType != 5, @@ -65,7 +66,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { key: key, patient: patient, route: PATIENT_INSURANCE_APPROVALS, - name: 'Insurance Aprovals', + name: TranslationBase.of(context).insuranceApprovals, icon: 'lab.png'), Visibility( visible: selectedPatientType != 0 && @@ -304,13 +305,13 @@ class PatientProfileButton extends StatelessWidget { ), Container( child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Container( - padding: EdgeInsets.all(10), - child: new Image.asset(url + icon)) - ], - )) + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: EdgeInsets.all(10), + child: new Image.asset(url + icon)) + ], + )) ]), ), decoration: BoxDecoration( From 574a951fcfe0ec5a5f72e848d892a16fce8ecf31 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 15 Jun 2020 16:34:51 +0300 Subject: [PATCH 05/10] finish clinic exept design --- lib/screens/auth/change_password_screen.dart | 1 + lib/screens/auth/login_screen.dart | 38 +++++++-------- .../auth/verification_methods_screen.dart | 1 + lib/screens/auth/verify_account_screen.dart | 1 + lib/screens/dashboard_screen.dart | 47 +++++++++++-------- lib/screens/doctor/message_screen.dart | 4 +- lib/screens/doctor/my_schedule_screen.dart | 4 +- lib/screens/doctor/services_screen.dart | 3 +- .../patients/patient_search_screen.dart | 3 +- lib/screens/patients/patients_screen.dart | 2 +- lib/widgets/auth/verfiy_account.dart | 14 ++---- lib/widgets/shared/app_scaffold_widget.dart | 5 +- 12 files changed, 66 insertions(+), 57 deletions(-) diff --git a/lib/screens/auth/change_password_screen.dart b/lib/screens/auth/change_password_screen.dart index 6fa15bfd..d6451049 100644 --- a/lib/screens/auth/change_password_screen.dart +++ b/lib/screens/auth/change_password_screen.dart @@ -9,6 +9,7 @@ class ChangePasswordScreen extends StatelessWidget { Widget build(BuildContext context) { return AppScaffold( + isShowAppBar: false, body: SafeArea( child: ListView(children: [ Container( diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 38c81cc3..5b495abb 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -12,8 +12,8 @@ import '../../widgets/auth/login_form.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; - DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + class Loginsreen extends StatefulWidget { @override _LoginsreenState createState() => _LoginsreenState(); @@ -56,10 +56,10 @@ class _LoginsreenState extends State { @override Widget build(BuildContext context) { - getSharedPref(); return AppScaffold( isLoading: _isLoading, + isShowAppBar: false, body: SafeArea( child: ListView(children: [ FutureBuilder( @@ -80,24 +80,24 @@ class _LoginsreenState extends State { children: [ (platformImei == null) ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.knownUser), - LoginForm( - changeLoadingStata: - changeLoadingStata, - ), - ], - ) + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.knownUser), + LoginForm( + changeLoadingStata: + changeLoadingStata, + ), + ], + ) : Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.unknownUser), - KnownUserLogin(), - ], - ), + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.unknownUser), + KnownUserLogin(), + ], + ), ])); } } diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 830530c9..d5ab66ad 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -38,6 +38,7 @@ class _VerificationMethodsScreenState extends State { Widget build(BuildContext context) { return AppScaffold( isLoading: _isLoading, + isShowAppBar: false, body: ListView(children: [ Container( margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), diff --git a/lib/screens/auth/verify_account_screen.dart b/lib/screens/auth/verify_account_screen.dart index b7eee5df..e69d973e 100644 --- a/lib/screens/auth/verify_account_screen.dart +++ b/lib/screens/auth/verify_account_screen.dart @@ -30,6 +30,7 @@ class _VerifyAccountScreenState extends State { Widget build(BuildContext context) { return AppScaffold( isLoading: _isLoading, + isShowAppBar: false, body: SafeArea( child: ListView(children: [ Container( diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 0252b141..e1540f93 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart' import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; @@ -26,6 +27,7 @@ import '../widgets/shared/rounded_container_widget.dart'; import 'doctor/doctor_reply_screen.dart'; import 'doctor/my_referral_patient_screen.dart'; import 'doctor/my_referred_patient_screen.dart'; + DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = Helpers(); @@ -41,20 +43,21 @@ class DashboardScreen extends StatefulWidget { class _DashboardScreenState extends State { HospitalProvider hospitalProvider; AuthProvider authProvider; - + bool isLoading = false; @override Widget build(BuildContext context) { hospitalProvider = Provider.of(context); authProvider = Provider.of(context); print(authProvider.doctorsClinicList); FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { currentFocus.unfocus(); } return SafeArea( bottom: true, - child: Scaffold( + child: AppScaffold( + isShowAppBar: false, + isLoading: isLoading, body: SingleChildScrollView( child: SizedBox( height: MediaQuery.of(context).size.height * 1.09, @@ -434,11 +437,8 @@ class _DashboardScreenState extends State { ), ), ); - } - - showCupertinoPicker( {context, List actionList, decKey, onSelectFun}) { showModalBottomSheet( @@ -487,11 +487,12 @@ class _DashboardScreenState extends State { children: actionList .map((e) => Container( child: InkWell( - onTap: ()=>changeClinic(e.clinicID,context), + onTap: () => + changeClinic(e.clinicID, context), child: Text( - e.clinicName, - style: TextStyle(fontSize: 15), - )), + e.clinicName, + style: TextStyle(fontSize: 15), + )), )) .toList(), )) @@ -501,10 +502,11 @@ class _DashboardScreenState extends State { }); } - changeClinic(clinicId , BuildContext context) async{ + changeClinic(clinicId, BuildContext context) async { + Navigator.pop(context); + changeIsLoading(true); Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = - new DoctorProfileModel.fromJson(profile); + DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); ProfileReqModel docInfo = new ProfileReqModel( doctorID: doctorProfile.doctorID, clinicID: clinicId, @@ -513,16 +515,21 @@ class _DashboardScreenState extends State { tokenID: '', languageID: 2); - // authProvider.getDocProfiles(docInfo) - authProvider.getDocProfiles(docInfo.toJson()).then((res)async { - sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); - Navigator.pop(context); - - }).catchError((err) { + authProvider.getDocProfiles(docInfo.toJson()).then((res) async { + + changeIsLoading(false); + sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); - // changeLoadingStata(false); + }).catchError((err) { + changeIsLoading(false); helpers.showErrorToast(err); }); } + + changeIsLoading(bool val) { + setState(() { + this.isLoading = val; + }); + } } diff --git a/lib/screens/doctor/message_screen.dart b/lib/screens/doctor/message_screen.dart index 18c6bf93..17d57c47 100644 --- a/lib/screens/doctor/message_screen.dart +++ b/lib/screens/doctor/message_screen.dart @@ -1,11 +1,11 @@ -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; class MessagesScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( + return AppScaffold( + isShowAppBar: false, body: Center( child: Text('Messages heeer'), ), diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index 36b449a7..281357ca 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/providers/schedule_provider.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/doctor/my_schedule_widget.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/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/material.dart'; @@ -13,7 +14,8 @@ class MyScheduleScreen extends StatelessWidget { @override Widget build(BuildContext context) { scheduleProvider = Provider.of(context); - return Scaffold( + return AppScaffold( + isShowAppBar: false, body: scheduleProvider.isLoading ? DrAppCircularProgressIndeicator() : scheduleProvider.isError diff --git a/lib/screens/doctor/services_screen.dart b/lib/screens/doctor/services_screen.dart index 1000e694..d470cc87 100644 --- a/lib/screens/doctor/services_screen.dart +++ b/lib/screens/doctor/services_screen.dart @@ -4,7 +4,8 @@ import 'package:flutter/material.dart'; class ServicesScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( + return AppScaffold( + isShowAppBar: false, body: Center( child: Text('Services heeer'), ), diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index f020ca2e..1a91c7f3 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -98,7 +98,8 @@ class _PatientSearchScreenState extends State { }); } } catch (err) { - handelCatchErrorCase(err); + error = err; + // handelCatchErrorCase(err); } } diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 96211046..8182b3f0 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -106,7 +106,7 @@ class _PatientsScreenState extends State { setState(() { _isError = true; _isLoading = false; - this.error = helpers.generateContactAdminMsg(error); + this.error = error; }); }); } diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index bea5a1fc..7da036d3 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -359,12 +359,9 @@ class _VerifyAccountState extends State { loginProcessCompleted( res['List_DoctorProfile'][0], changeLoadingStata); } else { - _asyncSimpleDialog(context, res['List_DoctorsClinic'], 'ClinicName', - 'Please Select Clinic') - .then((clinicInfo) { - ClinicModel clinic = ClinicModel.fromJson(clinicInfo); - getDocProfiles(clinic, changeLoadingStata); - }); + ClinicModel clinic = + ClinicModel.fromJson(res['List_DoctorsClinic'][0]); + getDocProfiles(clinic, changeLoadingStata); } } else { changeLoadingStata(false); @@ -372,9 +369,7 @@ class _VerifyAccountState extends State { } }).catchError((err) { changeLoadingStata(false); - - print('$err'); - helpers.showErrorToast(); + helpers.showErrorToast(err); }); } else { // changeLoadingStata(false); @@ -440,7 +435,6 @@ class _VerifyAccountState extends State { helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { - changeLoadingStata(false); helpers.showErrorToast(err); }); diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 824ba11b..9cc6f53c 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -9,15 +9,16 @@ class AppScaffold extends StatelessWidget { String appBarTitle; Widget body; bool isLoading; + bool isShowAppBar; - AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false}); + AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false, this.isShowAppBar = true}); @override Widget build(BuildContext context) { AppGlobal.CONTEX = context; return Scaffold( backgroundColor: Hexcolor('#F5F5F5'), - appBar: appBarTitle != '' + appBar: isShowAppBar ? AppBar( elevation: 0, backgroundColor: Hexcolor('#515B5D'), From 4e62947df203c8c7ea9464eb046a71eabb2fe803 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Tue, 16 Jun 2020 11:47:24 +0300 Subject: [PATCH 06/10] Modify patiant screen icon avatar --- .../patient/get_pending_patient_er_model.dart | 183 ++++++++++++++++++ lib/providers/pending_patient_provider.dart | 0 lib/screens/patients/patients_screen.dart | 41 ++-- 3 files changed, 207 insertions(+), 17 deletions(-) create mode 100644 lib/models/patient/get_pending_patient_er_model.dart create mode 100644 lib/providers/pending_patient_provider.dart diff --git a/lib/models/patient/get_pending_patient_er_model.dart b/lib/models/patient/get_pending_patient_er_model.dart new file mode 100644 index 00000000..e1b50a81 --- /dev/null +++ b/lib/models/patient/get_pending_patient_er_model.dart @@ -0,0 +1,183 @@ +/* + *@author: Amjad Amireh + *@Date:15/6/2020 + *@param: + *@return: + *@desc: Find list of pending patients Model + */ +import 'dart:convert'; + +ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str)); + +String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); + +class ListPendingPatientListModel { + ListPendingPatientListModel({ + this.acceptedBy, + this.acceptedOn, + this.age, + this.appointmentNo, + this.arrivalTime, + this.arrivalTimeD, + this.callStatus, + this.clientRequestId, + this.clinicName, + this.consoltationEnd, + this.consultationNotes, + this.createdOn, + this.dateOfBirth, + this.deviceToken, + this.deviceType, + this.doctorName, + this.editOn, + this.gender, + this.isFollowUp, + this.isFromVida, + this.isLoginB, + this.isOutKsa, + this.isRejected, + this.language, + this.latitude, + this.longitude, + this.mobileNumber, + this.openSession, + this.openTokenId, + this.patientId, + this.patientName, + this.patientStatus, + this.preferredLanguage, + this.projectId, + this.scoring, + this.serviceId, + this.tokenId, + this.vcId, + this.voipToken, + }); + + dynamic acceptedBy; + dynamic acceptedOn; + int age; + dynamic appointmentNo; + String arrivalTime; + String arrivalTimeD; + int callStatus; + String clientRequestId; + String clinicName; + dynamic consoltationEnd; + dynamic consultationNotes; + dynamic createdOn; + DateTime dateOfBirth; + String deviceToken; + String deviceType; + dynamic doctorName; + String editOn; + String gender; + bool isFollowUp; + dynamic isFromVida; + int isLoginB; + bool isOutKsa; + int isRejected; + String language; + double latitude; + double longitude; + String mobileNumber; + dynamic openSession; + dynamic openTokenId; + String patientId; + String patientName; + int patientStatus; + String preferredLanguage; + int projectId; + int scoring; + int serviceId; + dynamic tokenId; + int vcId; + String voipToken; + + factory ListPendingPatientListModel.fromJson(Map json) => ListPendingPatientListModel( + acceptedBy: json["AcceptedBy"], + acceptedOn: json["AcceptedOn"], + age: json["Age"], + appointmentNo: json["AppointmentNo"], + arrivalTime: json["ArrivalTime"], + arrivalTimeD: json["ArrivalTimeD"], + callStatus: json["CallStatus"], + clientRequestId: json["ClientRequestID"], + clinicName: json["ClinicName"], + consoltationEnd: json["ConsoltationEnd"], + consultationNotes: json["ConsultationNotes"], + createdOn: json["CreatedOn"], + dateOfBirth: DateTime.parse(json["DateOfBirth"]), + deviceToken: json["DeviceToken"], + deviceType: json["DeviceType"], + doctorName: json["DoctorName"], + editOn: json["EditOn"], + gender: json["Gender"], + isFollowUp: json["IsFollowUP"], + isFromVida: json["IsFromVida"], + isLoginB: json["IsLoginB"], + isOutKsa: json["IsOutKSA"], + isRejected: json["IsRejected"], + language: json["Language"], + latitude: json["Latitude"].toDouble(), + longitude: json["Longitude"].toDouble(), + mobileNumber: json["MobileNumber"], + openSession: json["OpenSession"], + openTokenId: json["OpenTokenID"], + patientId: json["PatientID"], + patientName: json["PatientName"], + patientStatus: json["PatientStatus"], + preferredLanguage: json["PreferredLanguage"], + projectId: json["ProjectID"], + scoring: json["Scoring"], + serviceId: json["ServiceID"], + tokenId: json["TokenID"], + vcId: json["VC_ID"], + voipToken: json["VoipToken"], + ); + + Map toJson() => { + "AcceptedBy": acceptedBy, + "AcceptedOn": acceptedOn, + "Age": age, + "AppointmentNo": appointmentNo, + "ArrivalTime": arrivalTime, + "ArrivalTimeD": arrivalTimeD, + "CallStatus": callStatus, + "ClientRequestID": clientRequestId, + "ClinicName": clinicName, + "ConsoltationEnd": consoltationEnd, + "ConsultationNotes": consultationNotes, + "CreatedOn": createdOn, + "DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", + "DeviceToken": deviceToken, + "DeviceType": deviceType, + "DoctorName": doctorName, + "EditOn": editOn, + "Gender": gender, + "IsFollowUP": isFollowUp, + "IsFromVida": isFromVida, + "IsLoginB": isLoginB, + "IsOutKSA": isOutKsa, + "IsRejected": isRejected, + "Language": language, + "Latitude": latitude, + "Longitude": longitude, + "MobileNumber": mobileNumber, + "OpenSession": openSession, + "OpenTokenID": openTokenId, + "PatientID": patientId, + "PatientName": patientName, + "PatientStatus": patientStatus, + "PreferredLanguage": preferredLanguage, + "ProjectID": projectId, + "Scoring": scoring, + "ServiceID": serviceId, + "TokenID": tokenId, + "VC_ID": vcId, + "VoipToken": voipToken, + }; +} +// To parse this JSON data, do +// +// final listPendingPatientListModel = listPendingPatientListModelFromJson(jsonString); diff --git a/lib/providers/pending_patient_provider.dart b/lib/providers/pending_patient_provider.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 96211046..6cb47cd2 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; import '../../config/size_config.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -383,23 +384,29 @@ class _PatientsScreenState extends State { 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') - ], + children: [ + Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment(-1, -1), + end: Alignment(1, 1), + colors: [ + Colors.grey[100], + Colors.grey[200], + ]), + boxShadow: [ + BoxShadow( + color: Color.fromRGBO(0, 0, 0, 0.08), + offset: Offset(0.0, 5.0), + blurRadius: 16.0) + ], + borderRadius: BorderRadius.all(Radius.circular(50.0)), + ), + width: 80, + height: 80, + child: Icon(item.genderDescription == "Male" ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), + + ], ), SizedBox( width: 10, From 57708de8e4f02a38409175dc6b8f7e919c2bbc2e Mon Sep 17 00:00:00 2001 From: ibrahim albitar Date: Tue, 16 Jun 2020 15:00:47 +0300 Subject: [PATCH 07/10] pharmacies screen scrollview --- .../medicine/pharmacies_list_screen.dart | 305 +++++++++--------- 1 file changed, 156 insertions(+), 149 deletions(-) diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index 60f24862..6974eaa4 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -51,166 +51,173 @@ class _PharmaciesListState extends State { Widget build(BuildContext context) { return AppScaffold( appBarTitle: "Pharmacies List", - body: Column(children: [ - RoundedContainer( - child: !_medicineProvider.isFinished - ? DrAppCircularProgressIndeicator() - : _medicineProvider.hasError - ? Center( - child: Text( - _medicineProvider.errorMsg, - style: - TextStyle(color: Theme.of(context).errorColor), - ), - ) - : StreamBuilder( - stream: null, - builder: (context, snapshot) { - return Row( - children: [ - Expanded( - flex: 1, - child: ClipRRect( - borderRadius: - BorderRadius.all(Radius.circular(7)), - child: Image.memory( - dataFromBase64String(widget.url), - height: SizeConfig.imageSizeMultiplier * 21, - width: SizeConfig.imageSizeMultiplier * 20, - fit: BoxFit.cover, + body: Container( + height: SizeConfig.screenHeight, + child: ListView( + shrinkWrap: true, + scrollDirection: Axis.vertical, + physics: const AlwaysScrollableScrollPhysics(), + children: [ + RoundedContainer( + child: !_medicineProvider.isFinished + ? DrAppCircularProgressIndeicator() + : _medicineProvider.hasError + ? Center( + child: Text( + _medicineProvider.errorMsg, + style: + TextStyle(color: Theme.of(context).errorColor), + ), + ) + : StreamBuilder( + stream: null, + builder: (context, snapshot) { + return Row( + children: [ + Expanded( + flex: 1, + child: ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(7)), + child: Image.memory( + dataFromBase64String(widget.url), + height: SizeConfig.imageSizeMultiplier * 21, + width: SizeConfig.imageSizeMultiplier * 20, + fit: BoxFit.cover, + ), ), ), + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.stretch, + children: [ + AppText( + "Description", + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 2, + fontWeight: FontWeight.bold, + ), + AppText( + _data[0]["ItemDescription"], + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 10, + ), + AppText( + "Price", + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 2, + fontWeight: FontWeight.bold, + ), + AppText( + _data[0]["SellingPrice"].toString(), + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 10, + ), + ], + ), + ) + ], + ); + })), + Container( + margin: EdgeInsets.only(top:SizeConfig.widthMultiplier * 2, + bottom: SizeConfig.widthMultiplier * 2, + right: SizeConfig.widthMultiplier * 4, + left: SizeConfig.widthMultiplier * 4,), + child: Align( + alignment: Alignment.centerLeft, + child: AppText( + "You can Find it in", + fontWeight: FontWeight.bold, + ))), + Expanded( + child: Container( + width: SizeConfig.screenWidth * 0.99, + child: ListView.builder( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics() , + itemCount: _data == null ? 0 : _data.length, + itemBuilder: (BuildContext context, int index) { + return RoundedContainer( + child: Row( + children: [ + Expanded( + flex: 1, + child: ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(7)), + child: Image.network( + _data[index]["ProjectImageURL"], + height: SizeConfig.imageSizeMultiplier * 15, + width: SizeConfig.imageSizeMultiplier * 15, + fit: BoxFit.cover, ), - Expanded( - flex: 3, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.stretch, - children: [ - AppText( - "Description", - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 2, - fontWeight: FontWeight.bold, - ), - AppText( - _data[0]["ItemDescription"], - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 10, - ), - AppText( - "Price", - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 2, - fontWeight: FontWeight.bold, - ), - AppText( - _data[0]["SellingPrice"].toString(), - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 10, - ), - ], - ), - ) - ], - ); - })), - Container( - margin: EdgeInsets.only(top:SizeConfig.widthMultiplier * 2, - bottom: SizeConfig.widthMultiplier * 2, - right: SizeConfig.widthMultiplier * 4, - left: SizeConfig.widthMultiplier * 4,), - child: Align( - alignment: Alignment.centerLeft, - child: AppText( - "You can Find it in", - fontWeight: FontWeight.bold, - ))), - Expanded( - child: Container( - width: SizeConfig.screenWidth * 0.99, - child: ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: _data == null ? 0 : _data.length, - itemBuilder: (BuildContext context, int index) { - return RoundedContainer( - child: Row( - children: [ - Expanded( - flex: 1, - child: ClipRRect( - borderRadius: - BorderRadius.all(Radius.circular(7)), - child: Image.network( - _data[index]["ProjectImageURL"], - height: SizeConfig.imageSizeMultiplier * 15, - width: SizeConfig.imageSizeMultiplier * 15, - fit: BoxFit.cover, ), ), - ), - Expanded( - flex: 4, - child: AppText( - _data[index]["LocationDescription"], - margin: 10, + Expanded( + flex: 4, + child: AppText( + _data[index]["LocationDescription"], + margin: 10, + ), ), - ), - Expanded( - flex: 2, - child: Wrap( - direction: Axis.horizontal, - alignment: WrapAlignment.end, - crossAxisAlignment: WrapCrossAlignment.end, - children: [ - Padding( - padding: EdgeInsets.all(5), - child: InkWell( - child: Icon( - Icons.call, - color: Colors.red, + Expanded( + flex: 2, + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.end, + crossAxisAlignment: WrapCrossAlignment.end, + children: [ + Padding( + padding: EdgeInsets.all(5), + child: InkWell( + child: Icon( + Icons.call, + color: Colors.red, + ), + onTap: () => launch( + "tel://" + _data[index]["PhoneNumber"]), ), - onTap: () => launch( - "tel://" + _data[index]["PhoneNumber"]), ), - ), - Padding( - padding: EdgeInsets.all(5), - child: InkWell( - child: Icon( - Icons.pin_drop, - color: Colors.red, + Padding( + padding: EdgeInsets.all(5), + child: InkWell( + child: Icon( + Icons.pin_drop, + color: Colors.red, + ), + onTap: () { + MapsLauncher.launchCoordinates( + double.parse( + _data[index]["Latitude"]), + double.parse( + _data[index]["Longitude"]), + _data[index]["LocationDescription"]); + }, ), - onTap: () { - MapsLauncher.launchCoordinates( - double.parse( - _data[index]["Latitude"]), - double.parse( - _data[index]["Longitude"]), - _data[index]["LocationDescription"]); - }, ), - ), - ], + ], + ), ), - ), - ], - ), - ); - }), - ), - ) - ])); + ], + ), + ); + }), + ), + ) + ]), + )); } Future pharmaciesList() async { From a02fe9c83da2131baf059456dcd858225f77864e Mon Sep 17 00:00:00 2001 From: hussam alhababieh Date: Tue, 16 Jun 2020 16:37:16 +0300 Subject: [PATCH 08/10] translation stage two --- lib/config/localized_values.dart | 17 + lib/screens/dashboard_screen.dart | 2 +- .../doctor/my_referral_patient_screen.dart | 7 +- .../doctor/my_referred_patient_screen.dart | 81 +-- .../lab_result/lab_result_secreen.dart | 22 +- .../profile/progress_note_screen.dart | 26 +- lib/util/translations_delegate_base.dart | 16 + lib/widgets/doctor/lab_result_widget.dart | 34 +- .../doctor/my_referral_patient_widget.dart | 499 +++++++++--------- 9 files changed, 385 insertions(+), 319 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 6577d31e..eabd50fc 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -96,4 +96,21 @@ const Map> localizedValues = { 'en': 'You don\'t have any lab orders', 'ar': 'ليس لديك اي فحوصات طبية' }, + 'answerThePatient': {'en': 'answer the patient', 'ar': 'اجب المريض '}, + 'pleaseEnterAnswer': { + 'en': 'please enter answer', + 'ar': 'الرجاء ادخال اجابة ' + }, + 'replay': {'en': 'Replay', 'ar': 'تاكيد'}, + 'progressNote': {'en': 'Progress Note', 'ar': 'ملاحظة التقدم'}, + 'searchNote': {'en': 'Search Note', 'ar': 'بحث عن ملاحظة'}, + 'errorNoProgressNote': { + 'en': 'You don\'t have any Progress Note', + 'ar': 'ليس لديك اي ملاحظة تقدم ' + }, + 'invoiceNo:': {'en': 'Invoice No :', 'ar': 'رقم الفاتورة'}, + 'generalResult': {'en': 'General Result :', 'ar': 'النتيجة العامة'}, + 'description': {'en': 'Description', 'ar': 'الوصف'}, + 'value': {'en': 'Value', 'ar': 'القيمة'}, + 'range': {'en': 'range', 'ar': 'النطاق'}, }; diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 5a947f66..cb55582f 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -399,7 +399,7 @@ class _DashboardScreenState extends State { child: DashboardItemIconText( widget.iconURL + 'qr-code.svg', "", - "QR Reader", + TranslationBase.of(context).qrReader, showBorder: true, backgroundColor: Colors.white, valueFontColor: Colors.black, diff --git a/lib/screens/doctor/my_referral_patient_screen.dart b/lib/screens/doctor/my_referral_patient_screen.dart index 58c6e432..10b73d6b 100644 --- a/lib/screens/doctor/my_referral_patient_screen.dart +++ b/lib/screens/doctor/my_referral_patient_screen.dart @@ -17,7 +17,7 @@ class MyReferralPatient extends StatelessWidget { Widget build(BuildContext context) { referralPatientProvider = Provider.of(context); return AppScaffold( - appBarTitle: 'My Referral Patient', + appBarTitle: TranslationBase.of(context).myReferralPatient, body: referralPatientProvider.isLoading ? DrAppCircularProgressIndeicator() : referralPatientProvider.isError @@ -43,11 +43,12 @@ class MyReferralPatient extends StatelessWidget { children: [ SizedBox( height: 10, - ), Container( child: Column( - children: referralPatientProvider.listMyReferralPatientModel.map((item) { + children: referralPatientProvider + .listMyReferralPatientModel + .map((item) { return MyReferralPatientWidget( myReferralPatientModel: item, ); diff --git a/lib/screens/doctor/my_referred_patient_screen.dart b/lib/screens/doctor/my_referred_patient_screen.dart index e2220855..48c68c61 100644 --- a/lib/screens/doctor/my_referred_patient_screen.dart +++ b/lib/screens/doctor/my_referred_patient_screen.dart @@ -9,58 +9,59 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class MyReferredPatient extends StatelessWidget { - MyReferredPatientProvider referredPatientProvider; @override Widget build(BuildContext context) { referredPatientProvider = Provider.of(context); return AppScaffold( - appBarTitle: 'My Referred Patient', + appBarTitle: TranslationBase.of(context).myReferredPatient, body: referredPatientProvider.isLoading ? DrAppCircularProgressIndeicator() : referredPatientProvider.isError - ? Center( - child: AppText( - referredPatientProvider.error, - color: Theme.of(context).errorColor, - ), - ) - - : referredPatientProvider.listMyReferredPatientModel.length == 0 - ? Center( - child: AppText( - TranslationBase.of(context).errorNoSchedule, - color: Theme.of(context).errorColor, - ), - ) - : Container( - padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0), - child: ListView( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - Container( - child: Column( - //children: referredPatientProvider.listMyReferralPatientModel.map((item) { - children: referredPatientProvider.listMyReferredPatientModel.map((item) { - return MyReferredPatientWidget( - myReferredPatientModel: item, - ); - }).toList(), + ? Center( + child: AppText( + referredPatientProvider.error, + color: Theme.of(context).errorColor, ), - ), - ], - ), - ], - ), - ), + ) + : referredPatientProvider.listMyReferredPatientModel.length == 0 + ? Center( + child: AppText( + TranslationBase.of(context).errorNoSchedule, + color: Theme.of(context).errorColor, + ), + ) + : Container( + padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0), + child: ListView( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Container( + child: Column( + //children: referredPatientProvider.listMyReferralPatientModel.map((item) { + children: referredPatientProvider + .listMyReferredPatientModel + .map((item) { + return MyReferredPatientWidget( + myReferredPatientModel: item, + ); + }).toList(), + ), + ), + ], + ), + ], + ), + ), ); } } diff --git a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart b/lib/screens/patients/profile/lab_result/lab_result_secreen.dart index a8583d4a..54c9e30a 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_secreen.dart @@ -12,6 +12,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class LabResult extends StatefulWidget { final LabOrdersResModel labOrders; @@ -40,13 +41,14 @@ class _LabResultState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Lab Orders", + appBarTitle: TranslationBase.of(context).labOrders, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) : patientsProv.labResultList.length == 0 - ? DrAppEmbeddedError(error: 'You don\'t have any Orders') + ? DrAppEmbeddedError( + error: TranslationBase.of(context).errorNoLabOrders) : Container( margin: EdgeInsets.fromLTRB( SizeConfig.realScreenWidth * 0.05, @@ -57,25 +59,25 @@ class _LabResultState extends State { children: [ CardWithBgWidgetNew( widget: Row( - mainAxisAlignment: - MainAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ AppText( - ' Invoice No :', - fontSize: - 2 * SizeConfig.textMultiplier, + TranslationBase.of(context).invoiceNo, + fontSize: 2 * SizeConfig.textMultiplier, color: Colors.grey[800], ), AppText( ' ${widget.labOrders.invoiceNo}', - fontSize: - 2 * SizeConfig.textMultiplier, + fontSize: 2 * SizeConfig.textMultiplier, color: Colors.grey[800], ), ], ), ), - CardWithBgWidgetNew(widget: LabResultWidget(labResult: patientsProv.labResultList,)) + CardWithBgWidgetNew( + widget: LabResultWidget( + labResult: patientsProv.labResultList, + )) ], ), ), diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart index f9d8be44..a2aea154 100644 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ b/lib/screens/patients/profile/progress_note_screen.dart @@ -14,6 +14,7 @@ import '../../../util/dr_app_shared_pref.dart'; import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -75,14 +76,14 @@ class _ProgressNoteState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Progress Note", + appBarTitle: TranslationBase.of(context).progressNote, body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) : notesList == null ? DrAppEmbeddedError( - error: 'You don\'t have any Progress Note') + error: TranslationBase.of(context).errorNoProgressNote) : Column( children: [ Container( @@ -93,8 +94,8 @@ class _ProgressNoteState extends State { onChanged: (String str) { this.searchData(str); }, - decoration: - buildInputDecoration(context, 'Search Note'), + decoration: buildInputDecoration(context, + TranslationBase.of(context).searchNote), ), ), Expanded( @@ -116,7 +117,8 @@ class _ProgressNoteState extends State { ExpansionTile( title: Container( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( notesList[index] @@ -138,12 +140,12 @@ class _ProgressNoteState extends State { ), children: [ Divider( - color: Colors.black, - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), + color: Colors.black, + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), AppText( notesList[index]["Notes"], margin: 5, @@ -182,7 +184,7 @@ class _ProgressNoteState extends State { if (strExist) { filteredNotesList = null; - filteredNotesList = patientsProv.patientProgressNoteList + filteredNotesList = patientsProv.patientProgressNoteList .where((note) => note["DoctorName"].toString().contains(str.toUpperCase())) .toList(); diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index b9e63bf4..f99d615a 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -125,6 +125,22 @@ class TranslationBase { String get labOrders => localizedValues['labOrders'][locale.languageCode]; String get errorNoLabOrders => localizedValues['errorNoLabOrders'][locale.languageCode]; + String get answerThePatient => + localizedValues['answerThePatient'][locale.languageCode]; + String get pleaseEnterAnswer => + localizedValues['pleaseEnterAnswer'][locale.languageCode]; + String get replay => localizedValues['replay'][locale.languageCode]; + String get progressNote => + localizedValues['progressNote'][locale.languageCode]; + String get searchNote => localizedValues['searchNote'][locale.languageCode]; + String get errorNoProgressNote => + localizedValues['errorNoProgressNote'][locale.languageCode]; + String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode]; + String get generalResult => + localizedValues['generalResult'][locale.languageCode]; + String get description => localizedValues['description'][locale.languageCode]; + String get value => localizedValues['value'][locale.languageCode]; + String get range => localizedValues['range'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/doctor/lab_result_widget.dart b/lib/widgets/doctor/lab_result_widget.dart index 73cdba66..5ae4f901 100644 --- a/lib/widgets/doctor/lab_result_widget.dart +++ b/lib/widgets/doctor/lab_result_widget.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class LabResultWidget extends StatefulWidget { final List labResult; @@ -30,7 +31,7 @@ class _LabResultWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - 'General Result', + TranslationBase.of(context).generalResult, fontSize: 2.5 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, ), @@ -57,23 +58,18 @@ class _LabResultWidgetState extends State { margin: EdgeInsets.only(top: 10), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(10)), - ), child: Column( children: widget.labResult.map((result) { return Container( decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), + borderRadius: BorderRadius.all(Radius.circular(10)), border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), + bottom: + BorderSide(color: Colors.grey, width: 0.5), + top: BorderSide(color: Colors.grey, width: 0.5), + left: BorderSide(color: Colors.grey, width: 0.5), + right: BorderSide(color: Colors.grey, width: 0.5), ), ), margin: EdgeInsets.only(top: 10), @@ -92,7 +88,8 @@ class _LabResultWidgetState extends State { ), child: Center( child: Texts( - 'Description', + TranslationBase.of(context) + .description, color: Colors.white, ), ), @@ -103,7 +100,9 @@ class _LabResultWidgetState extends State { child: Container( color: Hexcolor('#515B5D'), child: Center( - child: Texts('Value', color: Colors.white), + child: Texts( + TranslationBase.of(context).value, + color: Colors.white), ), height: 60), ), @@ -116,7 +115,9 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts('Range', color: Colors.white), + child: Texts( + TranslationBase.of(context).range, + color: Colors.white), ), height: 60), ), @@ -143,8 +144,7 @@ class _LabResultWidgetState extends State { Expanded( child: Container( child: Center( - child: Texts( - '${result.resultValue}', + child: Texts('${result.resultValue}', color: Colors.grey[800]), ), height: 60), diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index f30de7cb..7d35e389 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class MyReferralPatientWidget extends StatefulWidget { final MyReferralPatientModel myReferralPatientModel; @@ -31,7 +32,8 @@ class _MyReferralPatientWidgetState extends State { @override void initState() { - answerController = new TextEditingController(text: widget.myReferralPatientModel.referredDoctorRemarks ?? ''); + answerController = new TextEditingController( + text: widget.myReferralPatientModel.referredDoctorRemarks ?? ''); super.initState(); } @@ -59,260 +61,285 @@ class _MyReferralPatientWidgetState extends State { Icon(_showDetails ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down), - ], ), ), !_showDetails ? Container() : AnimatedContainer( - duration: Duration(milliseconds: 200), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 5,), - Divider(color: Color(0xFF000000),height: 0.5,), - Table( - border: TableBorder.symmetric(inside: BorderSide(width: 0.5),), - children: [ - TableRow( + duration: Duration(milliseconds: 200), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 5, + ), + Divider( + color: Color(0xFF000000), + height: 0.5, + ), + Table( + border: TableBorder.symmetric( + inside: BorderSide(width: 0.5), + ), children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'File No', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - '${widget.myReferralPatientModel.referringDoctor}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + TableRow(children: [ + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).fileNo, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + AppText( + '${widget.myReferralPatientModel.referringDoctor}', + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), ), - ), - Container( - margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Referring Doctor', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - widget.myReferralPatientModel - .referringClinicDescription, - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + Container( + margin: EdgeInsets.only( + left: 4, top: 2.5, right: 2.5, bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .referralDoctor, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + AppText( + widget.myReferralPatientModel + .referringClinicDescription, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), ), - ), - ] - ), - TableRow( - children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Referring Clinic', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - '${widget.myReferralPatientModel.referringClinicDescription}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + ]), + TableRow(children: [ + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .referringClinic, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + AppText( + '${widget.myReferralPatientModel.referringClinicDescription}', + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), ), - ), - Container( - margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Frequency', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, + Container( + margin: EdgeInsets.only( + left: 4, top: 2.5, right: 2.5, bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).frequency, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + AppText( + widget.myReferralPatientModel + .frequencyDescription, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), + ) + ]), + TableRow( + children: [ + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).priority, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + AppText( + '${widget.myReferralPatientModel.priorityDescription}', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], ), - SizedBox(height: 5,), - AppText( - widget.myReferralPatientModel - .frequencyDescription, - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ) - ] - ), - TableRow( - children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Priority', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, ), - SizedBox(height: 5,), - AppText( - '${widget.myReferralPatientModel.priorityDescription}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, + Container( + margin: EdgeInsets.only( + left: 4, + top: 2.5, + right: 2.5, + bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .maxResponseTime, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 5, + ), + AppText( + Helpers.getDateFormatted(widget + .myReferralPatientModel + .mAXResponseTime), + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), ) ], ), - ), - Container( - margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Max Response Time', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - Helpers.getDateFormatted(widget - .myReferralPatientModel - .mAXResponseTime), - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + ], + ), + Divider( + color: Color(0xFF000000), + height: 0.5, + ), + SizedBox( + height: 5, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .clinicDetailsandRemarks, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + textAlign: TextAlign.start, ), - ) - ], - ), - - ], - ), - Divider(color: Color(0xFF000000),height: 0.5,), - SizedBox( - height: 5, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Clinic Details and Remarks', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - textAlign: TextAlign.start,), - Texts( - '${widget.myReferralPatientModel.referringDoctorRemarks}', - style: "bodyText1", - readMore: true, + Texts( + '${widget.myReferralPatientModel.referringDoctorRemarks}', + style: "bodyText1", + readMore: true, + textAlign: TextAlign.start, + maxLength: 100) + ], + ), + SizedBox( + height: 5, + ), + AppText( + TranslationBase.of(context).answerSuggestions, + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, textAlign: TextAlign.start, - maxLength: 100) - ], - ), - SizedBox( - height: 5, - ), - AppText( - 'Answer/Suggestions', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - textAlign: TextAlign.start, - ), - SizedBox( - height: 5, - ), - Form( - key: _formKey, - child: TextFields( - maxLines: 2, - minLines: 2, - hintText: 'Answer the patient', - fontWeight: FontWeight.normal, - initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '', - readOnly: _isLoading, - validator: (value) { - if (value.isEmpty) - return "please enter answer"; - else - return null; - }, - ), - ), - SizedBox(height: 10.0), - SizedBox(height: 10.0), - Container( - width: double.infinity, - margin: EdgeInsets.only(left: 10,right: 10), - child: Button( - onTap: () async { - final form = _formKey.currentState; - if (form.validate()) { - setState(() { - _isLoading = true; - }); - try { - await Provider.of(context, listen: false).replay(answerController.text.toString(), widget.myReferralPatientModel); - setState(() { - _isLoading = false; - }); - DrAppToastMsg.showSuccesToast('Reply Successfully'); - - } catch (e) { - setState(() { - _isLoading = false; - }); - DrAppToastMsg.showErrorToast(e); - } - } - }, - title: 'Reply', - loading: _isLoading, + ), + SizedBox( + height: 5, + ), + Form( + key: _formKey, + child: TextFields( + maxLines: 2, + minLines: 2, + hintText: + TranslationBase.of(context).answerThePatient, + fontWeight: FontWeight.normal, + initialValue: widget.myReferralPatientModel + .referredDoctorRemarks ?? + '', + readOnly: _isLoading, + validator: (value) { + if (value.isEmpty) + return TranslationBase.of(context) + .pleaseEnterAnswer; + else + return null; + }, + ), + ), + SizedBox(height: 10.0), + SizedBox(height: 10.0), + Container( + width: double.infinity, + margin: EdgeInsets.only(left: 10, right: 10), + child: Button( + onTap: () async { + final form = _formKey.currentState; + if (form.validate()) { + setState(() { + _isLoading = true; + }); + try { + await Provider.of( + context, + listen: false) + .replay(answerController.text.toString(), + widget.myReferralPatientModel); + setState(() { + _isLoading = false; + }); + DrAppToastMsg.showSuccesToast( + 'Reply Successfully'); + } catch (e) { + setState(() { + _isLoading = false; + }); + DrAppToastMsg.showErrorToast(e); + } + } + }, + title: TranslationBase.of(context).replay, + loading: _isLoading, + ), + ) + ], ), ) - ], - ), - ) ], ), ), From ea78db6a75f882a612ad88b9cc5c6b5e5737cd14 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 17 Jun 2020 11:50:30 +0300 Subject: [PATCH 09/10] Merge branch 'master' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into hussam # Conflicts: # lib/config/localized_values.dart # lib/screens/dashboard_screen.dart # lib/util/translations_delegate_base.dart --- lib/screens/profile_screen.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 30b7e6f0..979e187d 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -35,20 +35,19 @@ class _ProfileScreenState extends State { appBarTitle: TranslationBase.of(context).profile, body: ListView(padding: EdgeInsets.zero, children: [ Container( - height:MediaQuery.of(context).size.height * 0.35, //SizeConfig.heightMultiplier * 35, + height: MediaQuery.of(context).size.height * + 0.35, //SizeConfig.heightMultiplier * 35, child: Container( - child: DrawerHeader( - child: Container( - child: ProfileImageWidget( - url:doctorProfile.doctorImageURL, - //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - name: doctorProfile.doctorName,//"Dr. Chris evans", - des: doctorProfile.clinicDescription//"Director of medical records", - ), + url: doctorProfile.doctorImageURL, + //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", + name: doctorProfile.doctorName, //"Dr. Chris evans", + des: doctorProfile + .clinicDescription //"Director of medical records", + ), ), ), ), @@ -90,4 +89,3 @@ class _ProfileScreenState extends State { ])); } } - From 6747495ea8b1ac099881db46fd93a734d71ee5ec Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Wed, 17 Jun 2020 12:03:45 +0300 Subject: [PATCH 10/10] fix issues in login --- lib/widgets/auth/login_form.dart | 9 +++------ lib/widgets/auth/verfiy_account.dart | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index 17b5520d..6e6b306d 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -50,17 +50,18 @@ class _LoginFormState extends State { Channel: 9, SessionID: "i1UJwCTSqt"); + AuthProvider authProv; @override void initState() { super.initState(); initPlatformState(); - - } @override void didChangeDependencies() { super.didChangeDependencies(); + authProv = Provider.of(context); + if (_isInit) { if (projectsList.length == 0) { getProjectsList(); @@ -72,10 +73,6 @@ class _LoginFormState extends State { @override Widget build(BuildContext context) { - - - AuthProvider authProv = Provider.of(context); - return Form( key: loginFormKey, child: Container( diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 7da036d3..a801fec9 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -349,7 +349,6 @@ class _VerifyAccountState extends State { "IsLoginForDoctorApp": true, "IsSilentLogIN": false }; - changeLoadingStata(true); authProv.memberCheckActivationCodeNew(model).then((res) { // changeLoadingStata(false); @@ -371,8 +370,6 @@ class _VerifyAccountState extends State { changeLoadingStata(false); helpers.showErrorToast(err); }); - } else { - // changeLoadingStata(false); } }