diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index 0c8a2314..5478c379 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -211,7 +211,7 @@ class ApiClientImp implements ApiClient { } body['TokenID'] = "@dm!n"; - // body['PatientID'] = 4774598; + // body['PatientID'] = 6424682; // body['PatientID'] = 89754444; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; diff --git a/lib/core/app_state.dart b/lib/core/app_state.dart index 3369ef49..2731cc1a 100644 --- a/lib/core/app_state.dart +++ b/lib/core/app_state.dart @@ -47,17 +47,16 @@ class AppState { AuthenticatedUser? _authenticatedChildUser; bool isPaytabsEnabled = false; - bool isPayfortHostedPageEnabled = true; void setIsPaytabsEnabled(bool value) { - // isPaytabsEnabled = value; - isPaytabsEnabled = false; + isPaytabsEnabled = value; + // isPaytabsEnabled = true; } void setIsPayfortHostedPageEnabled(bool value) { isPayfortHostedPageEnabled = value; - // isPayfortHostedPageEnabled = false; + // isPayfortHostedPageEnabled = true; } int? _superUserID; diff --git a/lib/features/authentication/widgets/otp_verification_screen.dart b/lib/features/authentication/widgets/otp_verification_screen.dart index 372f7e8f..1b5c80d1 100644 --- a/lib/features/authentication/widgets/otp_verification_screen.dart +++ b/lib/features/authentication/widgets/otp_verification_screen.dart @@ -451,6 +451,7 @@ class _OTPVerificationScreenState extends State { @override void initState() { + Clarity.setCurrentScreenName('OTP Verification Screen'); super.initState(); _otpController = TextEditingController(); _startResendTimer(); diff --git a/lib/features/book_appointments/book_appointments_view_model.dart b/lib/features/book_appointments/book_appointments_view_model.dart index 200b51de..a4a61f35 100644 --- a/lib/features/book_appointments/book_appointments_view_model.dart +++ b/lib/features/book_appointments/book_appointments_view_model.dart @@ -844,7 +844,7 @@ class BookAppointmentsViewModel extends ChangeNotifier { Future getDoctorFreeSlots({bool isBookingForLiveCare = false, Function(dynamic)? onSuccess, Function(String)? onError}) async { docFreeSlots.clear(); DateTime date; - final DateFormat formatter = DateFormat('HH:mm'); + final DateFormat formatter = DateFormat('HH:mm', "en-US"); final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); Map _eventsParsed; diff --git a/lib/features/immediate_livecare/immediate_livecare_view_model.dart b/lib/features/immediate_livecare/immediate_livecare_view_model.dart index 68ae6952..68246f00 100644 --- a/lib/features/immediate_livecare/immediate_livecare_view_model.dart +++ b/lib/features/immediate_livecare/immediate_livecare_view_model.dart @@ -121,8 +121,8 @@ class ImmediateLiveCareViewModel extends ChangeNotifier { } Future getLiveCareImmediateAppointmentFees({Function(dynamic)? onSuccess, Function(String)? onError}) async { - final result = - await immediateLiveCareRepo.getLiveCareImmediateAppointmentFees(_appState.getAuthenticatedUser()!.age!, _appState.getAuthenticatedUser()!.gender!, immediateLiveCareSelectedClinic.serviceID!); + final result = await immediateLiveCareRepo.getLiveCareImmediateAppointmentFees( + _appState.getAuthenticatedUser()!.age ?? 22, _appState.getAuthenticatedUser()!.gender ?? 1, immediateLiveCareSelectedClinic.serviceID ?? 1); result.fold( (failure) async { diff --git a/lib/features/my_appointments/appointment_rating_view_model.dart b/lib/features/my_appointments/appointment_rating_view_model.dart index 6dd41ff5..cef25419 100644 --- a/lib/features/my_appointments/appointment_rating_view_model.dart +++ b/lib/features/my_appointments/appointment_rating_view_model.dart @@ -25,6 +25,7 @@ class AppointmentRatingViewModel extends ChangeNotifier { bool isRateClinic = false; Future getLastRatingAppointment({Function(dynamic)? onSuccess, Function(String)? onError}) async { + appointmentRatedList.clear(); final result = await myAppointmentsRepo.getLastRatingAppointment(); result.fold( diff --git a/lib/features/paytabs/paytabs_view_model.dart b/lib/features/paytabs/paytabs_view_model.dart index 35a924af..d572ab33 100644 --- a/lib/features/paytabs/paytabs_view_model.dart +++ b/lib/features/paytabs/paytabs_view_model.dart @@ -65,7 +65,7 @@ class PayTabsViewModel extends ChangeNotifier { "12626"), alternativePaymentMethods: [], linkBillingNameWithCardHolderName: true, - simplifyApplePayValidation: true, + simplifyApplePayValidation: false, ); paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations( diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 59783f20..f4d20944 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -60,7 +60,7 @@ class AppointmentDoctorCard extends StatelessWidget { Column( children: [ Utils.buildImgWithNetwork( - url: patientAppointmentHistoryResponseModel.doctorImageURL!, + url: patientAppointmentHistoryResponseModel.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", iconColor: AppColors.transparent, width: 63.h, height: 63.h, diff --git a/lib/presentation/authentication/register.dart b/lib/presentation/authentication/register.dart index e77038a5..8d44f377 100644 --- a/lib/presentation/authentication/register.dart +++ b/lib/presentation/authentication/register.dart @@ -1,3 +1,4 @@ +import 'package:clarity_flutter/clarity_flutter.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; @@ -31,6 +32,7 @@ class _RegisterNew extends State { @override void initState() { + Clarity.setCurrentScreenName('Registration Step 1 Screen'); super.initState(); _nationalIdFocusNode = FocusNode(); _dobFocusNode = FocusNode(); diff --git a/lib/presentation/authentication/register_step2.dart b/lib/presentation/authentication/register_step2.dart index cb96e63d..46919e95 100644 --- a/lib/presentation/authentication/register_step2.dart +++ b/lib/presentation/authentication/register_step2.dart @@ -1,3 +1,4 @@ +import 'package:clarity_flutter/clarity_flutter.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; @@ -34,6 +35,7 @@ class _RegisterNew extends State { @override void initState() { + Clarity.setCurrentScreenName('Registration Step 2 Screen'); super.initState(); authVM = context.read(); insuranceVM = context.read(); diff --git a/lib/presentation/book_appointment/select_livecare_clinic_page.dart b/lib/presentation/book_appointment/select_livecare_clinic_page.dart index bd2b6462..b9d63f55 100644 --- a/lib/presentation/book_appointment/select_livecare_clinic_page.dart +++ b/lib/presentation/book_appointment/select_livecare_clinic_page.dart @@ -1,11 +1,13 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; +import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/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/features/authentication/authentication_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart'; @@ -114,11 +116,11 @@ class SelectLivecareClinicPage extends StatelessWidget { ), ), ), - Column( - children: [ - CustomButton( - text: LocaleKeys.yesPleasImInAHurry.tr(context: context), - onPressed: () async { + getIt.get().isAuthenticated + ? Column(children: [ + CustomButton( + text: LocaleKeys.yesPleasImInAHurry.tr(context: context), + onPressed: () async { Navigator.pop(context); GetLiveCareClinicListResponseModel liveCareClinic = GetLiveCareClinicListResponseModel( iD: selectedClinic.liveCareClinicID, @@ -177,8 +179,24 @@ class SelectLivecareClinicPage extends StatelessWidget { height: 50.h, ).paddingSymmetrical(24.h, 0.h), SizedBox(height: 24.h), - ], - ), + ]) + : CustomButton( + text: LocaleKeys.loginToUseServiceLiveCare.tr(), + onPressed: () async { + await getIt.get().onLoginPressed(); + }, + backgroundColor: AppColors.primaryRedColor, + borderColor: AppColors.primaryRedColor, + textColor: AppColors.whiteColor, + fontSize: 16.f, + isBold: true, + borderRadius: 12.r, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 50.h, + icon: AppAssets.login1, + iconColor: AppColors.whiteColor, + iconSize: 24.h, + ).paddingSymmetrical(24.h, 120.h), ], ), );