From f71353ebb8e413121d2c75146a416c467a04365a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 26 Jan 2026 15:20:53 +0300 Subject: [PATCH] Services list page implemented --- android/app/build.gradle | 1 + .../hmg_patient_app/penguin/PenguinView.kt | 12 +- lib/config/localized_values.dart | 11 + lib/core/service/client/base_app_client.dart | 2 +- .../rrt-pickup-address-page.dart | 2 +- .../services_price_list.dart | 357 ++++++++++++++++++ lib/uitl/penguin_method_channel.dart | 3 +- lib/uitl/translations_delegate_base.dart | 11 + lib/uitl/utils.dart | 12 +- lib/widgets/drawer/app_drawer_widget.dart | 9 +- pubspec.yaml | 8 +- 11 files changed, 412 insertions(+), 16 deletions(-) create mode 100644 lib/pages/servicesPriceList/services_price_list.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index 19e888fc..a9c4d5e9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -148,6 +148,7 @@ dependencies { annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' implementation 'com.mapbox.maps:android:11.5.0' + implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1' // implementation 'com.mapbox.maps:android:11.4.0' // AARs diff --git a/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt b/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt index 063e3e61..0400aa0e 100644 --- a/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt +++ b/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt @@ -201,9 +201,11 @@ internal class PenguinView( creationParams["clientKey"] as String ) .setUserName(creationParams["username"] as String) +// .setUserName("Haroon") // .setLanguageID(Languages.en) .setLanguageID(language) .setSimulationModeEnabled(creationParams["isSimulationModeEnabled"] as Boolean) +// .setSimulationModeEnabled(true) .setEnableBackButton(true) // .setDeepLinkData("deeplink") .setCustomizeColor("#2CA0AF") @@ -249,14 +251,17 @@ internal class PenguinView( * @param refID The reference ID to navigate to. */ fun navigateTo(refID: String) { + Log.e("navigateTo", "inside navigateTo") try { if (refID.isBlank()) { Log.e("navigateTo", "Invalid refID: The reference ID is blank.") } // referenceId = refID - navigator.navigateTo(mContext, refID,object : RefIdDelegate { + Log.e("navigateTo", "before navigateTo") + navigator.navigateTo(mContext, refID, object : RefIdDelegate { +// navigator.navigateTo(mContext, "3-3", object : RefIdDelegate { override fun onRefByIDSuccess(PoiId: String?) { - Log.e("navigateTo", "PoiId is penguin view+++++++ $PoiId") + Log.e("navigateTo", "PoiId is penguin view+++++++ $refID") // channelFlutter.invokeMethod( // PenguinMethod.navigateToPOI.name, @@ -290,9 +295,12 @@ internal class PenguinView( */ override fun onPenNavSuccess(warningCode: String?) { val clinicId = creationParams["clinicID"] as String +// val clinicId = "3-3" if(clinicId.isEmpty()) return + Log.e("navigateTo", "onPenNavSuccess") + navigateTo(clinicId) } diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 857d7ffb..f59efa4d 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2846,4 +2846,15 @@ const Map localizedValues = { "seeAllGraphValues": {"en": "View all results", "ar": "عرض جميع النتائج"}, "verify-with-biometric": {"en": "Biometric", "ar": "الحيوية"}, "medicationInstructions": {"en": "Medication Instructions", "ar": "تعليمات الدواء"}, + "servicePriceList": {"en": "Service Price List", "ar": "قائمة أسعار الخدمة"}, + + "servicePriceListDesc": {"en": "Below is the services price list outline the healthcare services fees for cash payments, where the insurance coverage, eligibility, and co-payment deductions will be processed in accordance with the insurance policy terms and the table of benefits of each insurance providers:", "ar": "توضح قائمة أسعار الخدمات أدناه رسوم الخدمات الصحية المقدمة للمرضى بنظام الدفع النقدي. أما فيما يتعلق بالخدمات المشمولة بالتأمين، فسيتم تطبيق التغطية التأمينية والتحقق من األهلية واحتساب نسب التحمل وفقًا لشروط وثيقة التأمين وجدول المنافع المعتمد لكل شركة تأمين."}, + "servicePriceList1": {"en": "Consultant Physician Consultation", "ar": "كشف طبيب استشاري"}, + "servicePriceList2": {"en": "Specialist Physician Consultation", "ar": "كشف طبيب أخصائي"}, + "servicePriceList3": {"en": "General Physician Consultation", "ar": "كشف طبيب عام"}, + "servicePriceList4": {"en": "Dental Consultation", "ar": "كشف طبيب أسنان"}, + "servicePriceList5": {"en": "Optometrist Consultation", "ar": "كشف أخصائي بصريات"}, + "servicePriceList6": {"en": "Dietician Consultation", "ar": "كشف أخصائي تغذية"}, + "servicePriceList7": {"en": "LiveCare Consultation", "ar": "كشف استشارة عن بعد ( لايف كير )"}, + "servicePriceListRights": {"en": "The patient has the right to a free follow-up within 14 days of initial visit", "ar": "يحق للمريض الحصول على متابعة مجانية في غضون 14 يومًا من الزيارة الأولى"}, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 1ce1a29a..61945a72 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -189,7 +189,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 151489; //4609100 + // body['PatientID'] = 2039078; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart index c0767ba1..7d88242a 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart @@ -134,7 +134,7 @@ class RRTRequestPickupAddressPageState extends State( onModelReady: (vm) { viewModel = vm; - loadAddresses(); + // loadAddresses(); myAddresses = viewModel.addressesList; }, builder: (ctx, vm, widget) => AppScaffold( diff --git a/lib/pages/servicesPriceList/services_price_list.dart b/lib/pages/servicesPriceList/services_price_list.dart new file mode 100644 index 00000000..b6059e0d --- /dev/null +++ b/lib/pages/servicesPriceList/services_price_list.dart @@ -0,0 +1,357 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:hmg_patient_app/core/viewModels/project_view_model.dart'; +import 'package:hmg_patient_app/theme/colors.dart'; +import 'package:hmg_patient_app/uitl/translations_delegate_base.dart'; +import 'package:hmg_patient_app/uitl/utils_new.dart'; +import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart'; +import 'package:provider/provider.dart'; + +class ServicesPriceList extends StatelessWidget { + ServicesPriceList({super.key}); + + ProjectViewModel? projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).servicePriceList, + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: true, + showDropDown: false, + isShowDecPage: false, + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Container( + padding: EdgeInsets.all(16), + decoration: cardRadius(10), + child: Text( + TranslationBase.of(context).servicePriceListDesc, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 12, + fontWeight: FontWeight.w500, + letterSpacing: -0.64, + fontFamily: projectViewModel!.isArabic ? 'Cairo' : 'Poppins', + ), + ), + ), + SizedBox(height: 16), + Container( + padding: EdgeInsets.all(16), + decoration: cardRadius(10), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Service Name", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Text( + "Prices", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + ], + ), + SizedBox(height: 8), + Divider( + height: 1, + color: CustomColors.black, + ), + SizedBox(height: 8), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList1, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "315", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + SizedBox(height: 16), + Divider( + height: 1, + color: CustomColors.devider, + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList2, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "210", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + SizedBox(height: 16), + Divider( + height: 1, + color: CustomColors.devider, + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList3, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "160", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + SizedBox(height: 16), + Divider( + height: 1, + color: CustomColors.devider, + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList4, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "210", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + SizedBox(height: 16), + Divider( + height: 1, + color: CustomColors.devider, + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList5, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "160", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + SizedBox(height: 16), + Divider( + height: 1, + color: CustomColors.devider, + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList6, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "160", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + SizedBox(height: 16), + Divider( + height: 1, + color: CustomColors.devider, + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).servicePriceList7, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "150", + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + ], + )), + SizedBox(height: 16), + Container( + padding: EdgeInsets.all(16), + decoration: cardRadius(10), + child: Row( + children: [ + Text( + TranslationBase.of(context).servicePriceListRights, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 12, + fontWeight: FontWeight.w500, + letterSpacing: -0.64, + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/uitl/penguin_method_channel.dart b/lib/uitl/penguin_method_channel.dart index d0b30fac..0fe81148 100644 --- a/lib/uitl/penguin_method_channel.dart +++ b/lib/uitl/penguin_method_channel.dart @@ -31,7 +31,8 @@ class PenguinMethodChannel { "languageCode": languageCode, "clientKey": "UGVuZ3VpbklOX1Blbk5hdl9QSUY=", "mapBoxKey": "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ", - "clinicID": details?.clinicId ?? "", + // "clinicID": details?.clinicId ?? "", + "clinicID": "", // "clinicID": "108", // 46 ,49, 133 "patientID": details?.patientId ?? "", "projectID": int.parse(details?.projectId ?? "-1"), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 72db3b20..ab1b77a8 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -3531,6 +3531,17 @@ class TranslationBase { String get low => localizedValues["low"][locale.languageCode]; String get verifyWithBiometric => localizedValues["verify-with-biometric"][locale.languageCode]; String get medicationInstructions => localizedValues["medicationInstructions"][locale.languageCode]; + String get servicePriceList => localizedValues["servicePriceList"][locale.languageCode]; + + String get servicePriceListDesc => localizedValues["servicePriceListDesc"][locale.languageCode]; + String get servicePriceList1 => localizedValues["servicePriceList1"][locale.languageCode]; + String get servicePriceList2 => localizedValues["servicePriceList2"][locale.languageCode]; + String get servicePriceList3 => localizedValues["servicePriceList3"][locale.languageCode]; + String get servicePriceList4 => localizedValues["servicePriceList4"][locale.languageCode]; + String get servicePriceList5 => localizedValues["servicePriceList5"][locale.languageCode]; + String get servicePriceList6 => localizedValues["servicePriceList6"][locale.languageCode]; + String get servicePriceList7 => localizedValues["servicePriceList7"][locale.languageCode]; + String get servicePriceListRights => localizedValues["servicePriceListRights"][locale.languageCode]; String getTranslation(String label) { switch (label) { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index bb8d2556..66ec8df5 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -89,13 +89,13 @@ class Utils { "ProjectOutSA": false, "UsingInDoctorApp": false },{ - "Desciption": "Jeddah Hospital", - "DesciptionN": "مستشفى جدة", + "Desciption": "Jeddah Fayhaa Hospital", + "DesciptionN": "مستشفى جدة الفيحاء", "ID": 3, // Campus ID - "LegalName": "Jeddah Hospital", - "LegalNameN": "مستشفى جدة", - "Name": "Jeddah Hospital", - "NameN": "مستشفى جدة", + "LegalName": "Jeddah Fayhaa Hospital", + "LegalNameN": "مستشفى جدة الفيحاء", + "Name": "Jeddah Fayhaa Hospital", + "NameN": "مستشفى جدة الفيحاء", "PhoneNumber": "+966115222222", "SetupID": "013311", "DistanceInKilometers": 0, diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 193c48c1..6c1d16bb 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -22,6 +22,7 @@ import 'package:hmg_patient_app/pages/DrawerPages/notifications/notifications_pa import 'package:hmg_patient_app/pages/landing/landing_page.dart'; import 'package:hmg_patient_app/pages/livecare/livecare_home.dart'; import 'package:hmg_patient_app/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:hmg_patient_app/pages/servicesPriceList/services_price_list.dart'; import 'package:hmg_patient_app/routes.dart'; import 'package:hmg_patient_app/services/authentication/auth_provider.dart'; import 'package:hmg_patient_app/services/clinic_services/get_clinic_service.dart'; @@ -467,6 +468,12 @@ class _AppDrawerState extends State { login(); }, ), + InkWell( + child: DrawerItem(TranslationBase.of(context).servicePriceList, Icons.bookmark_added_sharp, letterSpacing: -0.84, fontSize: 14, bottomLine: false), + onTap: () { + Navigator.of(context).push(FadePage(page: ServicesPriceList())); + }, + ), InkWell( child: DrawerItem(TranslationBase.of(context).privacyPolicy, Icons.web, letterSpacing: -0.84, fontSize: 14, bottomLine: false), onTap: () { @@ -481,7 +488,7 @@ class _AppDrawerState extends State { onTap: () { Navigator.of(context).push(FadePage(page: UserAgreementPage())); }, - ) + ), ], )) ], diff --git a/pubspec.yaml b/pubspec.yaml index dc67cc00..2bba3389 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: hmg_patient_app description: A new Flutter application. -#version: 4.6.020+1 -version: 4.6.0980+40500980 +version: 4.6.021+1 +#version: 4.6.0980+40500980 environment: # sdk: ">=3.0.0 <3.13.0" @@ -225,9 +225,9 @@ flutter: # - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.eot # - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.otf - asset: assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf - # - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff weight: 400 - + - asset: assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf + weight: 500 - asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot - asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf - asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf