diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart index 44cc43e..34714f4 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart @@ -100,10 +100,11 @@ class HospitalBottomSheetBody extends StatelessWidget { regionalViewModel.setBottomSheetState(AppointmentViaRegionState.CLINIC_SELECTION); regionalViewModel.handleLastStepForRegion(); }else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) { - regionalViewModel.setBottomSheetState(AppointmentViaRegionState.DOCTOR_SELECTION); regionalViewModel.handleLastStepForClinic(); - + }else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) { + regionalViewModel.setBottomSheetState(AppointmentViaRegionState.DOCTOR_SELECTION); + regionalViewModel.handleLastStepForDentalAndLaser(); } });}, separatorBuilder: (_, __) => SizedBox( diff --git a/lib/presentation/book_appointment/select_clinic_page.dart b/lib/presentation/book_appointment/select_clinic_page.dart index 2c005d4..285dcfc 100644 --- a/lib/presentation/book_appointment/select_clinic_page.dart +++ b/lib/presentation/book_appointment/select_clinic_page.dart @@ -260,7 +260,21 @@ class _SelectClinicPageState extends State { return HospitalBottomSheetBody(); } if(data.bottomSheetState == AppointmentViaRegionState.DOCTOR_SELECTION){ - bookAppointmentsViewModel.setProjectID(regionalViewModel.selectedHospital?.patientDoctorAppointmentList?.first.projectID.toString()); + //if the region screen is opened for the dental clinic thenthe project id will be in the hospital list as the list is formed form the get project api + var id = ""; + if (data.regionBottomSheetType == + RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) { + id = regionalViewModel.selectedHospital?.hospitalList?.first?.iD + ?.toString() ?? + ""; + } else { + id = regionalViewModel.selectedHospital?.patientDoctorAppointmentList + ?.first?.projectID + ?.toString() ?? + ""; + } + bookAppointmentsViewModel.setProjectID(id); + return SizedBox.shrink(); } else { return SizedBox.shrink();