|
|
|
|
@ -838,40 +838,42 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
isLocked: false,
|
|
|
|
|
).toShimmer2()
|
|
|
|
|
: MedicalFileCard(
|
|
|
|
|
label: !((myAppointmentsVM.appointmentRatedResponseModel!).isAllowedToRate ?? false)
|
|
|
|
|
? LocaleKeys.ratingSubmitted.tr(context: context)
|
|
|
|
|
: LocaleKeys.doctorRatingAppointment.tr(context: context),
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.appointmentRatingIcon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
isLocked: !(myAppointmentsVM.appointmentRatedResponseModel!.isAllowedToRate ?? false),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
if ((myAppointmentsVM.appointmentRatedResponseModel!.isAllowedToRate ?? true)) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
title: LocaleKeys.doctorRating.tr(context: context),
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
child: StatefulBuilder(
|
|
|
|
|
builder: (context, setState) {
|
|
|
|
|
return AppointmentRatingWidget(
|
|
|
|
|
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
callBackFunc: () {
|
|
|
|
|
myAppointmentsViewModel.getDoctorsRatingCheck(
|
|
|
|
|
doctorID: widget.patientAppointmentHistoryResponseModel.doctorID,
|
|
|
|
|
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
|
|
|
|
|
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
|
|
|
|
|
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo);
|
|
|
|
|
},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
: myAppointmentsVM.appointmentRatedResponseModel != null
|
|
|
|
|
? MedicalFileCard(
|
|
|
|
|
label: !(myAppointmentsVM.appointmentRatedResponseModel!.isAllowedToRate ?? false)
|
|
|
|
|
? LocaleKeys.ratingSubmitted.tr(context: context)
|
|
|
|
|
: LocaleKeys.doctorRatingAppointment.tr(context: context),
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.appointmentRatingIcon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
isLocked: !(myAppointmentsVM.appointmentRatedResponseModel!.isAllowedToRate ?? false),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
if (myAppointmentsVM.appointmentRatedResponseModel?.isAllowedToRate ?? false) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
title: LocaleKeys.doctorRating.tr(context: context),
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
child: StatefulBuilder(
|
|
|
|
|
builder: (context, setState) {
|
|
|
|
|
return AppointmentRatingWidget(
|
|
|
|
|
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
callBackFunc: () {
|
|
|
|
|
myAppointmentsViewModel.getDoctorsRatingCheck(
|
|
|
|
|
doctorID: widget.patientAppointmentHistoryResponseModel.doctorID,
|
|
|
|
|
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
|
|
|
|
|
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
|
|
|
|
|
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo);
|
|
|
|
|
},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
|