From 9ead2cacaf20c8d9a624a8346b1fb26cef7d4ccc Mon Sep 17 00:00:00 2001 From: Haroon Amjad <> Date: Mon, 11 May 2026 20:00:44 +0300 Subject: [PATCH 1/2] updates & fixes --- assets/images/svg/expired_icon.svg | 5 ++ lib/core/app_assets.dart | 1 + .../home/lakum_wallet_details.dart | 45 ++++++----- lib/presentation/home/landing_page.dart | 80 ++++++------------- .../home/widgets/lakum_wallet_card.dart | 2 +- 5 files changed, 59 insertions(+), 74 deletions(-) create mode 100644 assets/images/svg/expired_icon.svg diff --git a/assets/images/svg/expired_icon.svg b/assets/images/svg/expired_icon.svg new file mode 100644 index 00000000..490cc412 --- /dev/null +++ b/assets/images/svg/expired_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart index f11de07f..57f91017 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -379,6 +379,7 @@ class AppAssets { static const String online_checkin_icon = '$svgBasePath/online_checkin_icon.svg'; static const String hmg_pharmacy_logo = '$svgBasePath/hmg_pharmacy_logo.svg'; static const String redeem_icon = '$svgBasePath/redeem_icon.svg'; + static const String expired_icon = '$svgBasePath/expired_icon.svg'; //Health Calculators static const String bodyfatcalc = '$svgBasePath/bfc.svg'; diff --git a/lib/presentation/home/lakum_wallet_details.dart b/lib/presentation/home/lakum_wallet_details.dart index 98236028..96cd2122 100644 --- a/lib/presentation/home/lakum_wallet_details.dart +++ b/lib/presentation/home/lakum_wallet_details.dart @@ -195,6 +195,15 @@ class LakumWalletDetails extends StatelessWidget { Icons.arrow_circle_down, ), ), + SizedBox(width: 8.w), + Expanded( + child: _buildStatChip( + LocaleKeys.expired.tr(), + accountInfo.expiredPoints?.toString() ?? "0", + Icons.calendar_month, + isSvg: true + ), + ), ], ), ], @@ -203,7 +212,7 @@ class LakumWalletDetails extends StatelessWidget { ); } - Widget _buildStatChip(String label, String value, IconData icon) { + Widget _buildStatChip(String label, String value, IconData icon, {bool isSvg = false}) { return Container( padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h), decoration: BoxDecoration( @@ -213,7 +222,7 @@ class LakumWalletDetails extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(icon, color: Colors.white, size: 16.f), + isSvg ? Utils.buildSvgWithAssets(icon: AppAssets.expired_icon, width: 15.w, height: 15.h, applyThemeColor: false) : Icon(icon, color: Colors.white, size: 16.f), SizedBox(width: 6.w), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -232,10 +241,10 @@ class LakumWalletDetails extends StatelessWidget { return CustomButton( height: 46.h, icon: AppAssets.redeem_icon, - iconColor: AppColors.whiteColor, + iconColor: AppColors.textColor, iconSize: 24.h, backgroundColor: AppColors.habibPharmacyColor, - textColor: AppColors.whiteColor, + textColor: AppColors.textColor, text: LocaleKeys.redeem.tr(context: context), borderWidth: 0.w, fontWeight: FontWeight.w600, @@ -318,20 +327,20 @@ class LakumWalletDetails extends StatelessWidget { return Row( children: [ // Transaction Icon - Container( - width: 44.w, - height: 44.h, - decoration: BoxDecoration( - color: transactionColor.withAlpha(25), - borderRadius: BorderRadius.circular(12.r), - ), - child: Icon( - isGained ? Icons.add_rounded : Icons.remove_rounded, - color: transactionColor, - size: 24.f, - ), - ), - SizedBox(width: 12.w), + // Container( + // width: 44.w, + // height: 44.h, + // decoration: BoxDecoration( + // color: transactionColor.withAlpha(25), + // borderRadius: BorderRadius.circular(12.r), + // ), + // child: Icon( + // isGained ? Icons.add_rounded : Icons.remove_rounded, + // color: transactionColor, + // size: 24.f, + // ), + // ), + // SizedBox(width: 12.w), // Transaction Details Expanded( diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index b6d32f72..35b7c992 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -148,11 +148,14 @@ class _LandingPageState extends State { notificationsViewModel.initNotificationsViewModel(); insuranceViewModel.initInsuranceProvider(); - if(appState.isRatedVisible) { - appointmentRatingViewModel.getLastRatingAppointment(onSuccess: (response) { - if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) { - appointmentRatingViewModel.getAppointmentDetails(appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!, appointmentRatingViewModel.appointmentRatedList.last.projectID!, - onSuccess: ((response) { + if (!appState.isRatedVisible) { + appointmentRatingViewModel.getLastRatingAppointment( + onSuccess: (response) { + if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) { + appointmentRatingViewModel.getAppointmentDetails( + appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!, + appointmentRatingViewModel.appointmentRatedList.last.projectID!, + onSuccess: ((response) { appointmentRatingViewModel.setClinicOrDoctor(false); appointmentRatingViewModel.setTitle(LocaleKeys.rateDoctor.tr(context: context)); appointmentRatingViewModel.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context)); @@ -212,10 +215,7 @@ class _LandingPageState extends State { controller: _scrollController, physics: const AlwaysScrollableScrollPhysics(), padding: EdgeInsets.only( - top: (appState.isAuthenticated && - !insuranceVM.isInsuranceLoading && - insuranceVM.isInsuranceExpired && - insuranceVM.isInsuranceExpiryBannerShown) + top: (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown) ? (MediaQuery.paddingOf(context).top + 70.h) : kToolbarHeight + 0.h, bottom: 24), @@ -338,9 +338,7 @@ class _LandingPageState extends State { SizedBox( width: 24.w, ), - Utils.buildSvgWithAssets( - icon: appState.isArabic() ? AppAssets.enLangIcon : AppAssets.arLangIcon, height: 24.h, width: 24.h) - .onPress(() { + Utils.buildSvgWithAssets(icon: appState.isArabic() ? AppAssets.enLangIcon : AppAssets.arLangIcon, height: 24.h, width: 24.h).onPress(() { context.setLocale(appState.isArabic() ? Locale('en', 'US') : Locale('ar', 'SA')); }) ]) @@ -484,9 +482,7 @@ class _LandingPageState extends State { ), ) : SizedBox( - height: 255.h + - 20 + - 30, // itemHeight + shadow padding (10 top + 10 bottom) + pagination dots space + height: 255.h + 20 + 30, // itemHeight + shadow padding (10 top + 10 bottom) + pagination dots space child: Builder( builder: (context) { final int swiperItemCount = myAppointmentsVM.isMyAppointmentsLoading @@ -531,8 +527,7 @@ class _LandingPageState extends State { ? _buildLiveCareRequestCard().paddingSymmetrical(24.h, 16.h) : Container( width: double.infinity, - decoration: RoundedRectangleBorder() - .toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), child: Padding( padding: EdgeInsets.all(16.h), child: Column( @@ -632,9 +627,7 @@ class _LandingPageState extends State { LocaleKeys.quickLinks.tr(context: context).toText16(isBold: true), Row( children: [ - LocaleKeys.viewMedicalFileLandingPage - .tr(context: context) - .toText14(color: AppColors.primaryRedColor, isBold: true), + LocaleKeys.viewMedicalFileLandingPage.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true), SizedBox(width: 2.h), Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h), ], @@ -662,10 +655,7 @@ class _LandingPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.pendingAncillaryOrders - .tr(context: context) - .toText14(color: AppColors.eReferralCardColor, isBold: true) - .paddingSymmetrical(24.h, 0.h), + LocaleKeys.pendingAncillaryOrders.tr(context: context).toText14(color: AppColors.eReferralCardColor, isBold: true).paddingSymmetrical(24.h, 0.h), CustomButton( text: LocaleKeys.view.tr(context: context), onPressed: () { @@ -696,10 +686,7 @@ class _LandingPageState extends State { trackColor: Color(0xffD9D9D9), trackBorderColor: Colors.transparent, trackRadius: Radius.circular(10.0), - padding: EdgeInsets.only( - top: 92.h + 32.h, - left: MediaQuery.sizeOf(context).width / 2.5 - 10, - right: MediaQuery.sizeOf(context).width / 2.5 - 10), + padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2.5 - 10, right: MediaQuery.sizeOf(context).width / 2.5 - 10), child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: LandingPageData().getLoggedInServiceCardsList.length, @@ -753,10 +740,7 @@ class _LandingPageState extends State { trackColor: Color(0xffD9D9D9), trackBorderColor: Colors.transparent, trackRadius: Radius.circular(10.0), - padding: EdgeInsets.only( - top: 92.h + 32.h, - left: MediaQuery.sizeOf(context).width / 2.5 - 10, - right: MediaQuery.sizeOf(context).width / 2.5 - 10), + padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2.5 - 10, right: MediaQuery.sizeOf(context).width / 2.5 - 10), child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: LandingPageData.getNotLoggedInServiceCardsList.length, @@ -879,10 +863,7 @@ class _LandingPageState extends State { ), ), ), - (appState.isAuthenticated && - !insuranceVM.isInsuranceLoading && - insuranceVM.isInsuranceExpired && - insuranceVM.isInsuranceExpiryBannerShown) + (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown) ? Container( height: MediaQuery.paddingOf(context).top + 50.h, decoration: ShapeDecoration( @@ -899,24 +880,17 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.insuranceExpiredOrInactive - .tr(context: context) - .toText14(color: AppColors.primaryRedColor, isBold: true) - .paddingSymmetrical(0.h, 0.h), + LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(0.h, 0.h), Row( children: [ CustomButton( text: LocaleKeys.updateInsurance.tr(context: context), onPressed: () { insuranceVM.setIsInsuranceUpdateDetailsLoading(true); - insuranceVM.getPatientInsuranceDetailsForUpdate(appState.getAuthenticatedUser()!.patientId.toString(), - appState.getAuthenticatedUser()!.patientIdentificationNo.toString()); + insuranceVM.getPatientInsuranceDetailsForUpdate( + appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString()); showCommonBottomSheetWithoutHeight(context, - child: PatientInsuranceCardUpdateCard(), - callBackFunc: () {}, - title: "", - isCloseButtonVisible: false, - isFullScreen: false); + child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false); }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.secondaryLightRedBorderColor, @@ -1066,8 +1040,7 @@ class _LandingPageState extends State { SizedBox(height: 6.h), _buildServingNowSection(), SizedBox(height: 5.h), - _buildQueueActionButton(currentStatus, currentQueue.roomNo ?? "") - .toShimmer2(isShow: myAppointmentsViewModel.patientQueueDetailsList.isEmpty), + _buildQueueActionButton(currentStatus, currentQueue.roomNo ?? "").toShimmer2(isShow: myAppointmentsViewModel.patientQueueDetailsList.isEmpty), ], ), ), @@ -1096,8 +1069,7 @@ class _LandingPageState extends State { hasShadow: false, ), padding: EdgeInsets.all(6.h), - child: Lottie.asset(AppAnimations.hourGlass, - repeat: true, reverse: false, frameRate: FrameRate(60), width: 40.h, height: 40.h, fit: BoxFit.fill)), + child: Lottie.asset(AppAnimations.hourGlass, repeat: true, reverse: false, frameRate: FrameRate(60), width: 40.h, height: 40.h, fit: BoxFit.fill)), ], ); } @@ -1276,8 +1248,7 @@ class _LandingPageState extends State { hasShadow: false, ), padding: EdgeInsets.all(6.h), - child: Lottie.asset(AppAnimations.hourGlass, - repeat: true, reverse: false, frameRate: FrameRate(60), width: 40.h, height: 40.h, fit: BoxFit.fill)), + child: Lottie.asset(AppAnimations.hourGlass, repeat: true, reverse: false, frameRate: FrameRate(60), width: 40.h, height: 40.h, fit: BoxFit.fill)), // Utils.buildSvgWithAssets( // icon: AppAssets.waiting_icon, // width: 24.h, @@ -1325,8 +1296,7 @@ class _LandingPageState extends State { // Appointment Card Wrapper (reusable) Widget _buildAppointmentCardWrapper(appointment) { return Container( - decoration: - RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true, hasDenseShadow: true), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true, hasDenseShadow: true), child: AppointmentCard( patientAppointmentHistoryResponseModel: appointment, myAppointmentsViewModel: myAppointmentsViewModel, diff --git a/lib/presentation/home/widgets/lakum_wallet_card.dart b/lib/presentation/home/widgets/lakum_wallet_card.dart index 599dc2e8..0a3bf8c0 100644 --- a/lib/presentation/home/widgets/lakum_wallet_card.dart +++ b/lib/presentation/home/widgets/lakum_wallet_card.dart @@ -179,7 +179,7 @@ class LakumWalletCard extends StatelessWidget { ).paddingSymmetrical(0.h, 0.h).onPress(() { Navigator.of(context).push( CustomPageRoute( - page: HabibWalletPage(), + page: LakumWalletDetails(), ), ); }), From 71562f6441e533141a5ab85d145a50e95f57f2cc Mon Sep 17 00:00:00 2001 From: Haroon Amjad <> Date: Mon, 11 May 2026 20:31:55 +0300 Subject: [PATCH 2/2] updates --- .../contact_us/live_chat_page.dart | 2 +- .../my_invoices/my_invoices_list.dart | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/presentation/contact_us/live_chat_page.dart b/lib/presentation/contact_us/live_chat_page.dart index 0fd14b6c..107f5ba4 100644 --- a/lib/presentation/contact_us/live_chat_page.dart +++ b/lib/presentation/contact_us/live_chat_page.dart @@ -258,7 +258,7 @@ class LiveChatPage extends StatelessWidget { workGroup: workGroup, onSuccess: (response) { debugPrint("Chat Request ID received: ${contactUsVM.chatRequestID}"); - chatURL = "https://chat.hmg.com/Index.aspx?RequestedId=${contactUsVM.chatRequestID}"; + chatURL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId=${contactUsVM.chatRequestID}"; debugPrint("Chat URL: $chatURL"); }, onError: (error) { diff --git a/lib/presentation/my_invoices/my_invoices_list.dart b/lib/presentation/my_invoices/my_invoices_list.dart index 2dbbaf12..addebea2 100644 --- a/lib/presentation/my_invoices/my_invoices_list.dart +++ b/lib/presentation/my_invoices/my_invoices_list.dart @@ -120,23 +120,23 @@ class _MyInvoicesListState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: 16.h), - CustomTabBar( - activeTextColor: Color(0xffED1C2B), - activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), - initialIndex: 0, - tabs: [ - CustomTabBarModel(null, LocaleKeys.visitsOrders.tr(context: context)), - CustomTabBarModel(null, LocaleKeys.pharmacy.tr(context: context)), - ], - onTabChange: (index) { - myInvoicesVM.onTabChanged(index); - if (index == 1 && myInvoicesVM.allPharmacyInvoicesList.isEmpty) { - // Load pharmacy invoices when pharmacy tab is selected and list is empty - myInvoicesVM.getAllPharmacyInvoices(); - } - }, - ).paddingSymmetrical(24.h, 0.h), + // SizedBox(height: 16.h), + // CustomTabBar( + // activeTextColor: Color(0xffED1C2B), + // activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), + // initialIndex: 0, + // tabs: [ + // CustomTabBarModel(null, LocaleKeys.visitsOrders.tr(context: context)), + // CustomTabBarModel(null, LocaleKeys.pharmacy.tr(context: context)), + // ], + // onTabChange: (index) { + // myInvoicesVM.onTabChanged(index); + // if (index == 1 && myInvoicesVM.allPharmacyInvoicesList.isEmpty) { + // // Load pharmacy invoices when pharmacy tab is selected and list is empty + // myInvoicesVM.getAllPharmacyInvoices(); + // } + // }, + // ).paddingSymmetrical(24.h, 0.h), myInvoicesVM.selectedTabIndex == 0 ? Column( children: [ SizedBox(height: 16.h),