|
|
|
|
@ -191,15 +191,57 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.appointmentStatus.tr(context: context).toText16(isBold: true),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.appointmentStatus.tr(context: context).toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
|
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel)
|
|
|
|
|
? LocaleKeys.notConfirmed.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
|
|
|
|
|
: LocaleKeys.confirmed.tr(context: context).toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
((!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel) && widget.patientAppointmentHistoryResponseModel.nextAction != 10)
|
|
|
|
|
? CustomButton(
|
|
|
|
|
text: LocaleKeys.confirm.tr(),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingAppointmentPleaseWait.tr(context: context));
|
|
|
|
|
await myAppointmentsViewModel.confirmAppointment(
|
|
|
|
|
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
|
|
|
|
|
onSuccess: (apiResponse) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
|
myAppointmentsViewModel.initAppointmentsViewModel();
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
title: "",
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)),
|
|
|
|
|
callBackFunc: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.successColor,
|
|
|
|
|
borderColor: AppColors.successColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.confirm_appointment_icon,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
)
|
|
|
|
|
: SizedBox.shrink())
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
|
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel)
|
|
|
|
|
? LocaleKeys.notConfirmed.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
|
|
|
|
|
: LocaleKeys.confirmed.tr(context: context).toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
//TODO Add countdown timer in case of LiveCare Appointment
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false
|
|
|
|
|
? Row(
|
|
|
|
|
|