* 'master' of http://34.17.182.140/Haroon6138/HMG_Patient_App_New:
  Update to stores Version 22.1
  Updates
  Locale fix
  Update to Stores VersionID 22.0
  Insurance model updates
  Habib Wallet & Lakum data updates
  Habib Wallet & Lakum card updates
  Dubai timezone handled
  Medical report date fix
dev_sultan
Sultan khan 3 weeks ago
commit 5cee0d4185

@ -211,7 +211,7 @@ class ApiClientImp implements ApiClient {
} }
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// body['PatientID'] = 1307867; // body['PatientID'] = 5422188;
// body['PatientID'] = 53320; // body['PatientID'] = 53320;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;

@ -301,7 +301,7 @@ class ApiConsts {
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations"; static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api **************** // ************ static values for Api ****************
static final double appVersionID = 21.9; static final double appVersionID = 22.1;
// static final double appVersionID = 50.7; // static final double appVersionID = 50.7;
static final int appChannelId = 3; static final int appChannelId = 3;

@ -28,21 +28,21 @@ class DateUtil {
const end = "+0300)"; const end = "+0300)";
final startIndex = date.indexOf(start); final startIndex = date.indexOf(start);
final endIndex = date.indexOf(end, startIndex + start.length); final endIndex = date.indexOf(end, startIndex + start.length);
// if (projectId == 2 || projectId == 3) { if (projectId == 2 || projectId == 3) {
// return DateTime.fromMillisecondsSinceEpoch( return DateTime.fromMillisecondsSinceEpoch(
// int.parse( int.parse(
// date.substring(startIndex + start.length, endIndex), date.substring(startIndex + start.length, endIndex),
// ), ),
// isUtc: true) isUtc: true)
// .add(Duration(hours: 4)); .add(Duration(hours: 4));
// } else { } else {
return DateTime.fromMillisecondsSinceEpoch( return DateTime.fromMillisecondsSinceEpoch(
int.parse( int.parse(
date.substring(startIndex + start.length, endIndex), date.substring(startIndex + start.length, endIndex),
), ),
isUtc: true) isUtc: true)
.add(Duration(hours: 3)); .add(Duration(hours: 3));
// } }
} else { } else {
return DateTime.now(); return DateTime.now();
} }

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -842,67 +843,73 @@ class BookAppointmentsViewModel extends ChangeNotifier {
} }
Future<void> getDoctorFreeSlots({bool isBookingForLiveCare = false, Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getDoctorFreeSlots({bool isBookingForLiveCare = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
docFreeSlots.clear(); // try {
DateTime date; docFreeSlots.clear();
final DateFormat formatter = DateFormat('HH:mm', "en-US"); DateTime date;
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); final DateFormat formatter = DateFormat('HH:mm', "en-US");
Map<DateTime, List> _eventsParsed; // final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
// Map<DateTime, List> _eventsParsed;
final result = await bookAppointmentsRepo.getDoctorFreeSlots(
selectedDoctor.clinicID ?? 0, final result = await bookAppointmentsRepo.getDoctorFreeSlots(
selectedDoctor.projectID ?? 0, selectedDoctor.clinicID ?? 0,
selectedDoctor.doctorID ?? 0, selectedDoctor.projectID ?? 0,
isBookingForLiveCare, selectedDoctor.doctorID ?? 0,
continueDentalPlan: isContinueDentalPlan, isBookingForLiveCare,
onError: onError, continueDentalPlan: isContinueDentalPlan,
); onError: onError,
);
result.fold(
(failure) async { result.fold(
print(failure); (failure) async {
if (onError != null) { print(failure);
onError(failure.message); if (onError != null) {
} onError(failure.message);
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
onError!(apiResponse.errorMessage ?? "Unknown error occurred");
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data['FreeTimeSlots'] == null || apiResponse.data['FreeTimeSlots'].isEmpty) {
onError!("No free slots available".tr());
return;
} }
initialSlotDuration = apiResponse.data["InitialSlotDuration"]; },
freeSlotsResponse = apiResponse.data['FreeTimeSlots']; (apiResponse) {
isWaitingAppointmentAvailable = apiResponse.data["IsAllowToBookWaitingAppointment"]; if (apiResponse.messageStatus == 2) {
onError!(apiResponse.errorMessage ?? "Unknown error occurred");
// isWaitingAppointmentAvailable = true; // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
freeSlotsResponse.forEach((element) { if (apiResponse.data['FreeTimeSlots'] == null || apiResponse.data['FreeTimeSlots'].isEmpty) {
// date = (isLiveCareSchedule != null && isLiveCareSchedule) onError!("No free slots available".tr());
// ? DateUtil.convertStringToDate(element) return;
// : }
date = DateUtil.convertStringToDateSaudiTimezone(element, int.parse(selectedDoctor.projectID.toString())); initialSlotDuration = apiResponse.data["InitialSlotDuration"];
slotsList.add(FreeSlot(date, ['slot'])); freeSlotsResponse = apiResponse.data['FreeTimeSlots'];
docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date, vidaDate: element)); isWaitingAppointmentAvailable = apiResponse.data["IsAllowToBookWaitingAppointment"];
});
// isWaitingAppointmentAvailable = true;
freeSlotsResponse.forEach((element) {
// date = (isLiveCareSchedule != null && isLiveCareSchedule)
// ? DateUtil.convertStringToDate(element)
// :
date = DateUtil.convertStringToDateSaudiTimezone(element, int.parse(selectedDoctor.projectID.toString()));
slotsList.add(FreeSlot(date, ['slot']));
docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date, vidaDate: element));
});
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);
}
} }
} },
}, );
); // } catch(ex) {
// if (onError != null) {
// onError(ex.toString());
// }
// }
} }
Future<void> getLiveCareDoctorFreeSlots({bool isBookingForLiveCare = false, Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getLiveCareDoctorFreeSlots({bool isBookingForLiveCare = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
docFreeSlots.clear(); docFreeSlots.clear();
DateTime date; DateTime date;
final DateFormat formatter = DateFormat('HH:mm', "en-US"); final DateFormat formatter = DateFormat('HH:mm', "en-US");
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); // final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
Map<DateTime, List> _eventsParsed; // Map<DateTime, List> _eventsParsed;
final result = await bookAppointmentsRepo.getLiveCareDoctorFreeSlots( final result = await bookAppointmentsRepo.getLiveCareDoctorFreeSlots(
selectedDoctor.clinicID ?? 0, selectedLiveCareClinic.serviceID ?? 0, selectedDoctor.projectID ?? 0, selectedDoctor.doctorID ?? 0, isBookingForLiveCare, selectedDoctor.clinicID ?? 0, selectedLiveCareClinic.serviceID ?? 0, selectedDoctor.projectID ?? 0, selectedDoctor.doctorID ?? 0, isBookingForLiveCare,

@ -30,7 +30,36 @@ class HabibWalletViewModel extends ChangeNotifier {
num habibWalletAmount = 0; num habibWalletAmount = 0;
num walletRechargeAmount = 0; num walletRechargeAmount = 0;
String notesText = ""; String notesText = "";
bool isWalletAmountToBeLoaded = true; bool isWalletAmountToBeLoaded = false;
bool isLakumInfoToBeLoaded = false;
// ── Balance visibility (show/hide like a password field) ──────────────────
bool isWalletAmountHidden = true;
bool isLakumPointsHidden = true;
// Track whether data has already been fetched (to avoid re-calling APIs).
bool isWalletAmountFetched = false;
bool isLakumInfoFetched = false;
void toggleWalletAmountVisibility() {
isWalletAmountHidden = !isWalletAmountHidden;
notifyListeners();
// On first unhide, fetch the data if not already fetched.
if (!isWalletAmountHidden && !isWalletAmountFetched) {
isWalletAmountToBeLoaded = true;
getPatientBalanceAmount();
}
}
void toggleLakumPointsVisibility() {
isLakumPointsHidden = !isLakumPointsHidden;
notifyListeners();
// On first unhide, fetch the data if not already fetched.
if (!isLakumPointsHidden && !isLakumInfoFetched) {
isLakumInfoToBeLoaded = true;
getLakumAccountInformation();
}
}
bool isBottomSheetContentLoading = false; bool isBottomSheetContentLoading = false;
@ -70,6 +99,8 @@ class HabibWalletViewModel extends ChangeNotifier {
bool isLakumAccountInfoLoading = false; bool isLakumAccountInfoLoading = false;
LakumInquiryInformationResponseModel? lakumAccountInfo; LakumInquiryInformationResponseModel? lakumAccountInfo;
// Get all flattened transactions sorted by date descending // Get all flattened transactions sorted by date descending
List<PointsDetails> getAllLakumTransactions() { List<PointsDetails> getAllLakumTransactions() {
if (lakumAccountInfo?.gainedPointsAmountPerYear == null) { if (lakumAccountInfo?.gainedPointsAmountPerYear == null) {
@ -328,6 +359,8 @@ class HabibWalletViewModel extends ChangeNotifier {
if (isWalletAmountToBeLoaded) { if (isWalletAmountToBeLoaded) {
isWalletAmountLoading = true; isWalletAmountLoading = true;
habibWalletAmount = 0; habibWalletAmount = 0;
}
if (isLakumInfoToBeLoaded) {
isLakumAccountInfoLoading = true; isLakumAccountInfoLoading = true;
yahalaAccountNumber = ""; yahalaAccountNumber = "";
} }
@ -399,6 +432,11 @@ class HabibWalletViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
setIsLakumInfoToBeLoaded(bool value) {
isLakumInfoToBeLoaded = value;
notifyListeners();
}
String getSelectedRechargeTypeValue() { String getSelectedRechargeTypeValue() {
switch (selectedRechargeType) { switch (selectedRechargeType) {
case 1: case 1:
@ -437,6 +475,7 @@ class HabibWalletViewModel extends ChangeNotifier {
isWalletAmountLoading = false; isWalletAmountLoading = false;
isWalletAmountToBeLoaded = false; isWalletAmountToBeLoaded = false;
isWalletAmountFetched = true;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);
@ -540,7 +579,7 @@ class HabibWalletViewModel extends ChangeNotifier {
} }
Future<void> getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isWalletAmountToBeLoaded) { if (!isLakumInfoToBeLoaded) {
return; return;
} }
@ -555,6 +594,8 @@ class HabibWalletViewModel extends ChangeNotifier {
(failure) async { (failure) async {
yahalaAccountNumber = "0"; yahalaAccountNumber = "0";
isLakumAccountInfoLoading = false; isLakumAccountInfoLoading = false;
isLakumInfoFetched = true;
isLakumInfoToBeLoaded = false;
notifyListeners(); // 675534 notifyListeners(); // 675534
}, },
(apiResponse) async { (apiResponse) async {
@ -581,6 +622,8 @@ class HabibWalletViewModel extends ChangeNotifier {
); );
} }
isLakumAccountInfoLoading = false; isLakumAccountInfoLoading = false;
isLakumInfoFetched = true;
isLakumInfoToBeLoaded = false;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);

@ -135,7 +135,9 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
onError!(failure.message); if(onError != null) {
onError(failure.message);
}
}, },
(apiResponse) { (apiResponse) {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {

@ -11,7 +11,7 @@ import 'package:hmg_patient_app_new/features/insurance/models/resp_models/upload
import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/logger_service.dart';
abstract class InsuranceRepo { abstract class InsuranceRepo {
Future<Either<Failure, GenericApiModel<List<PatientInsuranceDetailsResponseModel>>>> getPatientInsuranceDetails(); Future<Either<Failure, GenericApiModel<List<PatientInsuranceDetailsResponseModel>>>> getPatientInsuranceDetails({bool isFromHomePage = false});
Future<Either<Failure, GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>>> getPatientInsuranceCardHistory(); Future<Either<Failure, GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>>> getPatientInsuranceCardHistory();
@ -35,8 +35,10 @@ class InsuranceRepoImp implements InsuranceRepo {
InsuranceRepoImp({required this.loggerService, required this.apiClient}); InsuranceRepoImp({required this.loggerService, required this.apiClient});
@override @override
Future<Either<Failure, GenericApiModel<List<PatientInsuranceDetailsResponseModel>>>> getPatientInsuranceDetails() async { Future<Either<Failure, GenericApiModel<List<PatientInsuranceDetailsResponseModel>>>> getPatientInsuranceDetails({bool isFromHomePage = false}) async {
Map<String, dynamic> mapDevice = {}; Map<String, dynamic> mapDevice = {
"IsFromHomePage": isFromHomePage
};
try { try {
GenericApiModel<List<PatientInsuranceDetailsResponseModel>>? apiResponse; GenericApiModel<List<PatientInsuranceDetailsResponseModel>>? apiResponse;

@ -32,11 +32,11 @@ class InsuranceViewModel extends ChangeNotifier {
InsuranceViewModel({required this.insuranceRepo, required this.errorHandlerService}); InsuranceViewModel({required this.insuranceRepo, required this.errorHandlerService});
initInsuranceProvider() { initInsuranceProvider({bool isFromHomePage = false}) {
if (isInsuranceDataToBeLoaded) { if (isInsuranceDataToBeLoaded) {
patientInsuranceList.clear(); patientInsuranceList.clear();
isInsuranceLoading = true; isInsuranceLoading = true;
getPatientInsuranceDetails(); getPatientInsuranceDetails(isFromHomePage: isFromHomePage);
} }
patientInsuranceCardHistoryList.clear(); patientInsuranceCardHistoryList.clear();
isInsuranceHistoryLoading = true; isInsuranceHistoryLoading = true;
@ -76,12 +76,12 @@ class InsuranceViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
Future<void> getPatientInsuranceDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientInsuranceDetails({bool isFromHomePage = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isInsuranceDataToBeLoaded) { if (!isInsuranceDataToBeLoaded) {
return; return;
} }
final result = await insuranceRepo.getPatientInsuranceDetails(); final result = await insuranceRepo.getPatientInsuranceDetails(isFromHomePage: isFromHomePage);
result.fold( result.fold(
// (failure) async => await errorHandlerService.handleError(failure: failure), // (failure) async => await errorHandlerService.handleError(failure: failure),

@ -117,6 +117,8 @@ Future<void> callInitializations() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized(); await EasyLocalization.ensureInitialized();
Intl.defaultLocale = "en_US";
SafeDevice.init( SafeDevice.init(
SafeDeviceConfig(mockLocationCheckEnabled: false), // disables mock location check on Android SafeDeviceConfig(mockLocationCheckEnabled: false), // disables mock location check on Android
); );

@ -726,7 +726,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
); );
}); });
} else { } else {
openPaymentURL("tamara"); openPaymentURL("TAMARA");
} }
}) })
: SizedBox.shrink(), : SizedBox.shrink(),

@ -321,7 +321,7 @@ class _AppointmentCardState extends State<AppointmentCard> {
icon: AppAssets.appointment_calendar_icon, icon: AppAssets.appointment_calendar_icon,
richText: widget.isLoading richText: widget.isLoading
? 'Cardiology'.toText10().toShimmer2(isShow: widget.isLoading) ? 'Cardiology'.toText10().toShimmer2(isShow: widget.isLoading)
: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate), false)}" : "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate), false)} ${(widget.patientAppointmentHistoryResponseModel.startTime != null && widget.patientAppointmentHistoryResponseModel.startTime!.isNotEmpty) ? widget.patientAppointmentHistoryResponseModel.startTime!.substring(0, 5) : DateUtil.formatDateToTimeLang(DateUtil.convertStringToDateSaudiTimezone(widget.patientAppointmentHistoryResponseModel.appointmentDate!, widget.patientAppointmentHistoryResponseModel.projectID), false)}"
.toText10(isEnglishOnly: true, isBold: true), .toText10(isEnglishOnly: true, isBold: true),
).toShimmer2(isShow: widget.isLoading), ).toShimmer2(isShow: widget.isLoading),
), ),

@ -142,10 +142,7 @@ class AppointmentDoctorCard extends StatelessWidget {
child: AppCustomChipWidget( child: AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w),
icon: AppAssets.doctor_calendar_icon, icon: AppAssets.doctor_calendar_icon,
richText: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang( richText: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${(patientAppointmentHistoryResponseModel.startTime != null && patientAppointmentHistoryResponseModel.startTime!.isNotEmpty) ? patientAppointmentHistoryResponseModel.startTime!.substring(0, 5) : DateUtil.formatDateToTimeLang(DateUtil.convertStringToDateSaudiTimezone(patientAppointmentHistoryResponseModel.appointmentDate!, patientAppointmentHistoryResponseModel.projectID), false)}"
DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate),
false,
)}"
.toText10(isBold: true), .toText10(isBold: true),
), ),
), ),

@ -523,6 +523,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
).onPress(() { ).onPress(() {
bookAppointmentsViewModel.setIsDoctorSearchByNameStarted(false); bookAppointmentsViewModel.setIsDoctorSearchByNameStarted(false);
bookAppointmentsViewModel.setIsLiveCareSchedule(false);
bookAppointmentsViewModel.setProjectID(null); bookAppointmentsViewModel.setProjectID(null);
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
@ -554,6 +555,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
).onPress(() { ).onPress(() {
Clarity.sendCustomEvent('Select_Region_Page'); Clarity.sendCustomEvent('Select_Region_Page');
bookAppointmentsViewModel.setProjectID(null); bookAppointmentsViewModel.setProjectID(null);
bookAppointmentsViewModel.setIsLiveCareSchedule(false);
openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION); openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION);
}), }),
], ],

@ -218,7 +218,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
bookAppointmentsViewModel: bookAppointmentsViewModel, bookAppointmentsViewModel: bookAppointmentsViewModel,
isDoctorNameSearch: true, isDoctorNameSearch: true,
).paddingSymmetrical(16.h, 0.h).onPress(() async { ).paddingSymmetrical(16.h, 0.h).onPress(() async {
if (bookAppointmentsVM.filteredDoctorList[index].clinicID == 17 && getIt.get<AppState>().getAuthenticatedUser()!.age! < 12) { if (getIt.get<AppState>().isAuthenticated && bookAppointmentsVM.filteredDoctorList[index].clinicID == 17 && getIt.get<AppState>().getAuthenticatedUser()!.age! < 12) {
bookAppointmentsViewModel.setProjectID(bookAppointmentsVM.filteredDoctorList[index].projectID.toString()); bookAppointmentsViewModel.setProjectID(bookAppointmentsVM.filteredDoctorList[index].projectID.toString());
bookAppointmentsViewModel.setSelectedClinic(GetClinicsListResponseModel( bookAppointmentsViewModel.setSelectedClinic(GetClinicsListResponseModel(
clinicID: bookAppointmentsVM.filteredDoctorList[index].clinicID, clinicID: bookAppointmentsVM.filteredDoctorList[index].clinicID,

@ -471,7 +471,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
).paddingSymmetrical(16.h, 16.h), ).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA"; selectedPaymentMethod = "TAMARA";
openPaymentURL("tamara"); openPaymentURL("TAMARA");
}) })
: SizedBox.shrink(), : SizedBox.shrink(),
], ],

@ -186,7 +186,7 @@ class DoctorCard extends StatelessWidget {
if (isDoctorNameSearch && doctorsListResponseModel.clinicID == 17) { if (isDoctorNameSearch && doctorsListResponseModel.clinicID == 17) {
GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel( GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel(
clinicID: doctorsListResponseModel.clinicID, clinicDescription: doctorsListResponseModel.clinicName, isLiveCareClinicAndOnline: false, liveCareServiceID: 0, liveCareClinicID: 0); clinicID: doctorsListResponseModel.clinicID, clinicDescription: doctorsListResponseModel.clinicName, isLiveCareClinicAndOnline: false, liveCareServiceID: 0, liveCareClinicID: 0);
if (getIt.get<AppState>().getAuthenticatedUser()!.age! > 12) { if (getIt.get<AppState>().isAuthenticated && getIt.get<AppState>().getAuthenticatedUser()!.age! > 12) {
bookAppointmentsViewModel.setProjectID(doctorsListResponseModel.projectID.toString()); bookAppointmentsViewModel.setProjectID(doctorsListResponseModel.projectID.toString());
bookAppointmentsViewModel.setSelectedClinic(selectedClinic); bookAppointmentsViewModel.setSelectedClinic(selectedClinic);
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true); bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);

@ -128,9 +128,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
emergencyServicesViewModel.selectedHospital!.iD, emergencyServicesViewModel.selectedHospital!.iD,
appState.getAuthenticatedUser()!.patientId!, appState.getAuthenticatedUser()!.patientId!,
); );
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration("ER Online Check-In Payment", emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
"ER Online Check-In Payment",
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD); ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD);
paytabsViewModel.startCardPayment( paytabsViewModel.startCardPayment(
paymentOption: selectedPaymentMethod, paymentOption: selectedPaymentMethod,
@ -147,45 +145,46 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(), projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(),
onSuccess: (PaytabsTransactionResponseModel transactionData) async { onSuccess: (PaytabsTransactionResponseModel transactionData) async {
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
await emergencyServicesViewModel.ER_CreateAdvancePayment( await emergencyServicesViewModel.ER_CreateAdvancePayment(
paymentMethodName: selectedPaymentMethod, paymentMethodName: selectedPaymentMethod,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
onSuccess: (value) async { onSuccess: (value) async {
await emergencyServicesViewModel.addAdvanceNumberRequest( await emergencyServicesViewModel.addAdvanceNumberRequest(
advanceNumber: value, advanceNumber: value,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true); emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)), child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)),
callBackFunc: () { callBackFunc: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
CustomPageRoute( CustomPageRoute(
page: LandingNavigation(), page: LandingNavigation(),
), ),
(r) => false); (r) => false);
}, },
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
); );
} else {} } else {}
}); });
}); });
} else {} } else {}
}, onError: (errMsg) { },
showCommonBottomSheetWithoutHeight( onError: (errMsg) {
context, showCommonBottomSheetWithoutHeight(
child: Utils.getErrorWidget(loadingText: errMsg.toString()), context,
callBackFunc: () {}, child: Utils.getErrorWidget(loadingText: errMsg.toString()),
isFullScreen: false, callBackFunc: () {},
isCloseButtonVisible: true, isFullScreen: false,
); isCloseButtonVisible: true,
}); );
});
} else { } else {
openPaymentURL("mada"); openPaymentURL("mada");
} }
@ -235,9 +234,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
emergencyServicesViewModel.selectedHospital!.iD, emergencyServicesViewModel.selectedHospital!.iD,
appState.getAuthenticatedUser()!.patientId!, appState.getAuthenticatedUser()!.patientId!,
); );
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration("ER Online Check-In Payment", emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
"ER Online Check-In Payment",
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD); ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD);
paytabsViewModel.startCardPayment( paytabsViewModel.startCardPayment(
paymentOption: selectedPaymentMethod, paymentOption: selectedPaymentMethod,
@ -254,45 +251,46 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(), projectID: emergencyServicesViewModel.selectedHospital!.iD.toString(),
onSuccess: (PaytabsTransactionResponseModel transactionData) async { onSuccess: (PaytabsTransactionResponseModel transactionData) async {
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
await emergencyServicesViewModel.ER_CreateAdvancePayment( await emergencyServicesViewModel.ER_CreateAdvancePayment(
paymentMethodName: selectedPaymentMethod, paymentMethodName: selectedPaymentMethod,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
onSuccess: (value) async { onSuccess: (value) async {
await emergencyServicesViewModel.addAdvanceNumberRequest( await emergencyServicesViewModel.addAdvanceNumberRequest(
advanceNumber: value, advanceNumber: value,
paymentReference: transactionData.transactionReference!, paymentReference: transactionData.transactionReference!,
appointmentNo: "0", appointmentNo: "0",
onSuccess: (val) { onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true); emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) { if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)), child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)),
callBackFunc: () { callBackFunc: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
CustomPageRoute( CustomPageRoute(
page: LandingNavigation(), page: LandingNavigation(),
), ),
(r) => false); (r) => false);
}, },
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
); );
} else {} } else {}
}); });
}); });
} else {} } else {}
}, onError: (errMsg) { },
showCommonBottomSheetWithoutHeight( onError: (errMsg) {
context, showCommonBottomSheetWithoutHeight(
child: Utils.getErrorWidget(loadingText: errMsg.toString()), context,
callBackFunc: () {}, child: Utils.getErrorWidget(loadingText: errMsg.toString()),
isFullScreen: false, callBackFunc: () {},
isCloseButtonVisible: true, isFullScreen: false,
); isCloseButtonVisible: true,
}); );
});
} else { } else {
openPaymentURL("visa"); openPaymentURL("visa");
} }
@ -332,7 +330,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
).paddingSymmetrical(16.h, 16.h), ).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(24.h, 0.h).onPress(() {
selectedPaymentMethod = "TAMARA"; selectedPaymentMethod = "TAMARA";
openPaymentURL("tamara"); openPaymentURL("TAMARA");
}) })
: SizedBox.shrink(), : SizedBox.shrink(),
], ],
@ -353,39 +351,39 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [ children: [
(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.isCash ?? true) (emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.isCash ?? true)
? Container( ? Container(
height: 50.h, height: 50.h,
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: AppColors.secondaryLightRedBorderColor, color: AppColors.secondaryLightRedBorderColor,
shape: SmoothRectangleBorder( shape: SmoothRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)), borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
smoothness: 1, smoothness: 1,
), ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(24.h, 0.h),
CustomButton( CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context), text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () { onPressed: () {
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: InsuranceHomePage(), page: InsuranceHomePage(),
), ),
); );
}, },
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.secondaryLightRedBorderColor, borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 10, fontSize: 10,
isBold: true, isBold: true,
borderRadius: 8, borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0), padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 30.h, height: 30.h,
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
], ],
), ),
) )
: const SizedBox(), : const SizedBox(),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
@ -403,7 +401,9 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [ children: [
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor), LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
13,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
@ -417,14 +417,8 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
Platform.isIOS Platform.isIOS
? Utils.buildSvgWithAssets( ? Utils.buildSvgWithAssets(icon: AppAssets.apple_pay_button, width: 200.h, height: 80.h, fit: BoxFit.contain, applyThemeColor: false).paddingSymmetrical(24.h, 0.h).onPress(() {
icon: AppAssets.apple_pay_button, if (Utils.havePrivilege(103)) {
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
if (Utils.havePrivilege(103)) {
startApplePay(); startApplePay();
} else { } else {
openPaymentURL("ApplePay"); openPaymentURL("ApplePay");
@ -530,9 +524,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
if (appState.isPaytabsEnabled) { if (appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA"; selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration("ER Online Check-In Payment", emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
"ER Online Check-In Payment",
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!,
ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD); ServiceTypeEnum.erOnlineCheckIn.getIdFromServiceEnum(), emergencyServicesViewModel.selectedHospital!.iD);
paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async { paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));

@ -159,9 +159,11 @@ class _LandingPageState extends State<LandingPage> {
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
Clarity.setCustomUserId(appState.getAuthenticatedUser()!.patientId.toString()); Clarity.setCustomUserId(appState.getAuthenticatedUser()!.patientId.toString());
habibWalletVM.initHabibWalletProvider(); // habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); // Wallet & Lakum data are fetched lazily when the user unhides the values.
habibWalletVM.getLakumAccountInformation(); // habibWalletVM.getPatientBalanceAmount();
// habibWalletVM.getLakumAccountInformation();
todoSectionViewModel.initializeTodoSectionViewModel(); todoSectionViewModel.initializeTodoSectionViewModel();
immediateLiveCareViewModel.initImmediateLiveCare(); immediateLiveCareViewModel.initImmediateLiveCare();
immediateLiveCareViewModel.getPatientLiveCareHistory(); immediateLiveCareViewModel.getPatientLiveCareHistory();
@ -170,7 +172,10 @@ class _LandingPageState extends State<LandingPage> {
emergencyServicesViewModel.checkPatientERAdvanceBalance(); emergencyServicesViewModel.checkPatientERAdvanceBalance();
// myAppointmentsViewModel.getPatientAppointmentQueueDetails(); // myAppointmentsViewModel.getPatientAppointmentQueueDetails();
notificationsViewModel.initNotificationsViewModel(); notificationsViewModel.initNotificationsViewModel();
insuranceViewModel.initInsuranceProvider();
if (Utils.havePrivilege(122)) {
insuranceViewModel.initInsuranceProvider(isFromHomePage: true);
}
if (!appState.isRatedVisible) { if (!appState.isRatedVisible) {
appointmentRatingViewModel.getLastRatingAppointment( appointmentRatingViewModel.getLastRatingAppointment(
@ -234,9 +239,9 @@ class _LandingPageState extends State<LandingPage> {
myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true); myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true);
// Refresh Appointments Data // Refresh Appointments Data
habibWalletVM.initHabibWalletProvider(); // habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); // habibWalletVM.getPatientBalanceAmount();
habibWalletVM.getLakumAccountInformation(); // habibWalletVM.getLakumAccountInformation();
// Refresh Ancillary Orders // Refresh Ancillary Orders
todoSectionViewModel.setIsAncillaryOrdersNeedReloading(true); todoSectionViewModel.setIsAncillaryOrdersNeedReloading(true);
@ -952,7 +957,7 @@ class _LandingPageState extends State<LandingPage> {
children: [ children: [
LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox( SizedBox(
height: 175.h, height: 180.h,
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: 2, itemCount: 2,

@ -59,26 +59,19 @@ class HabibWalletCard extends StatelessWidget {
// Row( // Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [ // children: [
LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2), Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
// Container( return Row(
// height: 40.h, mainAxisAlignment: MainAxisAlignment.spaceBetween,
// width: 40.h, children: [
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration( LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
// color: AppColors.textColor, Icon(
// borderRadius: 8.h, habibWalletVM.isWalletAmountHidden ? Icons.visibility_off : Icons.visibility,
// ), color: AppColors.textColor,
// child: Padding( size: 24.h,
// padding: EdgeInsets.all(8.h), ).onPress(() => habibWalletVM.toggleWalletAmountVisibility()),
// child: Utils.buildSvgWithAssets( ],
// icon: AppAssets.show_icon, );
// width: 12.h, }),
// height: 12.h,
// fit: BoxFit.contain,
// ),
// ),
// ),
// ],
// ),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -98,9 +91,9 @@ class HabibWalletCard extends StatelessWidget {
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
NumberFormat.decimalPattern() (habibWalletVM.isWalletAmountHidden
.format(habibWalletVM.habibWalletAmount) ? "••••"
.toString() : NumberFormat.decimalPattern().format(habibWalletVM.habibWalletAmount).toString())
.toText32(isBold: true, isEnglishOnly: true) .toText32(isBold: true, isEnglishOnly: true)
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h), .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
], ],

@ -67,26 +67,19 @@ class LakumWalletCard extends StatelessWidget {
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [ // children: [
// LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2), // LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
LocaleKeys.lakumPoints.tr(context: context).toText16(isBold: true, letterSpacing: -0.2), Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
// Container( return Row(
// height: 40.h, mainAxisAlignment: MainAxisAlignment.spaceBetween,
// width: 40.h, children: [
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration( LocaleKeys.lakumPoints.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
// color: AppColors.textColor, Icon(
// borderRadius: 8.h, habibWalletVM.isLakumPointsHidden ? Icons.visibility_off : Icons.visibility,
// ), color: AppColors.textColor,
// child: Padding( size: 24.h,
// padding: EdgeInsets.all(8.h), ).onPress(() => habibWalletVM.toggleLakumPointsVisibility()),
// child: Utils.buildSvgWithAssets( ],
// icon: AppAssets.show_icon, );
// width: 12.h, }),
// height: 12.h,
// fit: BoxFit.contain,
// ),
// ),
// ),
// ],
// ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -98,13 +91,15 @@ class LakumWalletCard extends StatelessWidget {
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
NumberFormat.decimalPattern() (habibWalletVM.isLakumPointsHidden
.format(habibWalletVM.isLakumAccountInfoLoading ? "••••"
? 123 : NumberFormat.decimalPattern()
: habibWalletVM.yahalaAccountNumber == "0" .format(habibWalletVM.isLakumAccountInfoLoading
? 0 ? 123
: (habibWalletVM.lakumAccountInfo?.pointsBalance ?? 0)) : habibWalletVM.yahalaAccountNumber == "0"
.toString() ? 0
: (habibWalletVM.lakumAccountInfo?.pointsBalance ?? 0))
.toString())
.toText32(isBold: true, isEnglishOnly: true) .toText32(isBold: true, isEnglishOnly: true)
.toShimmer2(isShow: habibWalletVM.isLakumAccountInfoLoading, radius: 12.h, width: 80.h, height: 40.h), .toShimmer2(isShow: habibWalletVM.isLakumAccountInfoLoading, radius: 12.h, width: 80.h, height: 40.h),
SizedBox(width: 4.h), SizedBox(width: 4.h),

@ -110,7 +110,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
scheduleMicrotask(() { scheduleMicrotask(() {
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
insuranceViewModel.initInsuranceProvider(); // insuranceViewModel.initInsuranceProvider();
// Load vital signs // Load vital signs
hmgServicesViewModel.getPatientVitalSign(); hmgServicesViewModel.getPatientVitalSign();
@ -495,6 +495,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
medicalFileViewModel.setIsPatientMedicalReportsLoading(true); medicalFileViewModel.setIsPatientMedicalReportsLoading(true);
medicalFileViewModel.getPatientMedicalReportList(); medicalFileViewModel.getPatientMedicalReportList();
} }
if (index == 2 && isExpanded) {
insuranceViewModel.initInsuranceProvider();
}
}, },
items: [ items: [
ExpandableListItem( ExpandableListItem(

@ -260,7 +260,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
runSpacing: 6.h, runSpacing: 6.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(report.appointmentDate), false), labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(report.encounterDate), false),
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: medicalFileVM.isMedicalReportsSortByClinic ? report.projectName! : report.clinicDescription!, labelText: medicalFileVM.isMedicalReportsSortByClinic ? report.projectName! : report.clinicDescription!,

@ -116,8 +116,8 @@ class _SplashScreenState extends State<SplashPage> {
logLevel: LogLevel.Error, // Optional: Set the log level (Verbose, Debug, Info, Warning, Error, None) logLevel: LogLevel.Error, // Optional: Set the log level (Verbose, Debug, Info, Warning, Error, None)
); );
Clarity.initialize(context, config); Clarity.initialize(getIt.get<NavigationService>().navigatorKey.currentContext!, config);
// Set initial app context tags // Set initial app context tags
try { try {
final appState = getIt.get<AppState>(); final appState = getIt.get<AppState>();

@ -76,6 +76,7 @@ class _AppLanguageChangeState extends State<AppLanguageChange> {
myAppointmentsViewModel.getPatientAppointments(true, false); myAppointmentsViewModel.getPatientAppointments(true, false);
habibWalletVM.setIsWalletAmountToBeLoaded(true); habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.setIsLakumInfoToBeLoaded(true);
habibWalletVM.initHabibWalletProvider(); habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); habibWalletVM.getPatientBalanceAmount();
habibWalletVM.getLakumAccountInformation(); habibWalletVM.getLakumAccountInformation();

@ -187,7 +187,7 @@ class MyInAppBrowser extends InAppBrowser {
// if (context != null) GifLoaderDialogUtils.hideDialog(context); // if (context != null) GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err); // AppToast.showErrorToast(message: err);
// }); // });
} else if (paymentMethod == "TAMARA") { } else if (paymentMethod.toLowerCase() == "tamara") {
// LiveCareService service = new LiveCareService(); // LiveCareService service = new LiveCareService();
TamaraRequestModel tamaraRequestModel = new TamaraRequestModel(); TamaraRequestModel tamaraRequestModel = new TamaraRequestModel();

@ -2,8 +2,8 @@ name: hmg_patient_app_new
description: "New HMG Patient App" description: "New HMG Patient App"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
#version: 0.0.45+46 version: 0.0.48+49
version: 0.0.15+2 #version: 0.0.16+1
environment: environment:
sdk: ">=3.6.0 <4.0.0" sdk: ">=3.6.0 <4.0.0"

Loading…
Cancel
Save