diff --git a/assets/images/appointment_booking.png b/assets/images/appointment_booking.png new file mode 100644 index 00000000..14db8d89 Binary files /dev/null and b/assets/images/appointment_booking.png differ diff --git a/assets/images/book_appointment_arabic.png b/assets/images/book_appointment_arabic.png new file mode 100644 index 00000000..f0bc5aff Binary files /dev/null and b/assets/images/book_appointment_arabic.png differ diff --git a/assets/images/booking_ar.png b/assets/images/booking_ar.png new file mode 100644 index 00000000..b562f288 Binary files /dev/null and b/assets/images/booking_ar.png differ diff --git a/assets/images/booking_en.png b/assets/images/booking_en.png new file mode 100644 index 00000000..a3ffa8be Binary files /dev/null and b/assets/images/booking_en.png differ diff --git a/assets/images/check-in.png b/assets/images/check-in.png new file mode 100644 index 00000000..f6effbeb Binary files /dev/null and b/assets/images/check-in.png differ diff --git a/assets/images/device_icon.png b/assets/images/device_icon.png new file mode 100644 index 00000000..8ad55c09 Binary files /dev/null and b/assets/images/device_icon.png differ diff --git a/assets/images/new-design/check-in.png b/assets/images/new-design/check-in.png index 8bed2242..f6effbeb 100644 Binary files a/assets/images/new-design/check-in.png and b/assets/images/new-design/check-in.png differ diff --git a/assets/images/online_payment_icon.png b/assets/images/online_payment_icon.png index a6e0150a..6e167ace 100644 Binary files a/assets/images/online_payment_icon.png and b/assets/images/online_payment_icon.png differ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 7e523457..f94a41cf 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1110,4 +1110,8 @@ const Map localizedValues = { "not-active": {"en": "Not Active", "ar": "غير نشط"}, "card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"}, "Dr": {"en": "Dr. ", "ar": "الدكتور."}, + "sendSuc":{ + "en":"A copy has been sent to the email", + "ar":"تم إرسال نسخة إلى البريد الإلكتروني" + }, }; diff --git a/lib/core/model/prescriptions/request_prescription_report.dart b/lib/core/model/prescriptions/request_prescription_report.dart index df901a99..c8323740 100644 --- a/lib/core/model/prescriptions/request_prescription_report.dart +++ b/lib/core/model/prescriptions/request_prescription_report.dart @@ -82,7 +82,7 @@ class RequestPrescriptionReport { data['EpisodeID'] = this.episodeID; data['ClinicID'] = this.clinicID; data['ProjectID'] = this.projectID; - // data['DischargeNo'] = this.dischargeNo; + data['DischargeNo'] = this.dischargeNo; return data; } } diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index d6ad3732..e9741a7f 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -72,6 +72,7 @@ class PrescriptionsService extends BaseService { prescriptionReportEnhList.clear(); if(prescriptions.isInOutPatient){ response['ListPRM'].forEach((prescriptions) { + prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); }); }else{ diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart index b3cb737b..965fa752 100644 --- a/lib/core/service/medical/radiology_service.dart +++ b/lib/core/service/medical/radiology_service.dart @@ -67,7 +67,7 @@ class RadiologyService extends BaseService { _requestSendRadReportEmail.patientName = user.firstName + " " + user.lastName; _requestSendRadReportEmail.patientIditificationNum = user.patientIdentificationNo; _requestSendRadReportEmail.projectName = finalRadiology.projectName; - _requestSendRadReportEmail.radResult = 'asd'; //finalRadiology.reportData; + _requestSendRadReportEmail.radResult = finalRadiology.reportData; _requestSendRadReportEmail.to = user.emailAddress; _requestSendRadReportEmail.dateofBirth = user.dateofBirth; diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index 1cd934e2..2c32a081 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -119,6 +119,7 @@ class PrescriptionsViewModel extends BaseViewModel { int patientID, String clinicName, String doctorName, + String mes, int projectID}) async { setState(ViewState.BusyLocal); await _prescriptionsService.sendPrescriptionEmail( @@ -128,7 +129,7 @@ class PrescriptionsViewModel extends BaseViewModel { setState(ViewState.ErrorLocal); AppToast.showErrorToast(message: error); } else { - AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail'); + AppToast.showSuccessToast(message: mes); setState(ViewState.Idle); } } diff --git a/lib/core/viewModels/medical/radiology_view_model.dart b/lib/core/viewModels/medical/radiology_view_model.dart index 26d40361..076707dc 100644 --- a/lib/core/viewModels/medical/radiology_view_model.dart +++ b/lib/core/viewModels/medical/radiology_view_model.dart @@ -80,7 +80,7 @@ class RadiologyViewModel extends BaseViewModel { } sendRadReportEmail( - {FinalRadiology finalRadiology}) async { + {FinalRadiology finalRadiology,String mes}) async { setState(ViewState.BusyLocal); await _radiologyService.sendRadReportEmail( finalRadiology: finalRadiology @@ -89,7 +89,7 @@ class RadiologyViewModel extends BaseViewModel { error = _radiologyService.error; AppToast.showErrorToast(message: error); } else { - AppToast.showSuccessToast(message: 'A copy has been sent to the email'); + AppToast.showSuccessToast(message: mes); } setState(ViewState.Idle); } diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index ed9fe2f4..1706ce8a 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -42,13 +42,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { ToDoCountProviderModel toDoProvider; - @override - // void initState() { - // WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - // getToDoCount(); - // }); - // super.initState(); - // } + AuthenticatedUserObject authenticatedUserObject = locator(); @@ -93,10 +87,9 @@ class _HomePageState extends State { ) ], ), + ), - Container( - width: double.infinity, - height: projectViewModel.isArabic ? 120 : 110), + Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110), ], ), Positioned( @@ -111,7 +104,7 @@ class _HomePageState extends State { Orientation.landscape ? 0.02 : 0.03), - child: (!model.isLogin) + child: (!model.isLogin ) ? Container( width: double.infinity, height: 160, @@ -180,6 +173,7 @@ class _HomePageState extends State { color: Theme.of(context) .primaryColor, fontSize: 14, + ), ), ), @@ -307,9 +301,7 @@ class _HomePageState extends State { bold: true, ), Texts( - TranslationBase.of( - context) - .height, + TranslationBase.of(context).height, color: Colors.white, fontSize: 10, ), @@ -341,9 +333,7 @@ class _HomePageState extends State { bold: true, ), Texts( - TranslationBase.of( - context) - .weight, + TranslationBase.of(context).weight, color: Colors.white, fontSize: 10, ) @@ -357,10 +347,8 @@ class _HomePageState extends State { ), Expanded( child: Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Image.asset( 'assets/images/blood-drop.png', @@ -374,9 +362,7 @@ class _HomePageState extends State { color: Colors.white, ), Texts( - TranslationBase.of( - context) - .bloodType, + TranslationBase.of(context).bloodType, color: Colors.white, fontSize: 10, ) @@ -415,35 +401,28 @@ class _HomePageState extends State { padding: const EdgeInsets.all(15.0), child: Column( children: [ - SizedBox( - height: 15, - ), + SizedBox(height: 15,), + Container( width: 60, decoration: BoxDecoration( color: Colors.white, shape: BoxShape.rectangle, - borderRadius: - BorderRadius.circular(12)), - child: Center( - child: Image.asset( - 'assets/images/vital_sign_icon.png', + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/vital_sign_icon.png', width: 80, height: 50, - fit: BoxFit.contain, - )), - ), - SizedBox( - height: 20, + fit: BoxFit.contain,)), ), + SizedBox(height: 20,), Texts( - TranslationBase.of(context).vitalSigns, + TranslationBase.of(context) + .vitalSigns, textAlign: TextAlign.center, color: Colors.white, bold: true, - fontSize: projectViewModel.isArabic - ? SizeConfig.textMultiplier * 1.5 - : SizeConfig.textMultiplier * 1.7, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, ) ], ), @@ -471,35 +450,26 @@ class _HomePageState extends State { padding: const EdgeInsets.all(15.0), child: Column( children: [ - SizedBox( - height: 15, - ), + SizedBox(height: 15,), Container( width: 50, decoration: BoxDecoration( color: Colors.white, shape: BoxShape.rectangle, - borderRadius: - BorderRadius.circular(12)), - child: Center( - child: Image.asset( - 'assets/images/search_medicine_icon.png', + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/search_medicine_icon.png', width: 50, height: 50, - fit: BoxFit.contain, - )), - ), - SizedBox( - height: 20, + fit: BoxFit.contain,)), ), + SizedBox(height: 20,), Texts( TranslationBase.of(context).searchMedicine, textAlign: TextAlign.center, color: Colors.white, bold: true, - fontSize: projectViewModel.isArabic - ? SizeConfig.textMultiplier * 1.5 - : SizeConfig.textMultiplier * 1.7, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, ) ], ), @@ -511,9 +481,8 @@ class _HomePageState extends State { ), ), Expanded( - child: DashboardItem( - opacity: 1.0, - onTap: () { + child: DashboardItem(opacity: 1.0, + onTap: (){ Navigator.push( context, FadePage( @@ -526,35 +495,25 @@ class _HomePageState extends State { padding: const EdgeInsets.all(15.0), child: Column( children: [ - SizedBox( - height: 15, - ), + SizedBox(height: 15,), Container( decoration: BoxDecoration( color: Colors.white, shape: BoxShape.rectangle, - borderRadius: - BorderRadius.circular(12)), - child: Center( - child: Image.asset( - 'assets/images/online_payment_icon.png', + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/online_payment_icon.png', width: 80, height: 50, - fit: BoxFit.contain, - )), - ), - SizedBox( - height: 15, + fit: BoxFit.contain,)), ), + SizedBox(height: 15,), Texts( - TranslationBase.of(context) - .onlinePaymentService, + TranslationBase.of(context).onlinePaymentService, textAlign: TextAlign.center, color: Colors.white, bold: true, - fontSize: projectViewModel.isArabic - ? SizeConfig.textMultiplier * 1.5 - : SizeConfig.textMultiplier * 1.7, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, ) ], ), @@ -590,33 +549,34 @@ class _HomePageState extends State { ); }, child: MedicalProfileItem( - title: - TranslationBase.of(context).myAppointments, + title: TranslationBase.of(context) + .myAppointments, imagePath: 'my_appointment_icon.png', - subTitle: TranslationBase.of(context) - .myAppointmentsList, + subTitle: TranslationBase.of(context).myAppointmentsList, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push( - context, FadePage(page: LabsHomePage())), + onTap: () => Navigator.push(context, + FadePage(page: LabsHomePage())), child: MedicalProfileItem( title: TranslationBase.of(context).lab, imagePath: 'lab_result_icon.png', - subTitle: TranslationBase.of(context).lab, + subTitle: + TranslationBase.of(context).lab, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push( - context, FadePage(page: RadiologyHomePage())), + onTap: () => Navigator.push(context, + FadePage(page: RadiologyHomePage())), child: MedicalProfileItem( - title: TranslationBase.of(context).radiology, + title: TranslationBase.of(context) + .radiology, imagePath: 'radiology_icon.png', subTitle: TranslationBase.of(context) .radiologySubtitle, @@ -639,7 +599,8 @@ class _HomePageState extends State { ); }, child: MedicalProfileItem( - title: TranslationBase.of(context).medicines, + title: TranslationBase.of(context) + .medicines, imagePath: 'prescription_icon.png', subTitle: TranslationBase.of(context) .medicinesSubtitle, @@ -658,7 +619,8 @@ class _HomePageState extends State { ); }, child: MedicalProfileItem( - title: TranslationBase.of(context).myDoctor, + title: TranslationBase.of(context) + .myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context) .myDoctorSubtitle, @@ -669,11 +631,12 @@ class _HomePageState extends State { flex: 1, child: InkWell( onTap: () { - Navigator.push( - context, FadePage(page: InsuranceCard())); + Navigator.push(context, + FadePage(page: InsuranceCard())); }, child: MedicalProfileItem( - title: TranslationBase.of(context).insurance, + title: TranslationBase.of(context) + .insurance, imagePath: 'insurance_card_icon.png', subTitle: TranslationBase.of(context) .insuranceSubtitle, @@ -682,6 +645,7 @@ class _HomePageState extends State { ), ], ), + ], ), ), @@ -694,7 +658,7 @@ class _HomePageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ DashboardItem( - opacity: 1.0, + opacity:1.0, child: Container( width: double.infinity, padding: EdgeInsets.all(10), @@ -707,38 +671,31 @@ class _HomePageState extends State { bold: true, ), Texts( - TranslationBase.of(context) - .viewAllHabibMedicalService, + TranslationBase.of(context).viewAllHabibMedicalService, color: Colors.white, fontWeight: FontWeight.normal, fontSize: 10, ), - // Expanded( - // child: Container(), - // ), - Text( + Expanded( + child: Container(), + ), + Texts( TranslationBase.of(context).viewAll, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold), - overflow: TextOverflow.ellipsis, + color: Colors.white, + bold: true, ) ], ), ), height: 106, imageName: 'ask_doctor_bg.png', - //color: Colors.grey[700], + //color: Colors.grey[700], width: MediaQuery.of(context).size.width * 0.45, onTap: () => Navigator.push( - context, - FadePage( - page: AllHabibMedicalService( - goToMyProfile: widget.goToMyProfile, - ))), + context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))), ), DashboardItem( - opacity: 1.0, + opacity:1.0, onTap: () { Navigator.push( context, FadePage(page: ContactUsPage())); @@ -758,7 +715,7 @@ class _HomePageState extends State { TranslationBase.of(context).viewAllWaysReachUs, color: Colors.white, fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 1.0, + fontSize: SizeConfig.textMultiplier * 1.0 , ), Expanded( child: Container(), diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 696ea2db..5037a195 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -63,6 +63,7 @@ class PrescriptionItemsPage extends StatelessWidget { height: 70, ), ), + SizedBox(width: 10,), Expanded( child: Padding( padding: const EdgeInsets.all(8.0), @@ -121,6 +122,7 @@ class PrescriptionItemsPage extends StatelessWidget { height: 70, ), ), + SizedBox(width: 10,), Expanded( child: Padding( padding: const EdgeInsets.all(8.0), @@ -133,6 +135,11 @@ class PrescriptionItemsPage extends StatelessWidget { ), ), ), + Icon( + Icons.arrow_forward_ios, + size: 18, + color: Colors.grey[500], + ) ], ), ), @@ -157,6 +164,7 @@ class PrescriptionItemsPage extends StatelessWidget { patientID: prescriptions.patientID, clinicName: prescriptions.companyName, doctorName: prescriptions.doctorName, + mes: TranslationBase.of(context).sendSuc, projectID: prescriptions.projectID), loading: model.state == ViewState.BusyLocal, ), diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart index 68846968..0e0967d0 100644 --- a/lib/pages/medical/radiology/radiology_details_page.dart +++ b/lib/pages/medical/radiology/radiology_details_page.dart @@ -51,11 +51,13 @@ class RadiologyDetailsPage extends StatelessWidget { ), bottomSheet: Container( width: double.infinity, + height: model.radImageURL.isNotEmpty ? MediaQuery.of(context).size.height * 0.2:MediaQuery.of(context).size.height * 0.15, color: Colors.grey[100], child: Column( mainAxisSize: MainAxisSize.min, children: [ Divider(), + if(model.radImageURL.isNotEmpty) Container( width: MediaQuery.of(context).size.width * 0.8, child: Button( @@ -70,6 +72,7 @@ class RadiologyDetailsPage extends StatelessWidget { width: MediaQuery.of(context).size.width * 0.8, child: Button( onTap: () => model.sendRadReportEmail( + mes: TranslationBase.of(context).sendSuc, finalRadiology: finalRadiology), label: TranslationBase.of(context).sendCopyRad, loading: model.state == ViewState.BusyLocal, diff --git a/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart b/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart index 589284a1..113e29a6 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart @@ -1,9 +1,12 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; class VitalSignDetailsWidget extends StatefulWidget { final List vitalList; @@ -21,6 +24,7 @@ class VitalSignDetailsWidget extends StatefulWidget { class _VitalSignDetailsWidgetState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return Container( decoration: BoxDecoration( color: Colors.transparent, @@ -38,7 +42,7 @@ class _VitalSignDetailsWidgetState extends State { border: TableBorder.symmetric( inside: BorderSide(width: 2.0, color: Colors.grey[300]), ), - children: fullData(), + children: fullData(projectViewModel), ), ], ), @@ -46,20 +50,21 @@ class _VitalSignDetailsWidgetState extends State { ); } - List fullData() { + List fullData(ProjectViewModel projectViewModel) { List tableRow = []; tableRow.add(TableRow(children: [ Container( child: Container( decoration: BoxDecoration( - color: HexColor('#515B5D'), + color: Theme.of(context).primaryColor, borderRadius: BorderRadius.only( - topLeft: Radius.circular(10.0), + topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) ), ), child: Center( child: Texts( - widget.title1, + TranslationBase.of(context).date, color: Colors.white, ), ), @@ -69,9 +74,10 @@ class _VitalSignDetailsWidgetState extends State { Container( child: Container( decoration: BoxDecoration( - color: HexColor('#515B5D'), + color: Theme.of(context).primaryColor, borderRadius: BorderRadius.only( - topRight: Radius.circular(10.0), + topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) ), ), child: Center( @@ -81,32 +87,34 @@ class _VitalSignDetailsWidgetState extends State { ) ])); widget.vitalList.forEach((vital) { - tableRow.add(TableRow(children: [ - Container( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: Texts( - '${DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', - textAlign: TextAlign.center, + var data = vital.toJson()[widget.viewKey]; + if (data != 0) + tableRow.add(TableRow(children: [ + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate.weekday) : DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate.month) : DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', + textAlign: TextAlign.center, + ), ), ), ), - ), - Container( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: Texts( - '${vital.toJson()[widget.viewKey]}', - textAlign: TextAlign.center, + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${vital.toJson()[widget.viewKey]}', + textAlign: TextAlign.center, + ), ), ), ), - ), - ])); + ])); }); return tableRow; } diff --git a/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart index 802aae38..55f91d02 100644 --- a/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart @@ -1,8 +1,10 @@ import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart'; import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class VitalSignItemDetailsScreen extends StatelessWidget { final VitalSignDetails pageKey; @@ -15,43 +17,56 @@ class VitalSignItemDetailsScreen extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); switch (pageKey) { case VitalSignDetails.BodyMeasurements: VSchart = [ { 'name': 'Height', + 'nameAr': 'الطول', 'title1': 'Date', 'title2': 'Cm', + 'title2Ar': 'سم', 'viewKey': 'HeightCm', }, { 'name': 'Weight Kg', + 'nameAr': 'الوزن كجم', 'title1': 'Date', 'title2': 'Kg', + 'title2Ar': 'كجم', 'viewKey': 'WeightKg', }, { - 'name': 'BodyMassIndex', + 'name': 'Body Mass Index', + 'nameAr': 'مؤشر كتلة الجسم', 'title1': 'Date', 'title2': 'BodyMass', + 'title2Ar': 'كتلة الجسم', 'viewKey': 'BodyMassIndex', }, { - 'name': 'HeadCircumCm', + 'name': 'Head Circum Cm', + 'nameAr': 'محيط رأس سم', 'title1': 'Date', 'title2': 'Cm', + 'title2Ar': 'سم', 'viewKey': 'HeadCircumCm', }, { 'name': 'Ideal Body Weight (Lbs)', + 'nameAr': 'وزن الجسم المثالي (رطل)', 'title1': 'Date', 'title2': 'Ideal Weight', + 'title2Ar': 'الوزن المثالي', 'viewKey': 'IdealBodyWeightLbs', }, { - 'name': 'LeanBodyWeightLbs (Lbs)', + 'name': 'Lean Body WeightLbs (Lbs)', + 'nameAr': 'رطل وزن الجسم النحيل (رطل)', 'title1': 'Date', 'title2': 'Lean Weight', + 'title2Ar': 'وزن خفيف', 'viewKey': 'LeanBodyWeightLbs', } ]; @@ -61,9 +76,11 @@ class VitalSignItemDetailsScreen extends StatelessWidget { case VitalSignDetails.Temperature: VSchart = [ { - 'name': 'Temperature In Celcius', + 'name': 'Temperature In Celsius', + 'nameAr': 'درجة الحرارة بالدرجة المئوية', 'title1': 'Date', 'title2': 'C', + 'title2Ar': 'ْس', 'viewKey': 'TemperatureCelcius', }, ]; @@ -73,8 +90,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'Pulse Beat Per Minute', + 'nameAr': 'نبضة نبضة في الدقيقة', 'title1': 'Date', 'title2': 'Minute', + 'title2Ar': 'دقيقة', 'viewKey': 'PulseBeatPerMinute', }, ]; @@ -84,8 +103,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'Respiration Beat Per Minute', + 'nameAr': 'ضربات التنفس في الدقيقة', 'title1': 'Date', 'title2': 'Beat Per Minute', + 'title2Ar': 'نفس في الدقيقة', 'viewKey': 'RespirationBeatPerMinute', }, ]; @@ -95,14 +116,18 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'Blood Pressure Higher', + 'nameAr': 'ضغط الدم الإنقباض', 'title1': 'Date', 'title2': 'Minute', + 'title2Ar': 'الإنقباض', 'viewKey': 'BloodPressureHigher', }, { 'name': 'Blood Pressure Lower', + 'nameAr': 'ضغط الدم الإنبساط', 'title1': 'Date', 'title2': 'Minute', + 'title2Ar': 'الإنبساط', 'viewKey': 'BloodPressureLower', } ]; @@ -112,8 +137,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'Respiration Rate', + 'nameAr': 'معدل التنفس', 'title1': 'Date', 'title2': 'bpm', + 'title2Ar': 'نفس', 'viewKey': 'RespirationBeatPerMinute', }, ]; @@ -123,8 +150,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'FIO2', + 'nameAr': 'معدل النبض بالدقيقة', 'title1': 'Date', 'title2': 'bpm', + 'title2Ar': 'نبضة', 'viewKey': 'PulseBeatPerMinute', }, ]; @@ -134,8 +163,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'PainScore', + 'nameAr': 'نقاط الألم', 'title1': 'Date', 'title2': 'Cm', + 'title2Ar': 'سم', 'viewKey': 'PainScore', }, ]; @@ -145,8 +176,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'Weight Kg', + 'nameAr': 'الوزن كجم', 'title1': 'Date', 'title2': 'Kg', + 'title2Ar': 'كجم', 'viewKey': 'WeightKg', }, ]; @@ -157,8 +190,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { VSchart = [ { 'name': 'Height Cm', + 'nameAr': 'الطول سم', 'title1': 'Date', 'title2': 'Cm', + 'title2Ar': 'سم', 'viewKey': 'HeightCm', }, ]; @@ -177,9 +212,9 @@ class VitalSignItemDetailsScreen extends StatelessWidget { return vitalListTemp.length != 0 ? VitalSingChartAndDetials( vitalList: vitalList, - name: chartInfo['name'], + name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], title1: chartInfo['title1'], - title2: chartInfo['title2'], + title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], viewKey: chartInfo['viewKey']) : Container(); }).toList(), diff --git a/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart b/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart index 299605ef..a56ee0ba 100644 --- a/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart @@ -45,7 +45,7 @@ class VitalSingChartAndDetials extends StatelessWidget { endDate: vitalList[0].vitalSignDate, ), bodyWidget: VitalSignDetailsWidget( - vitalList: vitalList.reversed.toList(), + vitalList: vitalList, title1: title1, title2: title2, viewKey: viewKey, @@ -59,6 +59,7 @@ class VitalSingChartAndDetials extends StatelessWidget { if (vitalList.length > 0) { vitalList.forEach( (element) { + if( element.toJson()[viewKey]?.toInt()!=0) timeSeriesData.add( TimeSeriesSales( new DateTime(element.vitalSignDate.year, diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index cc2fd7ca..b79bfe71 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -50,11 +50,15 @@ class PaymentService extends StatelessWidget { fontSize: 14, fontWeight: FontWeight.normal, ), - Image.asset( - 'assets/images/al-habib_online_payment_service_icon.png', - fit: BoxFit.fill, - height: 55, - width: double.infinity, + SizedBox(height: 12,), + Container( + margin: EdgeInsets.only(left: 10,right: 10), + child: Image.asset( + 'assets/images/online_payment_icon.png', + fit: BoxFit.fill, + height: 55, + width: double.infinity, + ), ), ], ), @@ -82,12 +86,13 @@ class PaymentService extends StatelessWidget { fontSize: 14, fontWeight: FontWeight.normal, ), + SizedBox(height: 12,), Align( - alignment: projectViewModel.isArabic + alignment: !projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, child: Image.asset( - 'assets/images/al-habib_online_payment_service_icon.png', + 'assets/images/device_icon.png', height: 55, ), ), @@ -124,12 +129,13 @@ class PaymentService extends StatelessWidget { fontSize: 14, fontWeight: FontWeight.normal, ), + SizedBox(height: 12,), Align( - alignment: projectViewModel.isArabic + alignment: !projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, child: Image.asset( - 'assets/images/al-habib_online_payment_service_icon.png', + 'assets/images/new-design/check-in.png', height: 55, ), ), diff --git a/lib/pages/pharmacies/pharmacies_list_screen.dart b/lib/pages/pharmacies/pharmacies_list_screen.dart index dc69a3e2..ce042462 100644 --- a/lib/pages/pharmacies/pharmacies_list_screen.dart +++ b/lib/pages/pharmacies/pharmacies_list_screen.dart @@ -146,7 +146,7 @@ class PharmaciesList extends StatelessWidget { child: InkWell( child: Icon( Icons.phone, - color: Colors.red, + color: Theme.of(context).primaryColor, ), onTap: () => launch("tel://" + model.pharmacyList[index].phoneNumber), @@ -157,7 +157,7 @@ class PharmaciesList extends StatelessWidget { child: InkWell( child: Icon( Icons.local_pharmacy, - color: Colors.red, + color: Theme.of(context).primaryColor, ), onTap: () { MapsLauncher.launchCoordinates( diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index 95086f10..3e6123c2 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -24,7 +24,8 @@ class DateUtil { try { var dateT = date.split('/'); var year = dateT[2].substring(0,4); - return DateTime(int.parse(year),int.parse(dateT[1]),int.parse(dateT[0])); + var dateP = DateTime(int.parse(year),int.parse(dateT[1]),int.parse(dateT[0])); + return dateP; } catch (e) { print(e); } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 5be01ab1..44280337 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1000,6 +1000,9 @@ class TranslationBase { String get notActive => localizedValues['not-active'][locale.languageCode]; String get cardDetail => localizedValues['card-detail'][locale.languageCode]; String get dr => localizedValues['Dr'][locale.languageCode]; + String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/buttons/floatingActionButton.dart b/lib/widgets/buttons/floatingActionButton.dart index d2715346..4afd72b3 100644 --- a/lib/widgets/buttons/floatingActionButton.dart +++ b/lib/widgets/buttons/floatingActionButton.dart @@ -25,6 +25,7 @@ class _FloatingButtonState extends State AnimationController _animationController; Animation _animation; PermissionService permission = new PermissionService(); + @override void initState() { _animationController = AnimationController( @@ -63,16 +64,17 @@ class _FloatingButtonState extends State onTapCancel: () { _animationController.forward(); }, - onTap: (){permission.vibrate(widget.onTap, context);}, + onTap: () { + permission.vibrate(widget.onTap, context); + }, behavior: HitTestBehavior.opaque, child: Transform.scale( scale: _buttonSize, child: AnimatedContainer( duration: Duration(milliseconds: 150), margin: EdgeInsets.only(bottom: 4), - padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(54.0)), + borderRadius: BorderRadius.all(Radius.circular(70.0)), color: Theme.of(context).primaryColor, boxShadow: [ BoxShadow( @@ -81,31 +83,15 @@ class _FloatingButtonState extends State spreadRadius: _buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0, offset: Offset(0, 7.0), - blurRadius: 55.0) + blurRadius: 70.0) ]), - child: Container( - child: Column( - children: [ - Icon(EvaIcons.calendar,color: Colors.white,size: 23,), - Texts( - TranslationBase.of(context).book, - bold: !projectViewModel.isArabic, - color: Colors.white, - fontSize: projectViewModel.isArabic ? 8 : 17, - ), - Texts( - TranslationBase.of(context).appointmentLabel, - bold: projectViewModel.isArabic, - color: Colors.white, - fontSize:projectViewModel.isArabic ? 8.8 : 8, - ), - ], - ), - width: 54, - height: 54, - decoration: BoxDecoration( - shape: BoxShape.circle, - ), + child: Image.asset( + projectViewModel.isArabic + ? 'assets/images/booking_ar.png' + : 'assets/images/booking_en.png', + // fit: BoxFit.cover, + width: 90, + height: 90, ), )), )); diff --git a/lib/widgets/pharmacy/drug_item.dart b/lib/widgets/pharmacy/drug_item.dart index 05f6ef4c..7736e089 100644 --- a/lib/widgets/pharmacy/drug_item.dart +++ b/lib/widgets/pharmacy/drug_item.dart @@ -50,6 +50,7 @@ class _MedicineItemWidgetState extends State { ), ), ), + SizedBox(width: 10,), Expanded( child: Center( child: Padding(