|
|
|
|
@ -148,11 +148,14 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: 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<LandingPage> {
|
|
|
|
|
? _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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
(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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
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<LandingPage> {
|
|
|
|
|
// 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,
|
|
|
|
|
|