|
|
|
|
@ -107,6 +107,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppointmentDoctorCard(
|
|
|
|
|
renderWidgetForERDisplay: ((widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
|
|
|
|
|
(widget.patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
|
|
|
|
|
!Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID)),
|
|
|
|
|
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
|
|
|
|
|
onAskDoctorTap: () async {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
|
|
|
|
|
@ -755,12 +758,15 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
],
|
|
|
|
|
).paddingOnly(left: 16.h, top: 24.h, right: 16.h, bottom: 0.h),
|
|
|
|
|
AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
|
|
|
|
|
? !widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment!
|
|
|
|
|
?
|
|
|
|
|
(widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment! ||
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.isExecludeDoctor! ||
|
|
|
|
|
Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID))
|
|
|
|
|
? CustomButton(
|
|
|
|
|
text: LocaleKeys.rebookAppointment.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
openDoctorScheduleCalendar();
|
|
|
|
|
},
|
|
|
|
|
openDoctorScheduleCalendar();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.successColor,
|
|
|
|
|
borderColor: AppColors.successColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
@ -777,7 +783,6 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
: CustomButton(
|
|
|
|
|
text: AppointmentType.getNextActionText(widget.patientAppointmentHistoryResponseModel.nextAction),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
|
handleAppointmentNextAction(widget.patientAppointmentHistoryResponseModel.nextAction);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction),
|
|
|
|
|
@ -855,6 +860,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
|
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)), callBackFunc: (str) {
|
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
|
myAppointmentsViewModel.initAppointmentsViewModel();
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
},
|
|
|
|
|
title: "",
|
|
|
|
|
|