|
|
|
|
@ -173,39 +173,39 @@ class AppointmentDoctorCard extends StatelessWidget {
|
|
|
|
|
? SizedBox.shrink()
|
|
|
|
|
: Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_icon, width: 20.h, height: 20.h, fit: BoxFit.scaleDown)
|
|
|
|
|
.onPress(() async {
|
|
|
|
|
DoctorsListResponseModel selectedDoctor = DoctorsListResponseModel();
|
|
|
|
|
selectedDoctor.doctorID = patientAppointmentHistoryResponseModel.doctorID;
|
|
|
|
|
selectedDoctor.doctorImageURL = patientAppointmentHistoryResponseModel.doctorImageURL;
|
|
|
|
|
selectedDoctor.name = patientAppointmentHistoryResponseModel.doctorNameObj;
|
|
|
|
|
selectedDoctor.doctorTitle = patientAppointmentHistoryResponseModel.doctorTitle;
|
|
|
|
|
selectedDoctor.nationalityFlagURL = "";
|
|
|
|
|
selectedDoctor.speciality = patientAppointmentHistoryResponseModel.doctorSpeciality;
|
|
|
|
|
selectedDoctor.clinicName = patientAppointmentHistoryResponseModel.clinicName;
|
|
|
|
|
selectedDoctor.projectName = patientAppointmentHistoryResponseModel.projectName;
|
|
|
|
|
selectedDoctor.clinicID = patientAppointmentHistoryResponseModel.clinicID;
|
|
|
|
|
selectedDoctor.projectID = patientAppointmentHistoryResponseModel.projectID;
|
|
|
|
|
|
|
|
|
|
getIt.get<BookAppointmentsViewModel>().setSelectedDoctor(selectedDoctor);
|
|
|
|
|
LoaderBottomSheet.showLoader();
|
|
|
|
|
await getIt.get<BookAppointmentsViewModel>().getDoctorProfile(onSuccess: (dynamic respData) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: DoctorProfilePage(
|
|
|
|
|
isDoctorAllowedToBook: !(patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}, onError: (err) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
// DoctorsListResponseModel selectedDoctor = DoctorsListResponseModel();
|
|
|
|
|
// selectedDoctor.doctorID = patientAppointmentHistoryResponseModel.doctorID;
|
|
|
|
|
// selectedDoctor.doctorImageURL = patientAppointmentHistoryResponseModel.doctorImageURL;
|
|
|
|
|
// selectedDoctor.name = patientAppointmentHistoryResponseModel.doctorNameObj;
|
|
|
|
|
// selectedDoctor.doctorTitle = patientAppointmentHistoryResponseModel.doctorTitle;
|
|
|
|
|
// selectedDoctor.nationalityFlagURL = "";
|
|
|
|
|
// selectedDoctor.speciality = patientAppointmentHistoryResponseModel.doctorSpeciality;
|
|
|
|
|
// selectedDoctor.clinicName = patientAppointmentHistoryResponseModel.clinicName;
|
|
|
|
|
// selectedDoctor.projectName = patientAppointmentHistoryResponseModel.projectName;
|
|
|
|
|
// selectedDoctor.clinicID = patientAppointmentHistoryResponseModel.clinicID;
|
|
|
|
|
// selectedDoctor.projectID = patientAppointmentHistoryResponseModel.projectID;
|
|
|
|
|
//
|
|
|
|
|
// getIt.get<BookAppointmentsViewModel>().setSelectedDoctor(selectedDoctor);
|
|
|
|
|
// LoaderBottomSheet.showLoader();
|
|
|
|
|
// await getIt.get<BookAppointmentsViewModel>().getDoctorProfile(onSuccess: (dynamic respData) {
|
|
|
|
|
// LoaderBottomSheet.hideLoader();
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// CustomPageRoute(
|
|
|
|
|
// page: DoctorProfilePage(
|
|
|
|
|
// isDoctorAllowedToBook: !(patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// }, onError: (err) {
|
|
|
|
|
// LoaderBottomSheet.hideLoader();
|
|
|
|
|
// showCommonBottomSheetWithoutHeight(
|
|
|
|
|
// context,
|
|
|
|
|
// child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
// callBackFunc: () {},
|
|
|
|
|
// isFullScreen: false,
|
|
|
|
|
// isCloseButtonVisible: true,
|
|
|
|
|
// );
|
|
|
|
|
// });
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -220,7 +220,48 @@ class AppointmentDoctorCard extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
).onPress(() async {
|
|
|
|
|
if ((patientAppointmentHistoryResponseModel.isLiveCareAppointment! ||
|
|
|
|
|
patientAppointmentHistoryResponseModel.isExecludeDoctor! ||
|
|
|
|
|
patientAppointmentHistoryResponseModel.isClinicReBookingAllowed! == false ||
|
|
|
|
|
patientAppointmentHistoryResponseModel.isActiveDoctor! == false ||
|
|
|
|
|
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID))) {
|
|
|
|
|
} else {
|
|
|
|
|
DoctorsListResponseModel selectedDoctor = DoctorsListResponseModel();
|
|
|
|
|
selectedDoctor.doctorID = patientAppointmentHistoryResponseModel.doctorID;
|
|
|
|
|
selectedDoctor.doctorImageURL = patientAppointmentHistoryResponseModel.doctorImageURL;
|
|
|
|
|
selectedDoctor.name = patientAppointmentHistoryResponseModel.doctorNameObj;
|
|
|
|
|
selectedDoctor.doctorTitle = patientAppointmentHistoryResponseModel.doctorTitle;
|
|
|
|
|
selectedDoctor.nationalityFlagURL = "";
|
|
|
|
|
selectedDoctor.speciality = patientAppointmentHistoryResponseModel.doctorSpeciality;
|
|
|
|
|
selectedDoctor.clinicName = patientAppointmentHistoryResponseModel.clinicName;
|
|
|
|
|
selectedDoctor.projectName = patientAppointmentHistoryResponseModel.projectName;
|
|
|
|
|
selectedDoctor.clinicID = patientAppointmentHistoryResponseModel.clinicID;
|
|
|
|
|
selectedDoctor.projectID = patientAppointmentHistoryResponseModel.projectID;
|
|
|
|
|
|
|
|
|
|
getIt.get<BookAppointmentsViewModel>().setSelectedDoctor(selectedDoctor);
|
|
|
|
|
LoaderBottomSheet.showLoader();
|
|
|
|
|
await getIt.get<BookAppointmentsViewModel>().getDoctorProfile(onSuccess: (dynamic respData) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: DoctorProfilePage(
|
|
|
|
|
isDoctorAllowedToBook: !(patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}, onError: (err) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getAppointmentActionButtons(bool isAppointmentArrived) {
|
|
|
|
|
|