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/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/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/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..31defa56 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -817,10 +817,25 @@ 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();