|
|
|
|
@ -22,6 +22,7 @@ import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointme
|
|
|
|
|
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/custom_tab_bar.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/date_range_selector/date_range_calender.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart';
|
|
|
|
|
@ -187,18 +188,9 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: "${myAppointmentsVM.patientAppointmentsViewList[index].patientDoctorAppointmentList!.length} Appointments",
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 30.h,
|
|
|
|
|
),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText:
|
|
|
|
|
"${myAppointmentsVM.patientAppointmentsViewList[index].patientDoctorAppointmentList!.length} Appointments"),
|
|
|
|
|
Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -224,7 +216,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
|
|
|
|
|
child: isExpanded
|
|
|
|
|
? Container(
|
|
|
|
|
key: ValueKey<int>(index),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 0.w, vertical: 0.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
@ -232,63 +224,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Image.network(
|
|
|
|
|
appointment.doctorImageURL!,
|
|
|
|
|
width: 24.h,
|
|
|
|
|
height: 24.h,
|
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
|
).circle(100),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
Expanded(child: appointment.doctorNameObj!.toText14(weight: FontWeight.w500)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointment.appointmentDate), false),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 24.h,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: myAppointmentsVM.isAppointmentsSortByClinic ? appointment.projectName! : appointment.clinicName!,
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 24.h,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: appointment.statusDesc ?? "",
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 24.h,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
AppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: appointment,
|
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
|
@ -296,9 +231,9 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isFromHomePage: false,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h).paddingSymmetrical(16.w, 0.h),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
|