pull/199/head
haroon amjad 2 months ago
parent 55b8bc162c
commit 3d877ed28d

@ -435,7 +435,6 @@
"serviceInformation": "معلومات الخدمة", "serviceInformation": "معلومات الخدمة",
"homeHealthCare": "الرعاية الصحية المنزلية", "homeHealthCare": "الرعاية الصحية المنزلية",
"noAppointmentAvailable": "لا توجد مواعيد متاحة", "noAppointmentAvailable": "لا توجد مواعيد متاحة",
"homeHealthCareText": "تقدم هذه الخدمة مجموعة من خدمات الرعاية الصحية المنزلية، والمتابعة المستمرة والشاملة في أماكن إقامتهم لأولئك الذين لا يمكنهم الوصول إلى المرافق الصحية، مثل (تحليلات المختبر - الأشعة - التطعيمات - العلاج الطبيعي)، إلخ.",
"loginRegister": "تسجيل الدخول / التسجيل", "loginRegister": "تسجيل الدخول / التسجيل",
"orderLog": "سجل الطلب", "orderLog": "سجل الطلب",
"infoLab": "تتيح لك هذه الخدمة عرض نتائج جميع الفحوصات المخبرية التي أجريت في مجموعة الحبيب الطبية بالإضافة إلى إرسال التقرير عبر البريد الإلكتروني.", "infoLab": "تتيح لك هذه الخدمة عرض نتائج جميع الفحوصات المخبرية التي أجريت في مجموعة الحبيب الطبية بالإضافة إلى إرسال التقرير عبر البريد الإلكتروني.",
@ -1585,5 +1584,6 @@
"hmgPolicies": "سياسات مجموعة الحبيب الطبية", "hmgPolicies": "سياسات مجموعة الحبيب الطبية",
"darkMode": "المظهر الداكن", "darkMode": "المظهر الداكن",
"generateAiAnalysisResult": "قم بإجراء تحليل لهذا المختبر AI", "generateAiAnalysisResult": "قم بإجراء تحليل لهذا المختبر AI",
"ratings": "التقييمات" "ratings": "التقييمات",
"hmgPharmacyText": "صيدلية الحبيب، المتجر الصيدلاني الإلكتروني المتكامل الذي تقدمه لكم مجموعة خدمات الدكتور سليمان الحبيب الطبية."
} }

@ -1578,5 +1578,6 @@
"hmgPolicies": "HMG Policies", "hmgPolicies": "HMG Policies",
"darkMode": "Dark Mode", "darkMode": "Dark Mode",
"generateAiAnalysisResult": "Generate AI analysis for this result", "generateAiAnalysisResult": "Generate AI analysis for this result",
"ratings": "Ratings" "ratings": "Ratings",
"hmgPharmacyText": "Al Habib Pharmacy, the complete online Pharmaceutical store brought to you by Dr. Sulaiman Al Habib Medical Services Group."
} }

@ -49,6 +49,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
bool isDoctorSearchByNameStarted = false; bool isDoctorSearchByNameStarted = false;
bool isAppointmentNearestGateLoading = false; bool isAppointmentNearestGateLoading = false;
bool isLiveCareSelectedFromHomePage = false;
bool isLiveCareSchedule = false; bool isLiveCareSchedule = false;
bool isGetDocForHealthCal = false; bool isGetDocForHealthCal = false;
bool showSortFilterButtons = false; bool showSortFilterButtons = false;
@ -318,6 +319,11 @@ class BookAppointmentsViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
setIsLiveCareSelectedFromHomePage(bool isLiveCareSelectedFromHomePage) {
this.isLiveCareSelectedFromHomePage = isLiveCareSelectedFromHomePage;
notifyListeners();
}
setIsWaitingAppointmentSelected(bool isWaitingAppointmentSelected) { setIsWaitingAppointmentSelected(bool isWaitingAppointmentSelected) {
this.isWaitingAppointmentSelected = isWaitingAppointmentSelected; this.isWaitingAppointmentSelected = isWaitingAppointmentSelected;
notifyListeners(); notifyListeners();
@ -423,9 +429,25 @@ class BookAppointmentsViewModel extends ChangeNotifier {
calculationID = null; calculationID = null;
isGetDocForHealthCal = false; isGetDocForHealthCal = false;
selectedTabIndex = index; selectedTabIndex = index;
checkLiveCareSymptomCheckerStatus();
notifyListeners(); notifyListeners();
} }
bool checkLiveCareSymptomCheckerStatus() {
bool isAllowed = false;
if (selectedTabIndex == 1) {
if (_appState.isAuthenticated) {
isAllowed = true;
} else {
isAllowed = false;
}
} else {
isAllowed = true;
}
return isAllowed;
}
/// this function will decide which clinic api to be called /// this function will decide which clinic api to be called
/// either api for region flow or the select clinic api /// either api for region flow or the select clinic api
Future<void> getClinics() async { Future<void> getClinics() async {

@ -436,7 +436,6 @@ abstract class LocaleKeys {
static const serviceInformation = 'serviceInformation'; static const serviceInformation = 'serviceInformation';
static const homeHealthCare = 'homeHealthCare'; static const homeHealthCare = 'homeHealthCare';
static const noAppointmentAvailable = 'noAppointmentAvailable'; static const noAppointmentAvailable = 'noAppointmentAvailable';
static const homeHealthCareText = 'homeHealthCareText';
static const loginRegister = 'loginRegister'; static const loginRegister = 'loginRegister';
static const orderLog = 'orderLog'; static const orderLog = 'orderLog';
static const infoLab = 'infoLab'; static const infoLab = 'infoLab';
@ -746,6 +745,7 @@ abstract class LocaleKeys {
static const infoTodo = 'infoTodo'; static const infoTodo = 'infoTodo';
static const familyInfo = 'familyInfo'; static const familyInfo = 'familyInfo';
static const rrtdDetails = 'rrtdDetails'; static const rrtdDetails = 'rrtdDetails';
static const homeHealthCareText = 'homeHealthCareText';
static const onlineCheckInAgreement = 'onlineCheckInAgreement'; static const onlineCheckInAgreement = 'onlineCheckInAgreement';
static const infoEreferral = 'infoEreferral'; static const infoEreferral = 'infoEreferral';
static const erConsultation = 'erConsultation'; static const erConsultation = 'erConsultation';
@ -1579,5 +1579,6 @@ abstract class LocaleKeys {
static const darkMode = 'darkMode'; static const darkMode = 'darkMode';
static const generateAiAnalysisResult = 'generateAiAnalysisResult'; static const generateAiAnalysisResult = 'generateAiAnalysisResult';
static const ratings = 'ratings'; static const ratings = 'ratings';
static const hmgPharmacyText = 'hmgPharmacyText';
} }

@ -69,12 +69,12 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
@override @override
void initState() { void initState() {
scheduleMicrotask(() async { scheduleMicrotask(() async {
CalenderUtilsNew calendarUtils = await CalenderUtilsNew.instance; if (!AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)) {
var doesExist = await calendarUtils.checkIfEventExist("${widget.patientAppointmentHistoryResponseModel.appointmentNo}"); CalenderUtilsNew calendarUtils = await CalenderUtilsNew.instance;
myAppointmentsViewModel.setAppointmentReminder(doesExist, widget.patientAppointmentHistoryResponseModel); var doesExist = await calendarUtils.checkIfEventExist("${widget.patientAppointmentHistoryResponseModel.appointmentNo}");
setState((){ myAppointmentsViewModel.setAppointmentReminder(doesExist, widget.patientAppointmentHistoryResponseModel);
setState(() {});
}); }
}); });
super.initState(); super.initState();

@ -424,7 +424,9 @@ class AppointmentCard extends StatelessWidget {
), ),
); );
} else { } else {
bookAppointmentsViewModel.getAppointmentNearestGate(projectID: patientAppointmentHistoryResponseModel.projectID, clinicID: patientAppointmentHistoryResponseModel.clinicID); if (!AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
bookAppointmentsViewModel.getAppointmentNearestGate(projectID: patientAppointmentHistoryResponseModel.projectID, clinicID: patientAppointmentHistoryResponseModel.clinicID);
}
Navigator.of(context) Navigator.of(context)
.push( .push(
CustomPageRoute( CustomPageRoute(

@ -61,7 +61,13 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
immediateLiveCareViewModel.initImmediateLiveCare(); immediateLiveCareViewModel.initImmediateLiveCare();
}); });
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
showUnKnownClinicBottomSheet(); if (bookAppointmentsViewModel.selectedTabIndex == 1) {
if (appState.isAuthenticated) {
showUnKnownClinicBottomSheet();
}
} else {
showUnKnownClinicBottomSheet();
}
}); });
super.initState(); super.initState();
} }
@ -203,7 +209,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
), ),
), ),
), ),
_buildSymptomsBottomCard(), Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
return _buildSymptomsBottomCard();
}),
], ],
), ),
); );
@ -414,12 +422,13 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
} }
Widget _buildSymptomsBottomCard() { Widget _buildSymptomsBottomCard() {
return Container( return bookAppointmentsViewModel.checkLiveCareSymptomCheckerStatus()
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r), ? Container(
child: Row( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
children: [ child: Row(
Expanded( children: [
child: Column( Expanded(
child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -442,7 +451,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
) )
], ],
).paddingAll(24.w), ).paddingAll(24.w),
); )
: SizedBox.shrink();
} }
void openRegionListBottomSheet(BuildContext context, RegionBottomSheetType type) { void openRegionListBottomSheet(BuildContext context, RegionBottomSheetType type) {

@ -165,8 +165,8 @@ class LandingPageData {
serviceName: "home_health_care", serviceName: "home_health_care",
icon: AppAssets.homeBottom, icon: AppAssets.homeBottom,
title: LocaleKeys.homeHealthCare, title: LocaleKeys.homeHealthCare,
subtitle: LocaleKeys.liveCareServiceDesc, subtitle: LocaleKeys.homeHealthCareText,
largeCardIcon: AppAssets.homeHealthCareService, largeCardIcon: AppAssets.homeHealthCareService,
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
isBold: false, isBold: false,
@ -175,8 +175,8 @@ class LandingPageData {
serviceName: "pharmacy", serviceName: "pharmacy",
icon: AppAssets.pharmacy_icon, //359846 icon: AppAssets.pharmacy_icon, //359846
title: LocaleKeys.hmgPharmacy, title: LocaleKeys.hmgPharmacy,
subtitle: LocaleKeys.liveCareServiceDesc, subtitle: LocaleKeys.hmgPharmacyText,
largeCardIcon: AppAssets.pharmacyService, largeCardIcon: AppAssets.pharmacyService,
backgroundColor: AppColors.pharmacyBGColor, backgroundColor: AppColors.pharmacyBGColor,
iconColor: null, iconColor: null,
isBold: true, isBold: true,

@ -258,7 +258,7 @@ class _LandingPageState extends State<LandingPage> {
); );
}), }),
!appState.isAuthenticated !appState.isAuthenticated
? Utils.buildSvgWithAssets(icon: AppAssets.changeLanguageHomePageIcon, 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')); context.setLocale(appState.isArabic() ? Locale('en', 'US') : Locale('ar', 'SA'));
}) })
: SizedBox.shrink() : SizedBox.shrink()

@ -229,10 +229,10 @@ class FadedLargeServiceCard extends StatelessWidget {
], ],
), ),
SizedBox(height: 10.h), SizedBox(height: 10.h),
serviceCardData.subtitle.tr(context: context).toText14(weight: FontWeight.w500, color: AppColors.blackBgColor, letterSpacing: 0), serviceCardData.subtitle.tr(context: context).toText14(weight: FontWeight.w500, color: AppColors.blackBgColor, letterSpacing: 0, maxlines: 2),
SizedBox(height: 12.h), SizedBox(height: 12.h),
CustomButton( CustomButton(
text: serviceCardData.isBold ? "Visit Pharmacy Online".needTranslation : LocaleKeys.bookNow.tr(context: context), text: serviceCardData.isBold ? LocaleKeys.visitPharmacyOnline.tr(context: context) : LocaleKeys.bookNow.tr(context: context),
onPressed: () { onPressed: () {
handleOnTap(); handleOnTap();
}, },
@ -255,6 +255,7 @@ class FadedLargeServiceCard extends StatelessWidget {
case "livecare": case "livecare":
{ {
getIt.get<BookAppointmentsViewModel>().onTabChanged(1); getIt.get<BookAppointmentsViewModel>().onTabChanged(1);
getIt.get<BookAppointmentsViewModel>().setIsLiveCareSelectedFromHomePage(true);
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).push( Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).push(
CustomPageRoute( CustomPageRoute(
page: BookAppointmentPage(), page: BookAppointmentPage(),

@ -8,6 +8,7 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_all_orders_resp_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_all_orders_resp_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_services_resp_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_services_resp_model.dart';
@ -33,11 +34,13 @@ class HhcProceduresPage extends StatefulWidget {
} }
class _HhcProceduresPageState extends State<HhcProceduresPage> { class _HhcProceduresPageState extends State<HhcProceduresPage> {
late AppState appState;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
final HmgServicesViewModel hmgServicesViewModel = context.read<HmgServicesViewModel>(); final HmgServicesViewModel hmgServicesViewModel = context.read<HmgServicesViewModel>();
final AppState appState = getIt.get<AppState>();
scheduleMicrotask(() async { scheduleMicrotask(() async {
final user = appState.getAuthenticatedUser(); final user = appState.getAuthenticatedUser();
@ -445,11 +448,12 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
appState = getIt.get<AppState>();
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: LocaleKeys.homeHealthCare.tr(context: context), title: LocaleKeys.homeHealthCare.tr(context: context),
history: () => Navigator.of(context).push(CustomPageRoute(page: HhcOrderDetailPage(), direction: AxisDirection.up)), history: () => appState.isAuthenticated ? Navigator.of(context).push(CustomPageRoute(page: HhcOrderDetailPage(), direction: AxisDirection.up)) : null,
bottomChild: Consumer( bottomChild: Consumer(
builder: (BuildContext context, HmgServicesViewModel hmgServicesViewModel, Widget? child) { builder: (BuildContext context, HmgServicesViewModel hmgServicesViewModel, Widget? child) {
if (hmgServicesViewModel.isHhcOrdersLoading || hmgServicesViewModel.isHhcServicesLoading) { if (hmgServicesViewModel.isHhcOrdersLoading || hmgServicesViewModel.isHhcServicesLoading) {
@ -467,8 +471,14 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
padding: EdgeInsets.all(24.w), padding: EdgeInsets.all(24.w),
child: CustomButton( child: CustomButton(
borderWidth: 0, borderWidth: 0,
text: LocaleKeys.createNewRequest.tr(context: context), text: appState.isAuthenticated ? LocaleKeys.createNewRequest.tr(context: context) : LocaleKeys.loginToUseService.tr(context: context),
onPressed: () => _buildServicesListBottomsSheet(hmgServicesViewModel.hhcServicesList), onPressed: () {
if(appState.isAuthenticated) {
_buildServicesListBottomsSheet(hmgServicesViewModel.hhcServicesList);
} else {
getIt<AuthenticationViewModel>().onLoginPressed();
}
},
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
borderRadius: 12.r, borderRadius: 12.r,
borderColor: Colors.transparent, borderColor: Colors.transparent,
@ -492,12 +502,13 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
} else { } else {
return Column( return Column(
children: [ children: [
appState.isAuthenticated ?
Center( Center(
child: Utils.getNoDataWidget( child: Utils.getNoDataWidget(
context, context,
noDataText: LocaleKeys.youHaveNoPendingRequests.tr(context: context), noDataText: LocaleKeys.youHaveNoPendingRequests.tr(context: context),
), ),
), ) : LocaleKeys.homeHealthCareText.tr(context: context).toText18(weight: FontWeight.w500).paddingSymmetrical(24.h, 24.h),
], ],
); );
} }

@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
@ -75,21 +76,18 @@ class PatientInsuranceCardUpdateCard extends StatelessWidget {
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Row( Wrap(
direction: Axis.horizontal,
spacing: 4.h,
runSpacing: 4.h,
children: [ children: [
Wrap( AppCustomChipWidget(
direction: Axis.horizontal, icon: AppAssets.doctor_calendar_icon,
spacing: 4.h, labelText:
runSpacing: 4.h, "${LocaleKeys.expiryOn.tr(context: context)} ${DateUtil.formatDateToDate(DateTime.parse(insuranceViewModel.patientInsuranceUpdateResponseModel!.effectiveTo!), false)}",
children: [ ),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon, labelText: "Member ID: ${insuranceViewModel.patientInsuranceUpdateResponseModel!.memberID!}",
labelText: "${LocaleKeys.expiryOn.tr(context: context)} ${insuranceViewModel.patientInsuranceUpdateResponseModel!.effectiveTo}",
),
AppCustomChipWidget(
labelText: "Member ID: ${insuranceViewModel.patientInsuranceUpdateResponseModel!.memberID!}",
),
],
), ),
], ],
), ),

@ -79,27 +79,35 @@ class PatientInsuranceCard extends StatelessWidget {
: AppColors.warningColorYellow, : AppColors.warningColorYellow,
iconSize: 12.w, iconSize: 12.w,
deleteIcon: insuranceViewModel.isInsuranceActive ? null : AppAssets.forward_chevron_icon, deleteIcon: insuranceViewModel.isInsuranceActive ? null : AppAssets.forward_chevron_icon,
deleteIconColor: AppColors.warningColorYellow, deleteIconColor: insuranceViewModel.isInsuranceExpired
? AppColors.primaryRedColor
: insuranceViewModel.isInsuranceActive
? AppColors.successColor
: AppColors.warningColorYellow,
deleteIconHasColor: true, deleteIconHasColor: true,
onChipTap: () { onChipTap: () {
if (!insuranceViewModel.isInsuranceActive) { if (!insuranceViewModel.isInsuranceActive) {
showCommonBottomSheetWithoutHeight( insuranceViewModel.setIsInsuranceUpdateDetailsLoading(true);
title: LocaleKeys.notice.tr(context: context), insuranceViewModel.getPatientInsuranceDetailsForUpdate(
context, appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
child: Utils.getWarningWidget( showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context), // showCommonBottomSheetWithoutHeight(
confirmText: LocaleKeys.contactUs.tr(context: context), // title: LocaleKeys.notice.tr(context: context),
isShowActionButtons: true, // context,
onCancelTap: () { // child: Utils.getWarningWidget(
Navigator.pop(context); // loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context),
}, // confirmText: LocaleKeys.contactUs.tr(context: context),
onConfirmTap: () async { // isShowActionButtons: true,
launchUrl(Uri.parse("tel://" + "+966 92 006 6666")); // onCancelTap: () {
}), // Navigator.pop(context);
callBackFunc: () {}, // },
isFullScreen: false, // onConfirmTap: () async {
isCloseButtonVisible: true, // launchUrl(Uri.parse("tel://" + "+966 92 006 6666"));
); // }),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
} }
}, },
backgroundColor: insuranceViewModel.isInsuranceExpired backgroundColor: insuranceViewModel.isInsuranceExpired

@ -312,27 +312,35 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
: AppColors.warningColorYellow, : AppColors.warningColorYellow,
iconSize: 12.w, iconSize: 12.w,
deleteIcon: insuranceVM.isInsuranceActive ? null : AppAssets.forward_chevron_icon, deleteIcon: insuranceVM.isInsuranceActive ? null : AppAssets.forward_chevron_icon,
deleteIconColor: AppColors.warningColorYellow, deleteIconColor: insuranceVM.isInsuranceExpired
? AppColors.primaryRedColor
: insuranceVM.isInsuranceActive
? AppColors.successColor
: AppColors.warningColorYellow,
deleteIconHasColor: true, deleteIconHasColor: true,
onChipTap: () { onChipTap: () {
if (!insuranceVM.isInsuranceActive) { if (!insuranceVM.isInsuranceActive) {
showCommonBottomSheetWithoutHeight( insuranceVM.setIsInsuranceUpdateDetailsLoading(true);
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!), insuranceVM.getPatientInsuranceDetailsForUpdate(
navigationService.navigatorKey.currentContext!, appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
child: Utils.getWarningWidget( showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context), // showCommonBottomSheetWithoutHeight(
confirmText: LocaleKeys.contactUs.tr(context: context), // title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
isShowActionButtons: true, // navigationService.navigatorKey.currentContext!,
onCancelTap: () { // child: Utils.getWarningWidget(
navigationService.pop(); // loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context),
}, // confirmText: LocaleKeys.contactUs.tr(context: context),
onConfirmTap: () async { // isShowActionButtons: true,
launchUrl(Uri.parse("tel://" + "+966 92 006 6666")); // onCancelTap: () {
}), // navigationService.pop();
callBackFunc: () {}, // },
isFullScreen: false, // onConfirmTap: () async {
isCloseButtonVisible: true, // launchUrl(Uri.parse("tel://" + "+966 92 006 6666"));
); // }),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
} }
}, },
backgroundColor: insuranceVM.isInsuranceExpired backgroundColor: insuranceVM.isInsuranceExpired

@ -23,6 +23,7 @@ import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_v
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_update_details_card.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/app_language_change.dart'; import 'package:hmg_patient_app_new/widgets/app_language_change.dart';
@ -431,27 +432,34 @@ class FamilyCardWidget extends StatelessWidget {
: AppColors.warningColorYellow, : AppColors.warningColorYellow,
iconSize: 12.w, iconSize: 12.w,
deleteIcon: insuranceVM.isInsuranceActive ? null : AppAssets.forward_chevron_icon, deleteIcon: insuranceVM.isInsuranceActive ? null : AppAssets.forward_chevron_icon,
deleteIconColor: AppColors.warningColorYellow, deleteIconColor: insuranceVM.isInsuranceExpired
? AppColors.primaryRedColor
: insuranceVM.isInsuranceActive
? AppColors.successColor
: AppColors.warningColorYellow,
deleteIconHasColor: true, deleteIconHasColor: true,
onChipTap: () { onChipTap: () {
if (!insuranceVM.isInsuranceActive) { if (!insuranceVM.isInsuranceActive) {
showCommonBottomSheetWithoutHeight( insuranceVM.setIsInsuranceUpdateDetailsLoading(true);
title: LocaleKeys.notice.tr(context: context), insuranceVM.getPatientInsuranceDetailsForUpdate(appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
context, showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
child: Utils.getWarningWidget( // showCommonBottomSheetWithoutHeight(
loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context), // title: LocaleKeys.notice.tr(context: context),
confirmText: LocaleKeys.contactUs.tr(context: context), // context,
isShowActionButtons: true, // child: Utils.getWarningWidget(
onCancelTap: () { // loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context),
Navigator.pop(context); // confirmText: LocaleKeys.contactUs.tr(context: context),
}, // isShowActionButtons: true,
onConfirmTap: () async { // onCancelTap: () {
launchUrl(Uri.parse("tel://" + "+966 92 006 6666")); // Navigator.pop(context);
}), // },
callBackFunc: () {}, // onConfirmTap: () async {
isFullScreen: false, // launchUrl(Uri.parse("tel://" + "+966 92 006 6666"));
isCloseButtonVisible: true, // }),
); // callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
} }
}, },
backgroundColor: insuranceVM.isInsuranceExpired backgroundColor: insuranceVM.isInsuranceExpired

@ -1,4 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
@ -101,12 +103,15 @@ class AppCustomChipWidget extends StatelessWidget {
deleteIcon: deleteIcon?.isNotEmpty == true deleteIcon: deleteIcon?.isNotEmpty == true
? InkWell( ? InkWell(
onTap: onDeleteTap, onTap: onDeleteTap,
child: Utils.buildSvgWithAssets( child: Transform.flip(
icon: deleteIcon!, flipX: getIt.get<AppState>().isArabic(),
width: iconS, child: Utils.buildSvgWithAssets(
height: iconS, icon: deleteIcon!,
iconColor: deleteIconHasColor ? resolvedDeleteIconColor : null, width: iconS,
applyThemeColor: applyThemeColor, height: iconS,
iconColor: deleteIconHasColor ? resolvedDeleteIconColor : null,
applyThemeColor: applyThemeColor,
),
), ),
) )
: null, : null,

Loading…
Cancel
Save