diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index cfd3cb12..e838e589 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1473,4 +1473,18 @@ const Map localizedValues = { "dental-insurance": { "en": "Insurance", "ar": "التأمين" }, "drivethru-appo": { "en": "Drive Thru Appointment", "ar": "موعد من داخل السيارة" }, "upcoming-QR-NFC": { "en": "Use the NFC or QR Code to Check-In", "ar": "استخدم NFC أو رمزQR لتسجيل الوصول" }, + "ovulation-desc": { "en": "Calculates Ovulation Period", "ar": "حساب افضل فترة للحمل بناءاً على تاريخ اخر دورة شهرية" }, + "cycle-label": { "en": "Average Cycle Length (usually 28 days):", "ar": "متوسط الدورة الشهرية 28 يوم : " }, + "luteal-label": { "en": "Average Luteal Phase Length (usually 14 days):", "ar": "متوسط الأيام ما بعد الاباضة عادة 14 يوما : " }, + "pregnancy-title": { "en": "Delivery Due Date", "ar": "تاريخ الولادة" }, + "pregnancy-desc": { "en": "Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual period began (the first day), then click calculate.", "ar": "مبروك, أنت حامل! الآن متى سيصل الطفل؟ لتقدير موعد الولادة, ادخل تاريخ بداية آخر دورة شهرية (اليوم الأول), ثم اضغط على الحساب" }, + "pregnancy-date-label": { "en": "What was the date of the first day of the last period?", "ar": "ما هو تاريخ أول يوم من أخر دورة شهرية ؟" }, + "ovulation-period": { "en": "The next ovulation period is estimated to be: ", "ar": "تقدر فترة الاباضة القادمة " }, + "from": { "en": "From: ", "ar": "من:" }, + "to": { "en": "To: ", "ar": "الى:" }, + "conceive": { "en": "You have conceived on: ", "ar": " تاريخ بداية الحمل" }, + "firstTri": { "en": "First Trimester Ends (12 weeks):", "ar": "تاريخ انتهاء الثلث الأول 12 اسبوع: " }, + "secondTri": { "en": "Second Trimester Ends (27 weeks):", "ar": "تاريخ انتهاء الثلث الثاني 27 اسبوع: " }, + "thirdTri": { "en": "Third Trimester, Estimated Due Date (40 weeks):", "ar": "تاريخ احتمال الولادة 40 اسبوع:" }, + "seeDoctorsList": { "en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء" } }; diff --git a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart index 4b38ef65..c952a88f 100644 --- a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart +++ b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart @@ -3,9 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart'; -import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_request_model.dart'; import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart'; -import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:flutter/cupertino.dart'; @@ -69,8 +67,7 @@ class BariatricsService extends BaseService { body['Longitude'] = 0; body['isDentalAllowedBackend'] = false; - await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {}, - onFailure: (String error, int statusCode) { + await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: body); @@ -92,8 +89,7 @@ class BariatricsService extends BaseService { body['PatientID'] = 0; body['isDentalAllowedBackend'] = false; - if(disease != null) - body['DiseaseID'] = disease.diseasesID; + if (disease != null) body['DiseaseID'] = disease.diseasesID; await baseAppClient.post(GET_DOCTOR_LIST_BY_TIME, onSuccess: (dynamic response, int statusCode) { doctorListByTime.clear(); @@ -106,4 +102,23 @@ class BariatricsService extends BaseService { super.error = error; }, body: body); } + + Future getCalculationDoctors({@required int calculationID}) async { + hasError = false; + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + + Map body = Map(); + body['CalculationID'] = calculationID; // hint: it is static depend on IONIC project + body['LanguageID'] = languageID == 'ar' ? 1 : 2; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTOR_LIST_CALCULATION, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index 7017122d..4cbf9423 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -195,7 +195,6 @@ class _NewCMCStepThreePageState extends State { Navigator.pop(context); }, ); - } else { } diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart index db5a585c..1ada0ca1 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart @@ -1,6 +1,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -40,16 +40,18 @@ class _DeliveryDueState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: 'Delivery Due Date', + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).pregnancyTitle, body: Padding( padding: EdgeInsets.symmetric(horizontal: 35.0, vertical: 20.0), child: SingleChildScrollView( child: Container( child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Texts( - 'Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual perios began (the first day), then click calculate.', + TranslationBase.of(context).pregnancyDesc, ), Divider( //height: 2, @@ -58,7 +60,7 @@ class _DeliveryDueState extends State { Column( children: [ Texts( - 'What was the date of the first day of the last period?', + TranslationBase.of(context).pregnancyDateLabel, ), InkWell( onTap: () { @@ -86,6 +88,7 @@ class _DeliveryDueState extends State { }, child: Container( padding: EdgeInsets.all(12), + margin: EdgeInsets.only(top: 15.0), width: double.infinity, height: 65, decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), @@ -95,7 +98,7 @@ class _DeliveryDueState extends State { Row( children: [ Icon(Icons.date_range), - Texts('Date'), + Texts(TranslationBase.of(context).date), ], ), Texts(getDate()), @@ -111,9 +114,9 @@ class _DeliveryDueState extends State { Container( height: 50.0, width: 350.0, - child: SecondaryButton( - label: 'CALCULATE', - onTap: () { + child: DefaultButton( + TranslationBase.of(context).calculate, + () { setState(() { { Navigator.push( diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart index e03e5fce..b546426b 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart @@ -1,5 +1,9 @@ -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -14,19 +18,17 @@ class DeliveryDueResult extends StatelessWidget { var firstTrimester; var secondTrimester; var thirdTrimester; - DeliveryDueResult( - {this.dateFrom, - this.dateTo, - this.conceivedDate, - this.deliveryDue, - this.firstTrimester, - this.secondTrimester, - this.thirdTrimester}); + + DeliveryDueResult({this.dateFrom, this.dateTo, this.conceivedDate, this.deliveryDue, this.firstTrimester, this.secondTrimester, this.thirdTrimester}); + @override Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: 'Delivery Due Date', + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).pregnancyTitle, body: Padding( padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 12.0), child: SingleChildScrollView( @@ -37,23 +39,21 @@ class DeliveryDueResult extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Texts( - 'The next ovulation period is estimated to be:', + TranslationBase.of(context).ovulationPeriod, fontWeight: FontWeight.w400, ), Texts( - 'From:', + TranslationBase.of(context).from, fontWeight: FontWeight.w400, ), - Texts(DateFormat.yMMMEd().format(dateFrom), - fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)), + Texts(DateFormat.yMMMEd().format(dateFrom), fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)), Texts( - 'To:', + TranslationBase.of(context).to, fontWeight: FontWeight.w400, ), - Texts(DateFormat.yMMMEd().format(dateTo), - fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)), + Texts(DateFormat.yMMMEd().format(dateTo), fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)), Texts( - 'You have conceived on:', + TranslationBase.of(context).conceive, fontWeight: FontWeight.w400, ), Texts( @@ -62,7 +62,7 @@ class DeliveryDueResult extends StatelessWidget { fontSize: 21.0, ), Texts( - 'First Trimester Ends (12 weeks):', + TranslationBase.of(context).firstTri, fontWeight: FontWeight.w400, ), Texts( @@ -71,7 +71,7 @@ class DeliveryDueResult extends StatelessWidget { fontSize: 21.0, ), Texts( - 'Second Trimester Ends (27 weeks):', + TranslationBase.of(context).secondTri, fontWeight: FontWeight.w400, ), Texts( @@ -80,7 +80,7 @@ class DeliveryDueResult extends StatelessWidget { fontSize: 21.0, ), Texts( - 'Third Trimester, Estimated Due Date (40 weeks):', + TranslationBase.of(context).thirdTri, fontWeight: FontWeight.w400, ), Texts( @@ -90,13 +90,10 @@ class DeliveryDueResult extends StatelessWidget { ), Container( width: 350, - child: Button( - label: 'See List Of Doctors', - onTap: () { - Navigator.push( - context, - FadePage(page: DoctorList()), - ); + child: DefaultButton( + TranslationBase.of(context).seeDoctorsList, + () { + getDoctorsList(context); }, ), ), @@ -107,4 +104,66 @@ class DeliveryDueResult extends StatelessWidget { ), ); } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital = List(); + + service.getCalculationDoctors(calculationID: 6).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['List_CalculationTable'].length); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + doctorsList: doctorsList, + patientDoctorAppointmentListHospital: + _patientDoctorAppointmentListHospital))); + + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } } diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart index a6e490a8..99c7505d 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart @@ -1,5 +1,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -41,10 +43,6 @@ class _OvulationPeriodState extends State { return "${DateUtil.getMonth(selectedDateTime.month)} ${selectedDateTime.day}, ${selectedDateTime.year}"; } - // void calculate() {} - // - // void calculateFertility(DateTime selectedDate) {const diff = Date.} - calculateBabyInformation() { setState(() { bloodSugarDate = selectedDateTime; @@ -64,7 +62,10 @@ class _OvulationPeriodState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: 'Ovulation Period', + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).ovulation, body: Padding( padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0), child: SingleChildScrollView( @@ -73,7 +74,7 @@ class _OvulationPeriodState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts('Calculates Ovulation Period'), + Texts(TranslationBase.of(context).ovulationDesc), SizedBox( height: 12.0, ), @@ -108,7 +109,7 @@ class _OvulationPeriodState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts('Date'), + Texts(TranslationBase.of(context).date), Texts(getDate()), ], ), @@ -118,7 +119,7 @@ class _OvulationPeriodState extends State { height: 5.0, ), Texts( - 'Average Cycle Length (usually 28 days):', + TranslationBase.of(context).cycleLabel, fontWeight: FontWeight.w400, ), SizedBox( @@ -218,7 +219,7 @@ class _OvulationPeriodState extends State { ], ), Texts( - 'Average Luteal Phase Length (usually 14 days):', + TranslationBase.of(context).lutealLabel, fontWeight: FontWeight.w400, ), SizedBox( @@ -323,9 +324,9 @@ class _OvulationPeriodState extends State { Container( height: 50.0, width: 350.0, - child: SecondaryButton( - label: 'CALCULATE', - onTap: () { + child: DefaultButton( + TranslationBase.of(context).calculate, + () { calculateBabyInformation(); Navigator.push( context, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart index 53ccb664..c512f181 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart @@ -1,5 +1,10 @@ -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -27,8 +32,10 @@ class OvulationResult extends StatelessWidget { @override Widget build(BuildContext context) { return AppScaffold( - isShowAppBar: true, - appBarTitle: 'Ovulation Period', + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).ovulation, body: Padding( padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 15.0), child: SingleChildScrollView( @@ -78,7 +85,7 @@ class OvulationResult extends StatelessWidget { fontWeight: FontWeight.w400, ), Texts( - babyAge <= 0 ? "baby age is not available" : babyAge.toString() + " Weeks," + "3", + babyAge <= 0 ? "baby age is not available" : babyAge.toString() + " Weeks", fontWeight: FontWeight.w800, fontSize: 21.0, ), @@ -93,13 +100,10 @@ class OvulationResult extends StatelessWidget { ), Container( width: 350, - child: Button( - label: 'See List Of Doctors', - onTap: () { - Navigator.push( - context, - FadePage(page: DoctorList()), - ); + child: DefaultButton( + TranslationBase.of(context).seeDoctorsList, + () { + getDoctorsList(context); }, ), ), @@ -110,4 +114,67 @@ class OvulationResult extends StatelessWidget { ), ); } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital = List(); + + service.getCalculationDoctors(calculationID: 6).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['List_CalculationTable'].length); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + doctorsList: doctorsList, + patientDoctorAppointmentListHospital: + _patientDoctorAppointmentListHospital))); + + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + } diff --git a/lib/pages/AlHabibMedicalService/​ health_calculators.dart b/lib/pages/AlHabibMedicalService/​ health_calculators.dart index 6df44279..5dce5b15 100644 --- a/lib/pages/AlHabibMedicalService/​ health_calculators.dart +++ b/lib/pages/AlHabibMedicalService/​ health_calculators.dart @@ -129,217 +129,6 @@ class _HealthCalculatorsState extends State with SingleTicker ), ], ), - - // Scaffold( - // extendBodyBehindAppBar: true, - // appBar: PreferredSize( - // preferredSize: Size.fromHeight(70.0), - // child: Column( - // children: [ - // Center( - // child: Container( - // height: 60.0, - // margin: EdgeInsets.only(top: 10.0), - // width: MediaQuery.of(context).size.width * 1.9, - // decoration: BoxDecoration( - // border: Border( - // bottom: BorderSide( - // color: Theme.of(context).dividerColor, - // width: 5.7, - // ), - // ), - // color: Colors.white, - // ), - // child: Center( - // child: TabBar( - // controller: _tabController, - // isScrollable: true, - // indicatorWeight: 4.0, - // indicatorColor: Colors.red, - // labelColor: Theme.of(context).buttonColor, - // labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0), - // unselectedLabelColor: Colors.grey, - // tabs: [ - // Container( - // width: MediaQuery.of(context).size.width * 0.35, - // child: Center( - // child: Texts(TranslationBase.of(context).generalHealth), - // ), - // ), - // Container( - // width: MediaQuery.of(context).size.width * 0.35, - // child: Center( - // child: Texts(TranslationBase.of(context).womanHealth), - // ), - // ), - // ], - // ), - // ), - // ), - // ) - // ], - // ), - // ), - // body: Column( - // children: [ - // Expanded( - // child: TabBarView( - // physics: BouncingScrollPhysics(), - // controller: _tabController, - // children: [ - // Container( - // child: Column( - // children: [ - // Container( - // width: double.infinity, - // height: 80, - // ), - // Row( - // children: [ - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage(page: BMICalculator()), - // ); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).bmi, - // imagePath: 'bmi_health_calculator.png', - // subTitle: TranslationBase.of(context).calcHealth, - // ), - // ), - // ), - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage( - // page: CalorieCalculator(), - // ), - // ); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).calories, - // imagePath: 'calories-calculator.png', - // subTitle: TranslationBase.of(context).calcHealth, - // ), - // ), - // ), - // ], - // ), - // Row( - // children: [ - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage( - // page: BmrCalculator(), - // ), - // ); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).bmr, - // imagePath: 'BMR_calculator.png', - // subTitle: TranslationBase.of(context).calcHealth, - // ), - // ), - // ), - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage( - // page: IdealBody(), - // ), - // ); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).idealBody, - // imagePath: 'body_weight.png', - // subTitle: TranslationBase.of(context).weight, - // ), - // ), - // ), - // ], - // ), - // Row( - // children: [ - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage( - // page: BodyFat(), - // ), - // ); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).bodyWord, - // imagePath: 'body_fat.png', - // subTitle: TranslationBase.of(context).fat, - // ), - // ), - // ), - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage( - // page: Carbs(), - // ), - // ); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).carbohydrate, - // imagePath: 'carb_protein.png', - // subTitle: TranslationBase.of(context).proteinFat, - // ), - // ), - // ), - // ], - // ), - // ], - // ), - // ), - // Container( - // child: Column( - // children: [ - // Padding( - // padding: EdgeInsets.only(left: 12, right: 12), - // child: GridView.builder( - // shrinkWrap: true, - // primary: false, - // physics: NeverScrollableScrollPhysics(), - // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), - // padding: EdgeInsets.zero, - // itemCount: womenHealthList.length, - // itemBuilder: (BuildContext context, int index) { - // return womenHealthList[index]; - // }, - // ), - // ), - // ], - // ), - // ), - // ], - // ), - // ) - // ], - // ), ); } @@ -366,7 +155,7 @@ class _HealthCalculatorsState extends State with SingleTicker ), child: MedicalProfileItem( title: TranslationBase.of(context).calories, - imagePath: 'assets/images/new-design/ovulation_period_icon.png', + imagePath: 'assets/images/new-design/calories-calculator.png', subTitle: TranslationBase.of(context).calcHealth, isPngImage: true, ), @@ -379,7 +168,7 @@ class _HealthCalculatorsState extends State with SingleTicker ), child: MedicalProfileItem( title: TranslationBase.of(context).bmr, - imagePath: 'assets/images/new-design/ovulation_period_icon.png', + imagePath: 'assets/images/new-design/BMR_calculator.png', subTitle: TranslationBase.of(context).calcHealth, isPngImage: true, ), @@ -392,7 +181,7 @@ class _HealthCalculatorsState extends State with SingleTicker ), child: MedicalProfileItem( title: TranslationBase.of(context).idealBody, - imagePath: 'assets/images/new-design/ovulation_period_icon.png', + imagePath: 'assets/images/new-design/body_weight.png', subTitle: TranslationBase.of(context).weight, isPngImage: true, ), @@ -405,7 +194,7 @@ class _HealthCalculatorsState extends State with SingleTicker ), child: MedicalProfileItem( title: TranslationBase.of(context).bodyWord, - imagePath: 'assets/images/new-design/ovulation_period_icon.png', + imagePath: 'assets/images/new-design/body_fat.png', subTitle: TranslationBase.of(context).fat, isPngImage: true, ), @@ -418,7 +207,7 @@ class _HealthCalculatorsState extends State with SingleTicker ), child: MedicalProfileItem( title: TranslationBase.of(context).carbohydrate, - imagePath: 'assets/images/new-design/ovulation_period_icon.png', + imagePath: 'assets/images/new-design/carb_protein.png', subTitle: TranslationBase.of(context).proteinFat, isPngImage: true, ), diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart index 76fe2f46..97dfc187 100644 --- a/lib/pages/BookAppointment/SearchResults.dart +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -43,7 +43,7 @@ class _SearchResultsState extends State { }, itemBuilder: (context, index) { return AppExpandableNotifier( - title: widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, + title: (widget.patientDoctorAppointmentListHospital[index].distanceInKMs != "0") ? widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km : widget.patientDoctorAppointmentListHospital[index].filterName, isTitleSingleLine: false, bodyWidget: ListView.separated( shrinkWrap: true, diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index cee36817..e7e19f4d 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -295,7 +295,7 @@ class DoctorsListService extends BaseService { "LanguageID": languageID == 'ar' ? 1 : 2, "IPAdress": "10.20.10.20", "generalid": "Cs2020@2016\$2958", - "PatientOutSA": authUser.outSA, + "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, "SessionID": null, "isDentalAllowedBackend": false, "DeviceTypeID": 1 diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 512a8be1..614e44b8 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2215,6 +2215,36 @@ class TranslationBase { String get drivethruAppo => localizedValues["drivethru-appo"][locale.languageCode]; String get upcomingQRNFC => localizedValues["upcoming-QR-NFC"][locale.languageCode]; + + String get ovulationDesc => localizedValues["ovulation-desc"][locale.languageCode]; + + String get cycleLabel => localizedValues["cycle-label"][locale.languageCode]; + + String get lutealLabel => localizedValues["luteal-label"][locale.languageCode]; + + String get pregnancyTitle => localizedValues["pregnancy-title"][locale.languageCode]; + + String get pregnancyDesc => localizedValues["pregnancy-desc"][locale.languageCode]; + + String get pregnancyDateLabel => localizedValues["pregnancy-date-label"][locale.languageCode]; + + String get ovulationPeriod => localizedValues["ovulation-period"][locale.languageCode]; + + String get from => localizedValues["from"][locale.languageCode]; + + String get to => localizedValues["to"][locale.languageCode]; + + String get conceive => localizedValues["conceive"][locale.languageCode]; + + String get firstTri => localizedValues["firstTri"][locale.languageCode]; + + String get secondTri => localizedValues["secondTri"][locale.languageCode]; + + String get thirdTri => localizedValues["thirdTri"][locale.languageCode]; + + String get seeDoctorsList => localizedValues["seeDoctorsList"][locale.languageCode]; + + } class TranslationBaseDelegate extends LocalizationsDelegate {