haroon_dev #376

Merged
Haroon6138 merged 4 commits from haroon_dev into master 3 weeks ago

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

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

@ -30,7 +30,36 @@ class HabibWalletViewModel extends ChangeNotifier {
num habibWalletAmount = 0;
num walletRechargeAmount = 0;
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;
@ -70,6 +99,8 @@ class HabibWalletViewModel extends ChangeNotifier {
bool isLakumAccountInfoLoading = false;
LakumInquiryInformationResponseModel? lakumAccountInfo;
// Get all flattened transactions sorted by date descending
List<PointsDetails> getAllLakumTransactions() {
if (lakumAccountInfo?.gainedPointsAmountPerYear == null) {
@ -328,6 +359,8 @@ class HabibWalletViewModel extends ChangeNotifier {
if (isWalletAmountToBeLoaded) {
isWalletAmountLoading = true;
habibWalletAmount = 0;
}
if (isLakumInfoToBeLoaded) {
isLakumAccountInfoLoading = true;
yahalaAccountNumber = "";
}
@ -399,6 +432,11 @@ class HabibWalletViewModel extends ChangeNotifier {
notifyListeners();
}
setIsLakumInfoToBeLoaded(bool value) {
isLakumInfoToBeLoaded = value;
notifyListeners();
}
String getSelectedRechargeTypeValue() {
switch (selectedRechargeType) {
case 1:
@ -437,6 +475,7 @@ class HabibWalletViewModel extends ChangeNotifier {
isWalletAmountLoading = false;
isWalletAmountToBeLoaded = false;
isWalletAmountFetched = true;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@ -540,7 +579,7 @@ class HabibWalletViewModel extends ChangeNotifier {
}
Future<void> getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isWalletAmountToBeLoaded) {
if (!isLakumInfoToBeLoaded) {
return;
}
@ -555,6 +594,8 @@ class HabibWalletViewModel extends ChangeNotifier {
(failure) async {
yahalaAccountNumber = "0";
isLakumAccountInfoLoading = false;
isLakumInfoFetched = true;
isLakumInfoToBeLoaded = false;
notifyListeners(); // 675534
},
(apiResponse) async {
@ -581,6 +622,8 @@ class HabibWalletViewModel extends ChangeNotifier {
);
}
isLakumAccountInfoLoading = false;
isLakumInfoFetched = true;
isLakumInfoToBeLoaded = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);

@ -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';
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();
@ -35,8 +35,10 @@ class InsuranceRepoImp implements InsuranceRepo {
InsuranceRepoImp({required this.loggerService, required this.apiClient});
@override
Future<Either<Failure, GenericApiModel<List<PatientInsuranceDetailsResponseModel>>>> getPatientInsuranceDetails() async {
Map<String, dynamic> mapDevice = {};
Future<Either<Failure, GenericApiModel<List<PatientInsuranceDetailsResponseModel>>>> getPatientInsuranceDetails({bool isFromHomePage = false}) async {
Map<String, dynamic> mapDevice = {
"IsFromHomePage": isFromHomePage
};
try {
GenericApiModel<List<PatientInsuranceDetailsResponseModel>>? apiResponse;

@ -32,11 +32,11 @@ class InsuranceViewModel extends ChangeNotifier {
InsuranceViewModel({required this.insuranceRepo, required this.errorHandlerService});
initInsuranceProvider() {
initInsuranceProvider({bool isFromHomePage = false}) {
if (isInsuranceDataToBeLoaded) {
patientInsuranceList.clear();
isInsuranceLoading = true;
getPatientInsuranceDetails();
getPatientInsuranceDetails(isFromHomePage: isFromHomePage);
}
patientInsuranceCardHistoryList.clear();
isInsuranceHistoryLoading = true;
@ -76,12 +76,12 @@ class InsuranceViewModel extends ChangeNotifier {
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) {
return;
}
final result = await insuranceRepo.getPatientInsuranceDetails();
final result = await insuranceRepo.getPatientInsuranceDetails(isFromHomePage: isFromHomePage);
result.fold(
// (failure) async => await errorHandlerService.handleError(failure: failure),

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save