diff --git a/assets/images/svg/symptom_checker_icon.svg b/assets/images/svg/symptom_checker_icon.svg
new file mode 100644
index 0000000..e41c1dd
--- /dev/null
+++ b/assets/images/svg/symptom_checker_icon.svg
@@ -0,0 +1,6 @@
+
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index 6ba2980..2fdc389 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -246,6 +246,7 @@ class AppAssets {
static const String rotateIcon = '$svgBasePath/rotate_icon.svg';
static const String refreshIcon = '$svgBasePath/refresh.svg';
static const String homeBorderedIcon = '$svgBasePath/home_bordered.svg';
+ static const String symptomCheckerIcon = '$svgBasePath/symptom_checker_icon.svg';
// Water Monitor
static const String waterBottle = '$svgBasePath/water_bottle.svg';
diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart
index 46649fb..b393772 100644
--- a/lib/features/authentication/authentication_view_model.dart
+++ b/lib/features/authentication/authentication_view_model.dart
@@ -32,6 +32,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_vie
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart';
+import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
@@ -39,6 +40,7 @@ import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'package:hmg_patient_app_new/services/localauth_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:sms_otp_auto_verify/sms_otp_auto_verify.dart';
import 'models/request_models/get_user_mobile_device_data.dart';
@@ -565,7 +567,7 @@ class AuthenticationViewModel extends ChangeNotifier {
if (!_appState.getIsChildLoggedIn) {
await medicalVm.getFamilyFiles(status: 0);
await medicalVm.getAllPendingRecordsByResponseId();
- _navigationService.popUntilNamed(AppRoutes.landingScreen);
+ _navigationService.replaceAllRoutesAndNavigateToLanding();
}
} else {
if (activation.list != null && activation.list!.isNotEmpty) {
@@ -675,7 +677,12 @@ class AuthenticationViewModel extends ChangeNotifier {
}
Future navigateToHomeScreen() async {
- _navigationService.pushAndReplace(AppRoutes.landingScreen);
+ Navigator.pushAndRemoveUntil(
+ _navigationService.navigatorKey.currentContext!,
+ CustomPageRoute(
+ page: LandingNavigation(),
+ ),
+ (r) => false);
}
Future navigateToOTPScreen(
diff --git a/lib/presentation/authentication/saved_login_screen.dart b/lib/presentation/authentication/saved_login_screen.dart
index 93b26c7..f0fd8cb 100644
--- a/lib/presentation/authentication/saved_login_screen.dart
+++ b/lib/presentation/authentication/saved_login_screen.dart
@@ -16,6 +16,7 @@ import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart';
import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
class SavedLogin extends StatefulWidget {
@@ -266,9 +267,15 @@ class _SavedLogin extends State {
child: CustomButton(
text: LocaleKeys.guest.tr(),
onPressed: () {
- Navigator.of(context).pushReplacement(
- MaterialPageRoute(builder: (BuildContext context) => LandingNavigation()),
- );
+ Navigator.pushAndRemoveUntil(
+ context,
+ CustomPageRoute(
+ page: LandingNavigation(),
+ ),
+ (r) => false);
+ // Navigator.of(context).pushAndRemoveUntil(
+ // MaterialPageRoute(builder: (BuildContext context) => LandingNavigation())
+ // );
},
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart
index 1496ded..95884d4 100644
--- a/lib/presentation/home/landing_page.dart
+++ b/lib/presentation/home/landing_page.dart
@@ -1,4 +1,5 @@
import 'dart:async';
+import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
@@ -13,6 +14,7 @@ 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/utils.dart';
import 'package:hmg_patient_app_new/extensions/int_extensions.dart';
+import 'package:hmg_patient_app_new/extensions/route_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/features/authentication/authentication_view_model.dart';
@@ -25,6 +27,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
+import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/appointment_queue_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart';
@@ -43,6 +46,9 @@ import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dar
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
import 'package:hmg_patient_app_new/presentation/profile_settings/profile_settings.dart';
import 'package:hmg_patient_app_new/presentation/rate_appointment/rate_appointment_doctor.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedures_details_page.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
+import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@@ -67,13 +73,13 @@ class _LandingPageState extends State {
late AppState appState;
late MyAppointmentsViewModel myAppointmentsViewModel;
- late PrescriptionsViewModel prescriptionsViewModel;
final CacheService cacheService = GetIt.instance();
late AppointmentRatingViewModel appointmentRatingViewModel;
late InsuranceViewModel insuranceViewModel;
late ImmediateLiveCareViewModel immediateLiveCareViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel;
late EmergencyServicesViewModel emergencyServicesViewModel;
+ late TodoSectionViewModel todoSectionViewModel;
final SwiperController _controller = SwiperController();
@@ -82,10 +88,6 @@ class _LandingPageState extends State {
authVM = context.read();
habibWalletVM = context.read();
appointmentRatingViewModel = context.read();
- // myAppointmentsViewModel = context.read();
- // prescriptionsViewModel = context.read();
- // insuranceViewModel = context.read();
- // immediateLiveCareViewModel = context.read();
authVM.savePushTokenToAppState();
if (mounted) {
@@ -97,13 +99,11 @@ class _LandingPageState extends State {
if (appState.isAuthenticated) {
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
+ todoSectionViewModel.initializeTodoSectionViewModel();
immediateLiveCareViewModel.initImmediateLiveCare();
immediateLiveCareViewModel.getPatientLiveCareHistory();
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
- myAppointmentsViewModel.getPatientMyDoctors();
- prescriptionsViewModel.initPrescriptionsViewModel();
- insuranceViewModel.initInsuranceProvider();
emergencyServicesViewModel.checkPatientERAdvanceBalance();
myAppointmentsViewModel.getPatientAppointmentQueueDetails();
if(!appState.isRatedVisible) {
@@ -111,17 +111,16 @@ class _LandingPageState extends State {
if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
appointmentRatingViewModel.getAppointmentDetails(appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!, appointmentRatingViewModel.appointmentRatedList.last.projectID!,
onSuccess: ((response) {
-
appointmentRatingViewModel.setClinicOrDoctor(false);
appointmentRatingViewModel.setTitle("Rate Doctor".needTranslation);
appointmentRatingViewModel.setSubTitle("How was your last visit with doctor?".needTranslation);
openLastRating();
appState.setRatedVisible(true);
-
- }));
-
- }
- });
+ }),
+ );
+ }
+ },
+ );
}
}
});
@@ -132,10 +131,10 @@ class _LandingPageState extends State {
Widget build(BuildContext context) {
bookAppointmentsViewModel = Provider.of(context, listen: false);
myAppointmentsViewModel = Provider.of(context, listen: false);
- prescriptionsViewModel = Provider.of(context, listen: false);
insuranceViewModel = Provider.of(context, listen: false);
immediateLiveCareViewModel = Provider.of(context, listen: false);
emergencyServicesViewModel = Provider.of(context, listen: false);
+ todoSectionViewModel = Provider.of(context, listen: false);
appState = getIt.get();
return PopScope(
canPop: false,
@@ -214,6 +213,50 @@ class _LandingPageState extends State {
),
],
).paddingSymmetrical(24.h, 0.h),
+ !appState.isAuthenticated
+ ? Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.r,
+ hasShadow: false,
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(16.h),
+ child: Row(
+ children: [
+ Utils.buildSvgWithAssets(
+ width: 50.w,
+ height: 60.h,
+ icon: AppAssets.symptomCheckerIcon,
+ fit: BoxFit.contain,
+ ),
+ SizedBox(width: 12.w),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ "How are you feeling today?".needTranslation.toText14(isBold: true),
+ "Check your symptoms with this scale".needTranslation.toText12(fontWeight: FontWeight.w500),
+ SizedBox(height: 14.h),
+ CustomButton(
+ text: "Check your symptoms".needTranslation,
+ onPressed: () async {
+ context.navigateWithName(AppRoutes.userInfoSelection);
+ },
+ backgroundColor: Color(0xFF2B353E),
+ borderColor: Color(0xFF2B353E),
+ textColor: AppColors.whiteColor,
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ borderRadius: 12,
+ height: 40.h,
+ ),
+ ],
+ )
+ ],
+ ),
+ ),
+ ).paddingSymmetrical(24.w, 0.h)
+ : SizedBox.shrink(),
appState.isAuthenticated
? Column(
children: [
@@ -234,8 +277,8 @@ class _LandingPageState extends State {
Navigator.of(context).push(CustomPageRoute(page: MyAppointmentsPage()));
}),
SizedBox(height: 16.h),
- Consumer2(
- builder: (context, myAppointmentsVM, immediateLiveCareVM, child) {
+ Consumer3(
+ builder: (context, myAppointmentsVM, immediateLiveCareVM, todoSectionVM, child) {
return myAppointmentsVM.isMyAppointmentsLoading
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@@ -452,20 +495,41 @@ class _LandingPageState extends State {
SizedBox(height: 12.h),
],
)
- : Container(
- decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
- borderRadius: 24.r,
- hasShadow: true,
- ),
- child: AppointmentCard(
- patientAppointmentHistoryResponseModel:
- myAppointmentsVM.patientAppointmentsHistoryList[immediateLiveCareViewModel.patientHasPendingLiveCareRequest ? --index : index],
- myAppointmentsViewModel: myAppointmentsViewModel,
- bookAppointmentsViewModel: bookAppointmentsViewModel,
- isLoading: false,
- isFromHomePage: true,
- ),
+ : (todoSectionVM.patientAncillaryOrdersList.isNotEmpty && index == 1)
+ ? AncillaryOrderCard(
+ order: todoSectionVM.patientAncillaryOrdersList.first,
+ isLoading: false,
+ isOrdersList: false,
+ onCheckIn: () {
+ log("Check-in for order: ${todoSectionVM.patientAncillaryOrdersList.first.orderNo}");
+ },
+ onViewDetails: () {
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: AncillaryOrderDetailsList(
+ appointmentNoVida: todoSectionVM.patientAncillaryOrdersList.first.appointmentNo ?? 0,
+ orderNo: todoSectionVM.patientAncillaryOrdersList.first.orderNo ?? 0,
+ projectID: todoSectionVM.patientAncillaryOrdersList.first.projectID ?? 0,
+ projectName: todoSectionVM.patientAncillaryOrdersList.first.projectName ?? "",
+ ),
+ ),
+ );
+ },
+ )
+ : Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.r,
+ hasShadow: true,
+ ),
+ child: AppointmentCard(
+ patientAppointmentHistoryResponseModel:
+ myAppointmentsVM.patientAppointmentsHistoryList[immediateLiveCareViewModel.patientHasPendingLiveCareRequest ? --index : index],
+ myAppointmentsViewModel: myAppointmentsViewModel,
+ bookAppointmentsViewModel: bookAppointmentsViewModel,
+ isLoading: false,
+ isFromHomePage: true,
+ ),
);
},
)
diff --git a/lib/presentation/home/navigation_screen.dart b/lib/presentation/home/navigation_screen.dart
index 6ec8c3a..6998d85 100644
--- a/lib/presentation/home/navigation_screen.dart
+++ b/lib/presentation/home/navigation_screen.dart
@@ -7,6 +7,7 @@ import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart';
import 'package:hmg_patient_app_new/presentation/hmg_services/services_page.dart';
import 'package:hmg_patient_app_new/presentation/home/landing_page.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
+import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection.dart';
import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/widgets/bottom_navigation/bottom_navigation.dart';
@@ -33,7 +34,8 @@ class _LandingNavigationState extends State {
const LandingPage(),
appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ FeedbackPage(),
SizedBox(),
- const ToDoPage(),
+ // const ToDoPage(),
+ const UserInfoSelectionScreen(),
ServicesPage(),
],
),
diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart
index 34d9e17..f705993 100644
--- a/lib/presentation/medical_file/medical_file_page.dart
+++ b/lib/presentation/medical_file/medical_file_page.dart
@@ -53,6 +53,7 @@ import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart';
import 'package:hmg_patient_app_new/presentation/my_invoices/my_invoices_list.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart';
import 'package:hmg_patient_app_new/presentation/radiology/radiology_orders_page.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
import 'package:hmg_patient_app_new/presentation/vital_sign/vital_sign_page.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
@@ -87,6 +88,7 @@ class _MedicalFilePageState extends State {
late LabViewModel labViewModel;
late MyInvoicesViewModel myInvoicesViewModel;
late HmgServicesViewModel hmgServicesViewModel;
+ late PrescriptionsViewModel prescriptionsViewModel;
int currentIndex = 0;
@@ -99,7 +101,8 @@ class _MedicalFilePageState extends State {
appState = getIt.get();
scheduleMicrotask(() {
if (appState.isAuthenticated) {
- labViewModel.initLabProvider();
+ myAppointmentsViewModel.getPatientMyDoctors();
+ prescriptionsViewModel.initPrescriptionsViewModel();
insuranceViewModel.initInsuranceProvider();
medicalFileViewModel.setIsPatientSickLeaveListLoading(true);
medicalFileViewModel.getPatientSickLeaveList();
@@ -136,6 +139,7 @@ class _MedicalFilePageState extends State {
bookAppointmentsViewModel = Provider.of(context, listen: false);
myInvoicesViewModel = Provider.of(context, listen: false);
hmgServicesViewModel = Provider.of(context, listen: false);
+ prescriptionsViewModel = Provider.of(context, listen: false);
NavigationService navigationService = getIt.get();
return CollapsingListView(
// title: "Medical File".needTranslation,
@@ -1152,7 +1156,13 @@ class _MedicalFilePageState extends State {
svgIcon: AppAssets.ancillary_orders_list_icon,
isLargeText: true,
iconSize: 36.w,
- ),
+ ).onPress(() {
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: ToDoPage(),
+ ),
+ );
+ }),
],
).paddingSymmetrical(0.w, 0.0),
SizedBox(height: 16.h),
diff --git a/lib/presentation/onboarding/onboarding_screen.dart b/lib/presentation/onboarding/onboarding_screen.dart
index 265559b..a40a27b 100644
--- a/lib/presentation/onboarding/onboarding_screen.dart
+++ b/lib/presentation/onboarding/onboarding_screen.dart
@@ -9,6 +9,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
import 'package:lottie/lottie.dart';
@@ -30,7 +31,13 @@ class _OnboardingScreenState extends State {
void goToHomePage() {
Utils.saveBoolFromPrefs(CacheConst.firstLaunch, false);
- Navigator.of(context).pushReplacement(FadePage(page: LandingNavigation()));
+ Navigator.pushAndRemoveUntil(
+ context,
+ CustomPageRoute(
+ page: LandingNavigation(),
+ ),
+ (r) => false);
+ // Navigator.of(context).pushReplacement(FadePage(page: LandingNavigation()));
}
@override
diff --git a/lib/presentation/symptoms_checker/user_info_selection.dart b/lib/presentation/symptoms_checker/user_info_selection.dart
index 91f3d36..fd00308 100644
--- a/lib/presentation/symptoms_checker/user_info_selection.dart
+++ b/lib/presentation/symptoms_checker/user_info_selection.dart
@@ -144,7 +144,7 @@ class _UserInfoSelectionScreenState extends State {
Expanded(
child: CollapsingListView(
title: "Symptoms Checker".needTranslation,
- isLeading: true,
+ isLeading: Navigator.canPop(context),
child: SingleChildScrollView(
child: Column(
children: [
@@ -228,46 +228,48 @@ class _UserInfoSelectionScreenState extends State {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
child: SafeArea(
top: false,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- SizedBox(height: 24.h),
- Row(
- children: [
- Expanded(
- child: CustomButton(
- text: "No, Edit all".needTranslation,
- icon: AppAssets.edit_icon,
- iconColor: AppColors.primaryRedColor,
- onPressed: () {
- context.read().setUserInfoPage(0, isSinglePageEdit: false);
- context.navigateWithName(AppRoutes.userInfoFlowManager);
- },
- backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
- borderColor: Colors.transparent,
- textColor: AppColors.primaryRedColor,
- fontSize: 16.f,
+ child: Padding(
+ padding: EdgeInsets.all(8.h),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Row(
+ children: [
+ Expanded(
+ child: CustomButton(
+ text: "No, Edit all".needTranslation,
+ icon: AppAssets.edit_icon,
+ iconColor: AppColors.primaryRedColor,
+ onPressed: () {
+ context.read().setUserInfoPage(0, isSinglePageEdit: false);
+ context.navigateWithName(AppRoutes.userInfoFlowManager);
+ },
+ backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
+ borderColor: Colors.transparent,
+ textColor: AppColors.primaryRedColor,
+ fontSize: 16.f,
+ ),
),
- ),
- SizedBox(width: 12.w),
- Expanded(
- child: CustomButton(
- text: "Yes, It is".needTranslation,
- icon: AppAssets.tickIcon,
- iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
- onPressed: hasEmptyFields
- ? () {} // Empty function for disabled state
- : () => context.navigateWithName(AppRoutes.organSelectorPage),
- backgroundColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
- borderColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
- textColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
- fontSize: 16.f,
+ SizedBox(width: 12.w),
+ Expanded(
+ child: CustomButton(
+ text: "Yes, It is".needTranslation,
+ icon: AppAssets.tickIcon,
+ iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
+ onPressed: hasEmptyFields
+ ? () {} // Empty function for disabled state
+ : () => context.navigateWithName(AppRoutes.organSelectorPage),
+ backgroundColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
+ borderColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
+ textColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
+ fontSize: 16.f,
+ ),
),
- ),
- ],
- ),
- ],
- ).paddingSymmetrical(24.w, 0),
+ ],
+ ),
+ ],
+ ).paddingSymmetrical(24.w, 0),
+ ),
),
);
}
diff --git a/lib/presentation/todo_section/todo_page.dart b/lib/presentation/todo_section/todo_page.dart
index 8907fc8..0d2d806 100644
--- a/lib/presentation/todo_section/todo_page.dart
+++ b/lib/presentation/todo_section/todo_page.dart
@@ -47,6 +47,7 @@ class _ToDoPageState extends State {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: 3,
+ padding: EdgeInsetsGeometry.zero,
itemBuilder: (context, index) {
return AncillaryOrderCard(
order: AncillaryOrderItem(),
@@ -60,15 +61,13 @@ class _ToDoPageState extends State {
Widget build(BuildContext context) {
appState = getIt.get();
return CollapsingListView(
- title: "ToDo List".needTranslation,
- isLeading: false,
+ title: "Ancillary Orders".needTranslation,
+ isLeading: true,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
- "Ancillary Orders".needTranslation.toText18(isBold: true),
- SizedBox(height: 24.h),
Consumer(
builder: (BuildContext context, TodoSectionViewModel todoSectionViewModel, Widget? child) {
return todoSectionViewModel.isAncillaryOrdersLoading
diff --git a/lib/presentation/todo_section/widgets/ancillary_orders_list.dart b/lib/presentation/todo_section/widgets/ancillary_orders_list.dart
index 8a3e3fa..910da59 100644
--- a/lib/presentation/todo_section/widgets/ancillary_orders_list.dart
+++ b/lib/presentation/todo_section/widgets/ancillary_orders_list.dart
@@ -7,9 +7,13 @@ 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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart';
+import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
+import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
class AncillaryOrdersList extends StatelessWidget {
final List orders;
@@ -52,6 +56,7 @@ class AncillaryOrdersList extends StatelessWidget {
child: AncillaryOrderCard(
order: order,
isLoading: false,
+ isOrdersList: true,
onCheckIn: onCheckIn != null ? () => onCheckIn!(order) : null,
onViewDetails: onViewDetails != null ? () => onViewDetails!(order) : null,
)),
@@ -90,12 +95,14 @@ class AncillaryOrderCard extends StatelessWidget {
super.key,
required this.order,
this.isLoading = false,
+ this.isOrdersList = false,
this.onCheckIn,
this.onViewDetails,
});
final AncillaryOrderItem order;
final bool isLoading;
+ final bool isOrdersList;
final VoidCallback? onCheckIn;
final VoidCallback? onViewDetails;
@@ -113,30 +120,24 @@ class AncillaryOrderCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- // Header Row with Order Number and Date
- // Row(
- // mainAxisAlignment: MainAxisAlignment.spaceBetween,
- // children: [
- // Row(
- // children: [
- // if (!isLoading)
- // "Order #".needTranslation.toText14(
- // color: AppColors.textColorLight,
- // weight: FontWeight.w500,
- // ),
- // SizedBox(width: 4.w),
- // (isLoading ? "12345" : "${order.orderNo ?? '-'}").toText16(isBold: true).toShimmer2(isShow: isLoading),
- // ],
- // ),
- // if (order.orderDate != null || isLoading)
- // (isLoading ? "Jan 15, 2024" : DateFormat('MMM dd, yyyy').format(order.orderDate!))
- // .toText12(color: AppColors.textColorLight)
- // .toShimmer2(isShow: isLoading),
- // ],
- // ),
-
- SizedBox(height: 12.h),
-
+ isOrdersList
+ ? SizedBox.shrink()
+ : Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ "Ancillary Orders".toText14(isBold: true),
+ Row(
+ children: [
+ LocaleKeys.viewAll.tr(context: context).toText12(color: AppColors.primaryRedColor),
+ SizedBox(width: 2.h),
+ Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
+ ],
+ ),
+ ],
+ ).toShimmer2(isShow: isLoading).onPress(() {
+ Navigator.of(context).push(CustomPageRoute(page: ToDoPage()));
+ }),
+ SizedBox(height: 10.h),
// Doctor and Clinic Info
Row(
crossAxisAlignment: CrossAxisAlignment.center,
@@ -144,8 +145,8 @@ class AncillaryOrderCard extends StatelessWidget {
if (!isLoading) ...[
Image.network(
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
- width: 40.w,
- height: 40.h,
+ width: 63.w,
+ height: 63.h,
fit: BoxFit.cover,
).circle(100.r),
SizedBox(width: 12.w),
@@ -155,11 +156,7 @@ class AncillaryOrderCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Doctor Name
- if (order.doctorName != null || isLoading)
- (isLoading ? "Dr. John Smith" : order.doctorName!)
- .toString()
- .toText14(isBold: true, maxlines: 2)
- .toShimmer2(isShow: isLoading),
+ if (order.doctorName != null || isLoading) (isLoading ? "Dr. John Smith" : order.doctorName!).toString().toText16(isBold: true, maxlines: 2).toShimmer2(isShow: isLoading),
SizedBox(height: 4.h),
],
@@ -167,9 +164,7 @@ class AncillaryOrderCard extends StatelessWidget {
),
],
),
-
- SizedBox(height: 12.h),
-
+ SizedBox(height: 8.h),
// Chips for Appointment Info and Status
Wrap(
direction: Axis.horizontal,
@@ -191,9 +186,8 @@ class AncillaryOrderCard extends StatelessWidget {
// Appointment Date
if (order.appointmentDate != null || isLoading)
AppCustomChipWidget(
- icon: AppAssets.calendar,
- labelText:
- isLoading ? "Date: Jan 20, 2024" : "Date: ${DateFormat('MMM dd, yyyy').format(order.appointmentDate!)}".needTranslation,
+ icon: AppAssets.appointment_calendar_icon,
+ labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!).needTranslation,
).toShimmer2(isShow: isLoading),
// Appointment Number
diff --git a/lib/widgets/bottom_navigation/bottom_navigation.dart b/lib/widgets/bottom_navigation/bottom_navigation.dart
index a3e117f..c820468 100644
--- a/lib/widgets/bottom_navigation/bottom_navigation.dart
+++ b/lib/widgets/bottom_navigation/bottom_navigation.dart
@@ -30,7 +30,8 @@ class BottomNavigation extends StatelessWidget {
isSpecial: true,
),
appState.isAuthenticated
- ? BottomNavItem(icon: AppAssets.toDoBottom, label: LocaleKeys.todoList.tr(context: context))
+ // ? BottomNavItem(icon: AppAssets.toDoBottom, label: LocaleKeys.todoList.tr(context: context))
+ ? BottomNavItem(icon: AppAssets.toDoBottom, label: "Symptoms")
: BottomNavItem(icon: AppAssets.news, label: LocaleKeys.news.tr()),
BottomNavItem(icon: AppAssets.servicesBottom, label: LocaleKeys.services2.tr(context: context)),
];
@@ -39,7 +40,7 @@ class BottomNavigation extends StatelessWidget {
decoration: _containerDecoration,
padding: _containerPadding,
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(
items.length,
(index) => _buildNavItem(items[index], index),