Dental fixes

merge-update-with-lab-changes
haroon amjad 3 years ago
parent 1eed379889
commit 6e9cc39269

@ -492,27 +492,31 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
} }
void goToBookConfirm() async { void goToBookConfirm() async {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { // if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
navigateToDentalComplaints(context); // navigateToDentalComplaints(context);
} else { // } else {
if (DocAvailableAppointments.areSlotsAvailable) { if (DocAvailableAppointments.areSlotsAvailable) {
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user.age > 12) {
navigateToDentalComplaints(context);
} else {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime; final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
navigateToBookConfirm(context); navigateToBookConfirm(context);
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); 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 } else {
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); 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 { Future navigateToDentalComplaints(BuildContext context) async {

@ -120,6 +120,7 @@ class DoctorsListService extends BaseService {
"ContinueDentalPlan": false, "ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": false, "IsSearchAppointmnetByClinicID": false,
"DoctorName": docName, "DoctorName": docName,
"DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null,
"PatientID": authUser.patientID != null ? authUser.patientID : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0, "gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0, "age": authUser.age != null ? authUser.age : 0,

Loading…
Cancel
Save