Fixes & update to stores VersionID 21.3

pull/324/head
haroon amjad 7 days ago
parent 3590dfc511
commit bcdbfa99ed

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

@ -49,10 +49,10 @@ _incomingCall(Map<String, dynamic> data) async {
log('the value of the _incomingCall remote message is $data');
// Check if there's already a call in progress to prevent duplicates
if (_isCallInProgress && _currentCallId != null) {
log('⚠️ Call already in progress (ID: $_currentCallId), ignoring duplicate notification');
return;
}
// if (_isCallInProgress && _currentCallId != null) {
// log('⚠️ Call already in progress (ID: $_currentCallId), ignoring duplicate notification');
// return;
// }
String roomID = data['session_id'] ?? '';
String callTypeID = data['AppointmentNo'] ?? '';

@ -117,6 +117,13 @@ class EmergencyServicesViewModel extends ChangeNotifier {
bool historyLoading = false;
OrderDislpay currentlyDisplayedOrder = OrderDislpay.ALL;
bool isAdvanceERBalanceNeedToBeLoaded = true;
setIsAdvanceERBalanceNeedToBeLoaded(bool value) {
isAdvanceERBalanceNeedToBeLoaded = value;
notifyListeners();
}
setSelectedRRTProcedure(RRTProceduresResponseModel procedure) {
selectedRRTProcedure = procedure;
notifyListeners();
@ -331,6 +338,8 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}
Future<void> checkPatientERAdvanceBalance({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isAdvanceERBalanceNeedToBeLoaded) return;
final result = await emergencyServicesRepo.checkPatientERAdvanceBalance();
result.fold(
@ -338,6 +347,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
(failure) {
patientHasAdvanceERBalance = false;
isERBookAppointment = true;
isAdvanceERBalanceNeedToBeLoaded = true;
if (onSuccess != null) {
onSuccess(failure.message);
}
@ -347,9 +357,11 @@ class EmergencyServicesViewModel extends ChangeNotifier {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
patientHasAdvanceERBalance = false;
isERBookAppointment = true;
isAdvanceERBalanceNeedToBeLoaded = true;
} else if (apiResponse.messageStatus == 1) {
patientHasAdvanceERBalance = apiResponse.data;
isERBookAppointment = !patientHasAdvanceERBalance;
isAdvanceERBalanceNeedToBeLoaded = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);

@ -325,10 +325,12 @@ class HabibWalletViewModel extends ChangeNotifier {
}
initHabibWalletProvider() {
isWalletAmountLoading = true;
if (isWalletAmountToBeLoaded) {
isWalletAmountLoading = true;
habibWalletAmount = 0;
isLakumAccountInfoLoading = true;
}
isBottomSheetContentLoading = false;
isLakumAccountInfoLoading = true;
habibWalletAmount = 0;
walletRechargeAmount = 0;
selectedRechargeType = 1;
advancePaymentHospitals.clear();
@ -538,6 +540,10 @@ class HabibWalletViewModel extends ChangeNotifier {
}
Future<void> getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isWalletAmountToBeLoaded) {
return;
}
isLakumAccountInfoLoading = true;
lakumAccountInfo = LakumInquiryInformationResponseModel();
notifyListeners();

@ -13,13 +13,13 @@ class TodoSectionViewModel extends ChangeNotifier {
String? notificationsCount = "0";
initializeTodoSectionViewModel() async {
// if (isAncillaryOrdersNeedReloading) {
patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true;
if (isAncillaryOrdersNeedReloading) {
patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true;
isAncillaryDetailsProceduresLoading = true;
notificationsCount = "0";
getPatientOnlineAncillaryOrderList();
// }
}
getPatientDashboard();
}
@ -67,9 +67,9 @@ class TodoSectionViewModel extends ChangeNotifier {
}
Future<void> getPatientOnlineAncillaryOrderList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
// if (!isAncillaryOrdersNeedReloading) {
// return;
// }
if (!isAncillaryOrdersNeedReloading) {
return;
}
patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true;

@ -139,6 +139,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: transactionData.transactionReference!,
appointmentNo: "0",
onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight(
@ -228,6 +229,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: transactionData.transactionReference!,
appointmentNo: "0",
onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight(
@ -510,6 +512,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: transactionData.transactionReference!,
appointmentNo: "0",
onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight(
@ -590,6 +593,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
paymentReference: payfortViewModel.payfortCheckPaymentStatusResponseModel!.fortId!,
appointmentNo: "0",
onSuccess: (val) {
emergencyServicesViewModel.setIsAdvanceERBalanceNeedToBeLoaded(true);
LoaderBottomSheet.hideLoader();
if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight(

@ -136,23 +136,23 @@ class _HabibWalletState extends State<HabibWalletPage> {
},
),
),
SizedBox(width: 8.w),
Flexible(
child: CustomButton(
height: 40.h,
icon: AppAssets.refundIcon,
iconSize: 24.w,
backgroundColor: AppColors.successColor,
textColor: Colors.white,
text: LocaleKeys.withdraw.tr(context: context),
borderWidth: 0.w,
fontWeight: FontWeight.w600,
borderColor: Colors.transparent,
padding: EdgeInsets.fromLTRB(4, 0, 12, 0),
fontSize: 14.f,
onPressed: () => Navigator.of(context).push(CustomPageRoute(page: WithdrawRequestCreatePage())),
),
),
// SizedBox(width: 8.w),
// Flexible(
// child: CustomButton(
// height: 40.h,
// icon: AppAssets.refundIcon,
// iconSize: 24.w,
// backgroundColor: AppColors.successColor,
// textColor: Colors.white,
// text: LocaleKeys.withdraw.tr(context: context),
// borderWidth: 0.w,
// fontWeight: FontWeight.w600,
// borderColor: Colors.transparent,
// padding: EdgeInsets.fromLTRB(4, 0, 12, 0),
// fontSize: 14.f,
// onPressed: () => Navigator.of(context).push(CustomPageRoute(page: WithdrawRequestCreatePage())),
// ),
// ),
],
),
SizedBox(height: 24.h),

@ -127,6 +127,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () {
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
@ -228,6 +229,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () {
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
@ -411,8 +413,9 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () {
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();
}, isFullScreen: false, isCloseButtonVisible: true, isAutoDismiss: true);
@ -503,6 +506,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(getIt.get<NavigationService>().navigatorKey.currentContext!, child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () {
habibWalletVM.setIsWalletAmountToBeLoaded(true);
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).pop();

@ -213,6 +213,7 @@ class _LandingPageState extends State<LandingPage> {
habibWalletVM.getLakumAccountInformation();
// Refresh Ancillary Orders
todoSectionViewModel.setIsAncillaryOrdersNeedReloading(true);
todoSectionViewModel.initializeTodoSectionViewModel();
// Refresh Immediate LiveCare Data

@ -212,28 +212,28 @@ class InvoiceListCard extends StatelessWidget {
iconSize: 14.h,
),
),
if (getInvoicesListResponseModel.isAllowRefund == true) ...[
SizedBox(width: 8.w),
Expanded(
child: CustomButton(
text: LocaleKeys.requestRefund.tr(context: context),
onPressed: () {
_handleRefundInvoiceTap(context);
},
icon: AppAssets.refundIcon,
iconColor: AppColors.caloriesCalculatorColor,
backgroundColor: AppColors.blueColor.withValues(alpha: 0.14),
borderColor: AppColors.primaryRedColor.withValues(alpha: 0.01),
textColor: AppColors.caloriesCalculatorColor,
fontSize: 14.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
iconSize: 14.h,
),
),
]
// if (getInvoicesListResponseModel.isAllowRefund == true) ...[
// SizedBox(width: 8.w),
// Expanded(
// child: CustomButton(
// text: LocaleKeys.requestRefund.tr(context: context),
// onPressed: () {
// _handleRefundInvoiceTap(context);
// },
// icon: AppAssets.refundIcon,
// iconColor: AppColors.caloriesCalculatorColor,
// backgroundColor: AppColors.blueColor.withValues(alpha: 0.14),
// borderColor: AppColors.primaryRedColor.withValues(alpha: 0.01),
// textColor: AppColors.caloriesCalculatorColor,
// fontSize: 14.f,
// fontWeight: FontWeight.w600,
// borderRadius: 12.r,
// padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: 40.h,
// iconSize: 14.h,
// ),
// ),
// ]
],
),
],

@ -1,5 +1,7 @@
import 'dart:async';
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_callkit_incoming/entities/call_event.dart';
import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart';
@ -55,7 +57,13 @@ class _SplashScreenState extends State<SplashPage> {
await notificationService.initialize(onNotificationClick: (payload) {
// Handle notification click here
});
ZoomService().initializeZoomSDK();
// if (!kDebugMode) {
// _initializeClarity();
// }
if (isAppOpenedFromCall) {
navigateToTeleConsult();
} else {
@ -76,6 +84,15 @@ class _SplashScreenState extends State<SplashPage> {
// zoom.initSdk(initConfig);
}
void _initializeClarity() {
final config = ClarityConfig(
projectId: "x0qgorlez4", // You can find it on the Settings page of Clarity dashboard.
logLevel: LogLevel.Verbose, // Optional: Set the log level (Verbose, Debug, Info, Warning, Error, None)
);
Clarity.initialize(context, config);
}
navigateToTeleConsult() async {
String roomID = await Utils.getStringFromPrefs(CacheConst.zoomRoomID);
String callTypeID = await Utils.getStringFromPrefs(CacheConst.callTypeID);

@ -105,6 +105,7 @@ dependencies:
in_app_review: ^2.0.11
flutter_paytabs_bridge: ^2.7.13
clarity_flutter: 1.9.0
dev_dependencies:
flutter_test:

Loading…
Cancel
Save