Queueing system screen implementation contd.

pull/110/head
haroon amjad 1 month ago
parent ca47315b2c
commit 634a138c7f

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 10.4189C5 6.60727 8.12437 3.5 12 3.5C15.8756 3.5 19 6.60727 19 10.4189C19 11.7227 18.6361 12.94 18.003 13.98C17.7158 14.4518 17.8654 15.067 18.3372 15.3542C18.8089 15.6414 19.4242 15.4917 19.7113 15.02C20.5292 13.6763 21 12.1008 21 10.4189C21 5.48352 16.9609 1.5 12 1.5C7.03907 1.5 3 5.48352 3 10.4189C3 12.1008 3.47075 13.6763 4.28867 15.02C4.57584 15.4917 5.19107 15.6414 5.66283 15.3542C6.13458 15.067 6.28421 14.4518 5.99704 13.98C5.36394 12.94 5 11.7227 5 10.4189Z" fill="#FFAF15"/>
<path d="M16.2105 15.755C16.1022 15.75 15.9736 15.75 15.8432 15.75L13 15.75L13 12.3377C13.6525 12.122 14.2312 11.7074 14.7242 11.1896C15.1051 10.7896 15.0896 10.1567 14.6896 9.77581C14.2896 9.39495 13.6567 9.41044 13.2758 9.81041C12.783 10.3279 12.3512 10.5 12 10.5C11.6488 10.5 11.217 10.3279 10.7242 9.81041C10.3433 9.41045 9.71037 9.39495 9.31041 9.77581C8.91044 10.1567 8.89495 10.7896 9.27581 11.1896C9.76884 11.7074 10.3475 12.122 11 12.3377L11 15.75H8.15684C8.02643 15.75 7.89781 15.75 7.78945 15.755C7.67503 15.7602 7.52127 15.7728 7.3611 15.8212C6.8626 15.9717 6.5267 16.3363 6.50126 16.7498C6.49309 16.8826 6.52614 16.9996 6.55585 17.0857C6.8873 18.7676 7.57151 19.25 8.1569 19.25L15.8431 19.25C16.4285 19.25 17.1127 18.7676 17.4441 17.0857C17.4739 16.9996 17.5069 16.8826 17.4987 16.7498C17.4733 16.3363 17.1374 15.9717 16.6389 15.8212C16.4787 15.7728 16.325 15.7602 16.2105 15.755Z" fill="#FFAF15"/>
<path d="M10.3321 22.4013C10.6774 22.5018 11.0856 22.5018 11.9019 22.5018C12.7182 22.5018 13.1264 22.5018 13.4717 22.4013C14.0057 22.2458 14.4551 21.9204 14.7324 21.4884C14.8356 21.3276 14.906 21.1423 14.9776 20.8791C15.0674 20.5491 15.1123 20.3841 15.0223 20.2663C14.9322 20.1484 14.7551 20.1484 14.4009 20.1484L9.40295 20.1484C9.04873 20.1484 8.87162 20.1484 8.78156 20.2663C8.69151 20.3841 8.73641 20.5491 8.82623 20.8791C8.89786 21.1423 8.96819 21.3276 9.07142 21.4884C9.34876 21.9204 9.79812 22.2458 10.3321 22.4013Z" fill="#FFAF15"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,4 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.14286 7.27526C6.06081 7.19321 5.94953 7.14712 5.8335 7.14712C5.68326 7.14712 5.53722 7.14711 5.396 7.14757V9.54083C6.06931 9.73127 6.56266 10.3503 6.56266 11.0846V11.668C6.56266 11.9096 6.36679 12.1055 6.12516 12.1055C5.88354 12.1055 5.68766 11.9096 5.68766 11.668V11.0846C5.68766 10.6819 5.3612 10.3555 4.9585 10.3555C4.55579 10.3555 4.22933 10.6819 4.22933 11.0846V11.668C4.22933 11.9096 4.03345 12.1055 3.79183 12.1055C3.55021 12.1055 3.35433 11.9096 3.35433 11.668V11.0846C3.35433 10.3503 3.84768 9.73127 4.521 9.54083V7.16254C4.27509 7.17241 4.05216 7.18858 3.85498 7.21509C3.32991 7.28568 2.88782 7.4367 2.5367 7.78782C2.18558 8.13894 2.03456 8.58103 1.96397 9.1061C1.89598 9.61182 1.89598 10.2548 1.896 11.0526V12.8346C1.896 13.0762 2.09187 13.2721 2.3335 13.2721H11.6668C11.9085 13.2721 12.1043 13.0762 12.1043 12.8346V11.0526C12.1043 10.2548 12.1044 9.61183 12.0364 9.1061C11.9658 8.58103 11.8147 8.13894 11.4636 7.78782C11.1125 7.4367 10.6704 7.28568 10.1454 7.21509C10.0293 7.19949 9.90432 7.18746 9.771 7.1782V10.4725C10.0325 10.6238 10.2085 10.9066 10.2085 11.2305C10.2085 11.7137 9.81675 12.1055 9.3335 12.1055C8.85025 12.1055 8.4585 11.7137 8.4585 11.2305C8.4585 10.9066 8.63446 10.6238 8.896 10.4725V7.14936C8.66672 7.14711 8.42324 7.14711 8.16711 7.14712C8.05108 7.14712 7.93952 7.19321 7.85747 7.27526L7.00016 8.13257L6.14286 7.27526Z" fill="#18C273"/>
<path d="M7.00016 0.730469C5.63096 0.730469 4.521 1.84043 4.521 3.20964V3.79297C4.521 5.16217 5.63096 6.27214 7.00016 6.27214C8.36937 6.27214 9.47933 5.16217 9.47933 3.79297V3.20964C9.47933 1.84043 8.36937 0.730469 7.00016 0.730469Z" fill="#18C273"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,4 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.5658 1.95717C9.82689 0.890531 8.26692 1.31563 7.32452 2.02335C7.26938 2.06476 7.22039 2.10153 7.17659 2.13413C7.08676 2.20099 7.04185 2.23442 6.98387 2.23442C6.92589 2.23442 6.88098 2.20099 6.79115 2.13413C6.74735 2.10153 6.69836 2.06476 6.64322 2.02335C5.70082 1.31563 4.14085 0.890531 2.40195 1.95717C1.53619 2.48823 0.943044 3.43564 0.767402 4.5853C0.741775 4.75304 0.728961 4.83691 0.781341 4.89789C0.83372 4.95888 0.923033 4.95887 1.10166 4.95885L3.00095 4.95868C3.24133 4.95767 3.64619 4.95596 4.03964 5.0991C4.19392 5.15522 4.33336 5.22877 4.4573 5.3094C4.63656 5.42602 4.72618 5.48433 4.79864 5.46761C4.87109 5.45089 4.92018 5.36908 5.01835 5.20545L5.44147 4.50026C5.71062 4.05168 6.19943 3.78162 6.72246 3.79256C7.24549 3.80349 7.72259 4.09374 7.97275 4.55319L8.72948 5.94294C8.77795 6.03196 8.80218 6.07647 8.8435 6.10102C8.88482 6.12557 8.9355 6.12557 9.03686 6.12557H9.31698C10.1224 6.12557 10.7753 6.77849 10.7753 7.5839C10.7753 8.38932 10.1224 9.04224 9.31698 9.04224L8.66574 9.04348C8.42373 9.04908 7.69714 9.06588 7.06184 8.57794C7.0432 8.56363 7.02501 8.54906 7.00725 8.5343C6.81047 8.37075 6.71208 8.28898 6.63276 8.30247C6.55344 8.31596 6.49635 8.41111 6.38218 8.6014L6.19249 8.91754C5.93991 9.33851 5.49248 9.60414 5.00197 9.62434C4.51146 9.64453 4.0437 9.41658 3.75738 9.0178L3.04199 8.02146C2.99064 7.94995 2.96497 7.91419 2.92736 7.8949C2.88975 7.8756 2.84573 7.8756 2.75769 7.8756L1.88603 7.87559C1.63453 7.87558 1.50878 7.87558 1.45819 7.96269C1.40759 8.0498 1.46788 8.15548 1.58846 8.36685C2.2106 9.45742 3.18686 10.5632 4.58832 11.6005C5.43495 12.2275 6.05634 12.6877 6.98387 12.6877C7.91141 12.6877 8.53279 12.2275 9.37943 11.6005C11.8175 9.79586 12.9688 7.78416 13.2073 6.00548C13.4447 4.23535 12.7682 2.69472 11.5658 1.95717Z" fill="#ED1C2B"/>
<path d="M7.20469 4.97105C7.10463 4.78727 6.91379 4.67117 6.70458 4.66679C6.49537 4.66242 6.29984 4.77044 6.19218 4.94988L4.8987 7.10568L4.50819 6.5618C4.50002 6.55043 4.49145 6.53935 4.48248 6.52859C4.47338 6.51766 4.4634 6.50547 4.45255 6.49222C4.32787 6.33991 4.08822 6.04716 3.74091 5.92081C3.49697 5.83206 3.23003 5.83265 2.965 5.83324L2.90072 5.83333H1.73405C1.41188 5.83333 1.15072 6.0945 1.15072 6.41667C1.15072 6.73883 1.41188 7 1.73405 7H2.90072C3.27245 7 3.31696 7.00823 3.34111 7.01684C3.34329 7.01792 3.36229 7.02776 3.40145 7.06546C3.45005 7.11226 3.4979 7.16947 3.57276 7.25931L4.46854 8.50689C4.58307 8.6664 4.77018 8.75758 4.96638 8.74951C5.16258 8.74143 5.34156 8.63518 5.44259 8.46679L6.66782 6.42473L7.16648 7.34054C7.17206 7.35078 7.17794 7.36086 7.18412 7.37075L7.20842 7.40983C7.30282 7.56206 7.41744 7.74688 7.59523 7.88343C7.98366 8.18176 8.4448 8.17225 8.67006 8.16761C8.69423 8.16711 8.71569 8.16667 8.73405 8.16667H9.31738C9.63955 8.16667 9.90072 7.9055 9.90072 7.58333C9.90072 7.26117 9.63955 7 9.31738 7H8.73405C8.69863 7 8.66723 7.00017 8.63892 7.00032C8.53614 7.00086 8.47421 7.00119 8.40933 6.99253C8.35288 6.98499 8.32768 6.97346 8.31135 6.96218C8.30864 6.95892 8.30403 6.95313 8.29726 6.94384C8.27206 6.90926 8.24113 6.86063 8.18271 6.76722L7.20469 4.97105Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -178,6 +178,9 @@ class AppAssets {
static const String doctor_profile_rating_icon = '$svgBasePath/doctor_profile_rating_icon.svg';
static const String doctor_profile_reviews_icon = '$svgBasePath/doctor_profile_reviews_icon.svg';
static const String waiting_appointment_icon = '$svgBasePath/waitingAppo.svg';
static const String call_for_vitals = '$svgBasePath/call_for_vitals.svg';
static const String call_for_doctor = '$svgBasePath/call_for_doctor.svg';
static const String bulb_icon = '$svgBasePath/bulb_icon.svg';
//bottom navigation//

@ -0,0 +1,266 @@
import 'package:flutter/material.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/dependencies.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/string_extensions.dart';
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/appbar/collapsing_list_view.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 AppointmentQueuePage extends StatelessWidget {
AppointmentQueuePage({super.key});
AppState? appState;
int currentQueueStatus = 0;
@override
Widget build(BuildContext context) {
currentQueueStatus = 1;
appState = getIt.get<AppState>();
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: Column(
children: [
Expanded(
child: CollapsingListView(
title: "Queueing".needTranslation,
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
side: BorderSide(color: getCardBorderColor(), width: 2.w),
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
labelText: currentQueueStatus == 0 ? "In Queue".needTranslation : "Your Turn".needTranslation,
backgroundColor: getCardBorderColor().withValues(alpha: 0.20),
textColor: getCardBorderColor(),
),
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
],
),
SizedBox(height: 10.h),
"Hala ${appState!.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
SizedBox(height: 8.h),
"Thank you for your patience, here is your queue number.".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 8.h),
"IMD W-A-2".needTranslation.toText32(isBold: true),
SizedBox(height: 8.h),
CustomButton(
text: getCardButtonText(),
onPressed: () {},
backgroundColor: getCardButtonColor(),
borderColor: getCardButtonColor().withValues(alpha: 0.01),
textColor: getCardButtonTextColor(),
fontSize: 12.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
iconColor: AppColors.whiteColor,
iconSize: 18.h,
),
],
),
),
),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: true,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Serving Now".needTranslation.toText16(isBold: true),
SizedBox(height: 18.h),
ListView.separated(
padding: EdgeInsets.zero,
shrinkWrap: true,
itemCount: 3,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"IMD W-A-2".needTranslation.toText17(isBold: true),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
"Room: S2".toText12(fontWeight: FontWeight.w500),
SizedBox(width: 8.w),
AppCustomChipWidget(
deleteIcon: AppAssets.call_for_vitals,
labelText: "Call for vital signs".needTranslation,
iconColor: AppColors.primaryRedColor,
textColor: AppColors.primaryRedColor,
iconSize: 14.w,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.1),
labelPadding: EdgeInsetsDirectional.only(start: 8.h, end: -2.h),
),
],
),
],
);
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 8.h),
),
],
),
),
),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: true,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.bulb_icon, width: 24.w, height: 24.h),
SizedBox(width: 8.w),
"Things to ask your doctor today".needTranslation.toText16(isBold: true),
],
),
SizedBox(height: 8.h),
// What can I do to improve my overall health?
// Are there any routine screenings I should get?
// What is this medication for?
// Are there any side effects I should know about?
// When should I come back for a follow-up?
"${"What can I do to improve my overall health?"}".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"Are there any routine screenings I should get?"}".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"What is this medication for?"}".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"Are there any side effects I should know about?"}".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"When should I come back for a follow-up?"}".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 16.h),
],
),
),
),
],
),
),
),
),
),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
hasShadow: true,
),
child: CustomButton(
text: "Go to homepage".needTranslation,
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h,
icon: AppAssets.homeBottom,
iconColor: AppColors.whiteColor,
iconSize: 18.h,
).paddingSymmetrical(16.h, 24.h),
)
],
),
);
}
Color getCardBorderColor() {
switch (currentQueueStatus) {
case 0:
return AppColors.ratingColorYellow;
case 1:
return AppColors.primaryRedColor;
case 2:
return AppColors.successColor;
}
return AppColors.textColor;
}
Color getCardButtonColor() {
switch (currentQueueStatus) {
case 0:
return AppColors.textColor.withValues(alpha: 0.08);
case 1:
return AppColors.primaryRedColor;
case 2:
return AppColors.successColor;
}
return AppColors.primaryRedColor;
}
Color getCardButtonTextColor() {
switch (currentQueueStatus) {
case 0:
return Color(0xFFA2A2A2);
case 1:
return AppColors.whiteColor;
case 2:
return AppColors.whiteColor;
}
return AppColors.primaryRedColor;
}
String getCardButtonText() {
switch (currentQueueStatus) {
case 0:
return "Please wait! you will be called for vital signs".needTranslation;
case 1:
return "Please visit Room S5 for vital signs".needTranslation;
case 2:
return "Please visit Room S5 to the Doctor".needTranslation;
}
return "";
}
}

@ -17,6 +17,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_vie
import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/appointment_details_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/appointment_queue_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/ask_doctor_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/eye_measurement_details_page.dart';
@ -26,6 +27,7 @@ import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.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:smooth_corner/smooth_corner.dart';
class AppointmentCard extends StatelessWidget {
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
@ -124,47 +126,33 @@ class AppointmentCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.network(
isLoading ? 'https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png' : patientAppointmentHistoryResponseModel.doctorImageURL!,
width: 63.w,
height: 63.h,
fit: BoxFit.cover,
),
Positioned(
bottom: 0,
left: 0,
right: 0,
).circle(100).toShimmer2(isShow: isLoading),
Transform.translate(
offset: Offset(0.0, -20.h),
child: Container(
width: 63.w,
height: 20,
color: AppColors.textColorLight.withValues(alpha: 0.25),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.rating_icon,
width: 12.w,
height: 12.h,
fit: BoxFit.contain,
width: 40.w,
height: 40.h,
decoration: BoxDecoration(
color: AppColors.whiteColor,
shape: BoxShape.circle, // Makes the container circular
border: Border.all(
color: AppColors.scaffoldBgColor, // Color of the border
width: 1.5.w, // Width of the border
),
SizedBox(width: 4.w),
isLoading ? "Rating".toText12() : patientAppointmentHistoryResponseModel.decimalDoctorRate.toString().toText12(),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), SizedBox(height: 2.h), "4.7".toText11(isBold: true, color: AppColors.textColor)],
),
)
],
).circle(100).toShimmer2(isShow: isLoading),
// SizedBox(height: 12.h),
// AppCustomChipWidget(
// icon: AppAssets.rating_icon,
// iconColor: AppColors.ratingColorYellow,
// labelText: isLoading ? "Rating" : "Rating: ${patientAppointmentHistoryResponseModel.decimalDoctorRate}".needTranslation)
// .toShimmer2(isShow: isLoading),
),
],
),
SizedBox(width: 16.h),
@ -304,34 +292,41 @@ class AppointmentCard extends StatelessWidget {
if (isRecent) {
return CustomButton(
text: LocaleKeys.askDoctor.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
await myAppointmentsViewModel.isDoctorAvailable(
projectID: patientAppointmentHistoryResponseModel.projectID,
doctorId: patientAppointmentHistoryResponseModel.doctorID,
clinicId: patientAppointmentHistoryResponseModel.clinicID,
onSuccess: (value) async {
if (value) {
await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
title: LocaleKeys.askDoctor.tr(context: context),
child: AskDoctorRequestTypeSelect(
askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
myAppointmentsViewModel: myAppointmentsViewModel,
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
onPressed: () {
Navigator.of(context).push(
CustomPageRoute(
page: AppointmentQueuePage(),
),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
});
} else {
print("Doctor is not available");
}
});
},
// onPressed: () async {
// LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
// await myAppointmentsViewModel.isDoctorAvailable(
// projectID: patientAppointmentHistoryResponseModel.projectID,
// doctorId: patientAppointmentHistoryResponseModel.doctorID,
// clinicId: patientAppointmentHistoryResponseModel.clinicID,
// onSuccess: (value) async {
// if (value) {
// await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
// LoaderBottomSheet.hideLoader();
// showCommonBottomSheetWithoutHeight(
// context,
// title: LocaleKeys.askDoctor.tr(context: context),
// child: AskDoctorRequestTypeSelect(
// askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
// myAppointmentsViewModel: myAppointmentsViewModel,
// patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
// ),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
// });
// } else {
// print("Doctor is not available");
// }
// });
// },
backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,

@ -25,6 +25,7 @@ import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immed
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/search_doctor_by_name.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_clinic_page.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/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -72,6 +73,15 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: LocaleKeys.bookAppo.tr(context: context),
isLeading: true,
leadingCallback: () {
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
},
child: SingleChildScrollView(
child: Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
return Column(

@ -34,7 +34,7 @@ class PatientInsuranceCard extends StatelessWidget {
width: double.infinity,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24,
borderRadius: 24.r,
),
child: Padding(
padding: EdgeInsets.all(16.h),
@ -112,6 +112,6 @@ class PatientInsuranceCard extends StatelessWidget {
],
),
),
).paddingSymmetrical(24.h, 0.h);
).paddingSymmetrical(0.h, 0.h);
}
}

@ -30,6 +30,7 @@ import 'package:hmg_patient_app_new/presentation/appointments/my_doctors_page.da
import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/doctor_profile_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/presentation/insurance/insurance_approvals_page.dart';
import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_update_details_card.dart';
@ -109,25 +110,30 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
trailing: Row(
children: [
Wrap(
spacing: -8.h,
// runSpacing: 0.h,
children: [
Utils.buildImgWithAssets(
icon: AppAssets.babyGirlImg,
height: 32.h,
border: 1.5,
height: 28.h,
width: 28.w,
border: 1,
fit: BoxFit.contain,
borderRadius: 50.r,
),
Utils.buildImgWithAssets(
icon: AppAssets.femaleImg,
height: 32.h,
border: 1.5,
height: 28.h,
width: 28.w,
border: 1,
borderRadius: 50.r,
fit: BoxFit.contain,
),
Utils.buildImgWithAssets(
icon: AppAssets.male_img,
height: 32.h,
border: 1.5,
height: 28.h,
width: 28.w,
border: 1,
borderRadius: 50.r,
fit: BoxFit.contain,
),
@ -146,7 +152,15 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
},
profiles: medicalFileViewModel.patientFamilyFiles);
}),
isLeading: false,
isLeading: true,
leadingCallback: () {
Navigator.pushAndRemoveUntil(
navigationService.navigatorKey.currentContext!,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -177,7 +191,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
AppCustomChipWidget(
icon: AppAssets.file_icon,
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
labelText: "${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
labelPadding: EdgeInsetsDirectional.only(end: 6.w),
onChipTap: () {
navigationService.pushPage(
@ -215,7 +229,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
icon: AppAssets.blood_icon,
labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}",
iconColor: AppColors.primaryRedColor,
labelPadding: EdgeInsetsDirectional.only(end: 8.w),
labelPadding: EdgeInsetsDirectional.only(end: 4.w),
padding: EdgeInsets.zero,
),
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
return AppCustomChipWidget(
@ -535,10 +550,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
? const CommonShimmerWidget().paddingSymmetrical(0.w, 0.h)
: prescriptionVM.patientPrescriptionOrders.isNotEmpty
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
borderRadius: 12.r,
),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r, hasShadow: false),
child: Padding(
padding: EdgeInsets.all(16.w),
child: Column(
@ -608,9 +620,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),
SizedBox(height: 24.h),
SizedBox(height: 16.h),
const Divider(color: AppColors.dividerColor),
SizedBox(height: 24.h),
SizedBox(height: 16.h),
Row(
children: [
Expanded(
@ -635,7 +647,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
iconSize: 16.w,
),
),
SizedBox(width: 10.w),
SizedBox(width: 6.w),
Expanded(
child: CustomButton(
text: "All Medications".needTranslation,
@ -657,7 +669,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
],
),
),
).paddingSymmetrical(24.w, 0.h)
).paddingSymmetrical(0.w, 0.h)
: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,

@ -25,6 +25,7 @@ class CollapsingListView extends StatelessWidget {
Widget? trailing;
bool isClose;
bool isLeading;
VoidCallback? leadingCallback;
CollapsingListView({
super.key,
@ -40,7 +41,7 @@ class CollapsingListView extends StatelessWidget {
this.requests,
this.isLeading = true,
this.trailing,
});
this.leadingCallback});
@override
Widget build(BuildContext context) {
@ -65,7 +66,13 @@ class CollapsingListView extends StatelessWidget {
child: IconButton(
icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h),
padding: EdgeInsets.only(left: 12),
onPressed: () => Navigator.pop(context),
onPressed: () {
if(leadingCallback != null) {
leadingCallback!();
} else {
Navigator.pop(context);
}
},
highlightColor: Colors.transparent,
),
)

Loading…
Cancel
Save