From b32c15a88693c1426949ebf989b730b16977f6eb Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 1 Sep 2026 09:47:19 +0300 Subject: [PATCH 1/3] updates --- lib/features/paytabs/paytabs_view_model.dart | 5 +++++ .../appointments/widgets/appointment_card.dart | 1 + .../livecare/immediate_livecare_payment_page.dart | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/features/paytabs/paytabs_view_model.dart b/lib/features/paytabs/paytabs_view_model.dart index a7894f07..35d3c85b 100644 --- a/lib/features/paytabs/paytabs_view_model.dart +++ b/lib/features/paytabs/paytabs_view_model.dart @@ -52,6 +52,11 @@ class PayTabsViewModel extends ChangeNotifier { profileId: paytabsProjectDetailsRespModel!.merchantIdentifier, serverKey: paytabsProjectDetailsRespModel!.accessCode, clientKey: paytabsProjectDetailsRespModel!.shaResponse, + + // profileId: PaymentSdkDefaultConfig.profileID, + // serverKey: PaymentSdkDefaultConfig.serverKey, + // clientKey: PaymentSdkDefaultConfig.clientKey, + transactionType: PaymentSdkTransactionType.SALE, cartId: cartID.substring((cartID.length - 5), cartID.length), cartDescription: paymentDescription, diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart index 1cbe3be2..38c6c7d3 100644 --- a/lib/presentation/appointments/widgets/appointment_card.dart +++ b/lib/presentation/appointments/widgets/appointment_card.dart @@ -637,6 +637,7 @@ class _AppointmentCardState extends State { } void _goToDetails(BuildContext context) { + if (widget.isLoading) return; if (widget.isFromMedicalReport) return; if (widget.isForEyeMeasurements) { Navigator.of(context).push( diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart index 692e8b44..96e38363 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -817,7 +817,13 @@ class _ImmediateLiveCarePaymentPageState extends State Date: Tue, 1 Sep 2026 14:13:00 +0300 Subject: [PATCH 2/3] Updates --- .../authentication/authentication_view_model.dart | 4 ++++ .../medical_file/medical_file_view_model.dart | 10 ++++++++++ .../prescriptions/prescriptions_view_model.dart | 5 +++++ .../livecare/immediate_livecare_payment_page.dart | 15 ++++++++++++--- .../medical_file/medical_file_page.dart | 2 -- 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 72ca42cb..a8719f29 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -31,6 +31,7 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; +import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; @@ -1280,6 +1281,9 @@ class AuthenticationViewModel extends ChangeNotifier { getIt.get().setIsWalletAmountToBeLoaded(true); getIt.get().setIsInsuranceDataToBeLoaded(true); getIt.get().setHasVitalSignDataLoaded(false); + getIt.get().setIsSickLeavesDataNeedsReloading(true); + getIt.get().setIsMedicalReportsDataNeedsReloading(true); + getIt.get().setIsPrescriptionDataNeedsReloading(true); if (isUserAgreedBefore) { LoaderBottomSheet.hideLoader(); navigateToHomeScreen(); diff --git a/lib/features/medical_file/medical_file_view_model.dart b/lib/features/medical_file/medical_file_view_model.dart index a9bfb09c..29f653ec 100644 --- a/lib/features/medical_file/medical_file_view_model.dart +++ b/lib/features/medical_file/medical_file_view_model.dart @@ -168,6 +168,16 @@ class MedicalFileViewModel extends ChangeNotifier { notifyListeners(); } + setIsSickLeavesDataNeedsReloading(bool value) { + isSickLeavesDataNeedsReloading = value; + notifyListeners(); + } + + setIsMedicalReportsDataNeedsReloading(bool value) { + isMedicalReportsDataNeedsReloading = value; + notifyListeners(); + } + setIsPatientSickLeaveListLoading(bool val) { if (val && isSickLeavesDataNeedsReloading) { patientSickLeaveList.clear(); diff --git a/lib/features/prescriptions/prescriptions_view_model.dart b/lib/features/prescriptions/prescriptions_view_model.dart index d75b3f8e..1e33b509 100644 --- a/lib/features/prescriptions/prescriptions_view_model.dart +++ b/lib/features/prescriptions/prescriptions_view_model.dart @@ -78,6 +78,11 @@ class PrescriptionsViewModel extends ChangeNotifier { notifyListeners(); } + void setIsPrescriptionDataNeedsReloading(bool value) { + isPrescriptionsDataNeedsReloading = value; + notifyListeners(); + } + Future checkIfReminderExistForPrescription(int index) async { final item = prescriptionDetailsList[index]; // Check device calendar diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart index 96e38363..31defa56 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -819,14 +819,23 @@ class _ImmediateLiveCarePaymentPageState extends State { dividerColor: AppColors.dividerColor, itemPadding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.h), onItemToggled: (index, isExpanded) { - debugPrint("Item at index $index is now ${isExpanded ? 'expanded' : 'collapsed'}"); - if (index == 0 && isExpanded) { myAppointmentsViewModel.getPatientMyDoctors(isTop8: true); prescriptionsViewModel.initPrescriptionsViewModel(); -- 2.30.2 From ce41d7c1f0331963829f6dfb98b6b95818a9cade Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Thu, 10 Sep 2026 14:44:19 +0300 Subject: [PATCH 3/3] CMC summary page updated --- lib/core/utils/utils.dart | 10 +++--- lib/widgets/map/location_map_widget.dart | 41 ++++++++++++------------ 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index e5761203..d3107d72 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -859,15 +859,15 @@ class Utils { BoxFit fit = BoxFit.cover, ImageErrorWidgetBuilder? errorBuilder, }) { + final double? iconW = (width == null && height == null) ? 24.w : width; + final double? iconH = (width == null && height == null) ? 24.h : height; if (url == null || url.isEmpty) { return Utils.buildSvgWithAssets( - width: width ?? 24.w, - height: height ?? 24.h, + width: iconW ?? 24.w, + height: iconH ?? 24.h, icon: AppAssets.noImageFound, ); } - final iconH = height ?? 24.h; - final iconW = width ?? 24.w; return PreserveImageColors( child: Image.network( url, @@ -877,7 +877,7 @@ class Utils { errorBuilder: errorBuilder ?? (_, __, ___) { //todo_section change the error builder icon that it is returning - return Utils.buildSvgWithAssets(width: iconW, height: iconH, icon: AppAssets.noImageFound); + return Utils.buildSvgWithAssets(width: iconW ?? 24.w, height: iconH ?? 24.h, icon: AppAssets.noImageFound); }, ), ); diff --git a/lib/widgets/map/location_map_widget.dart b/lib/widgets/map/location_map_widget.dart index f3b57aa3..044b3b76 100644 --- a/lib/widgets/map/location_map_widget.dart +++ b/lib/widgets/map/location_map_widget.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; -import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; @@ -131,11 +130,14 @@ class LocationMapWidget extends StatelessWidget { borderRadius: BorderRadius.circular(24.r), child: Utils.buildImgWithNetwork( url: staticMapUrl, + width: double.infinity, + height: 165.h, iconColor: AppColors.transparent, - fit: BoxFit.contain, + fit: BoxFit.cover, errorBuilder: (context, error, stackTrace) { return Container( height: 165.h, + width: double.infinity, decoration: BoxDecoration( color: AppColors.bgScaffoldColor, borderRadius: BorderRadius.circular(24.r), @@ -153,24 +155,23 @@ class LocationMapWidget extends StatelessWidget { ), Positioned( bottom: 0, - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.785, - child: CustomButton( - text: LocaleKeys.getDirections.tr(context: context), - onPressed: onDirectionsTap ?? _defaultLaunchDirections, - backgroundColor: AppColors.textColor.withValues(alpha: 0.8), - borderColor: AppColors.textColor.withValues(alpha: 0.01), - textColor: AppColors.whiteColor, - fontSize: 14.f, - fontWeight: FontWeight.w600, - borderRadius: 12.r, - padding: EdgeInsets.symmetric(horizontal: 10.w), - height: 40.h, - icon: AppAssets.directions_icon, - iconColor: AppColors.whiteColor, - iconSize: 14.h, - ).paddingAll(12.h), - ), + left: 0, + right: 0, + child: CustomButton( + text: LocaleKeys.getDirections.tr(context: context), + onPressed: onDirectionsTap ?? _defaultLaunchDirections, + backgroundColor: AppColors.textColor.withValues(alpha: 0.8), + borderColor: AppColors.textColor.withValues(alpha: 0.01), + textColor: AppColors.whiteColor, + fontSize: 14.f, + fontWeight: FontWeight.w600, + borderRadius: 12.r, + padding: EdgeInsets.symmetric(horizontal: 10.w), + height: 40.h, + icon: AppAssets.directions_icon, + iconColor: AppColors.whiteColor, + iconSize: 14.h, + ).paddingAll(12.h), ), ], ), -- 2.30.2