|
|
|
|
@ -492,27 +492,31 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void goToBookConfirm() async {
|
|
|
|
|
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
|
|
|
|
|
navigateToDentalComplaints(context);
|
|
|
|
|
} else {
|
|
|
|
|
if (DocAvailableAppointments.areSlotsAvailable) {
|
|
|
|
|
if (projectViewModel.isLogin) {
|
|
|
|
|
// if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
|
|
|
|
|
// navigateToDentalComplaints(context);
|
|
|
|
|
// } else {
|
|
|
|
|
if (DocAvailableAppointments.areSlotsAvailable) {
|
|
|
|
|
if (projectViewModel.isLogin) {
|
|
|
|
|
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user.age > 12) {
|
|
|
|
|
navigateToDentalComplaints(context);
|
|
|
|
|
} else {
|
|
|
|
|
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
|
|
|
|
|
navigateToBookConfirm(context);
|
|
|
|
|
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
|
|
|
|
|
} else {
|
|
|
|
|
ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
confirmMessage: TranslationBase.of(context).loginToUseService,
|
|
|
|
|
okText: TranslationBase.of(context).confirm,
|
|
|
|
|
cancelText: TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
okFunction: () => {navigateToLogin()},
|
|
|
|
|
cancelFunction: () => {});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
confirmMessage: TranslationBase.of(context).loginToUseService,
|
|
|
|
|
okText: TranslationBase.of(context).confirm,
|
|
|
|
|
cancelText: TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
okFunction: () => {navigateToLogin()},
|
|
|
|
|
cancelFunction: () => {});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToDentalComplaints(BuildContext context) async {
|
|
|
|
|
|