haroon_dev #368

Merged
Haroon6138 merged 5 commits from haroon_dev into master 1 month ago

@ -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<HabibWalletViewModel>().setIsWalletAmountToBeLoaded(true);
getIt.get<InsuranceViewModel>().setIsInsuranceDataToBeLoaded(true);
getIt.get<HmgServicesViewModel>().setHasVitalSignDataLoaded(false);
getIt.get<MedicalFileViewModel>().setIsSickLeavesDataNeedsReloading(true);
getIt.get<MedicalFileViewModel>().setIsMedicalReportsDataNeedsReloading(true);
getIt.get<PrescriptionsViewModel>().setIsPrescriptionDataNeedsReloading(true);
if (isUserAgreedBefore) {
LoaderBottomSheet.hideLoader();
navigateToHomeScreen();

@ -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();

@ -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,

@ -78,6 +78,11 @@ class PrescriptionsViewModel extends ChangeNotifier {
notifyListeners();
}
void setIsPrescriptionDataNeedsReloading(bool value) {
isPrescriptionsDataNeedsReloading = value;
notifyListeners();
}
Future<bool> checkIfReminderExistForPrescription(int index) async {
final item = prescriptionDetailsList[index];
// Check device calendar

@ -637,6 +637,7 @@ class _AppointmentCardState extends State<AppointmentCard> {
}
void _goToDetails(BuildContext context) {
if (widget.isLoading) return;
if (widget.isFromMedicalReport) return;
if (widget.isForEyeMeasurements) {
Navigator.of(context).push(

@ -817,10 +817,25 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
ApplePayInsertRequest applePayInsertRequest = ApplePayInsertRequest();
if (!appState.isPaytabsEnabled) {
await payfortViewModel.getPayfortConfigurations(
serviceId: ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum(), projectId: ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12, integrationId: 2);
serviceId: ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum(),
projectId: ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat
? appState.getAuthenticatedUser()!.outSa == 0
? 15
: 2
: appState.getAuthenticatedUser()!.outSa == 0
? 12
: 2,
integrationId: 2);
} else {
await paytabsViewModel.setPaymentConfiguration("LiveCare Payment", num.parse((immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0")),
ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum(), (ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12));
ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum(),
(ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat
? appState.getAuthenticatedUser()!.outSa == 0
? 15
: 2
: appState.getAuthenticatedUser()!.outSa == 0
? 12
: 2));
}
applePayInsertRequest.clientRequestID = transID;
@ -835,7 +850,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
applePayInsertRequest.deviceToken = await Utils.getStringFromPrefs(CacheConst.pushToken);
applePayInsertRequest.voipToken = await Utils.getStringFromPrefs(CacheConst.voipToken);
applePayInsertRequest.doctorID = 0;
applePayInsertRequest.projectID = "12";
applePayInsertRequest.projectID = appState.getAuthenticatedUser()!.outSa == 0 ? "12" : "2";
applePayInsertRequest.serviceID = ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = appState.getAuthenticatedUser()!.patientId.toString();

@ -485,8 +485,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
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();

Loading…
Cancel
Save