diff --git a/lib/features/my_appointments/appointment_via_region_viewmodel.dart b/lib/features/my_appointments/appointment_via_region_viewmodel.dart index 852e678..ffa6ec1 100644 --- a/lib/features/my_appointments/appointment_via_region_viewmodel.dart +++ b/lib/features/my_appointments/appointment_via_region_viewmodel.dart @@ -17,7 +17,8 @@ enum AppointmentViaRegionState { enum RegionBottomSheetType{ FOR_REGION, - FOR_CLINIIC + REGION_FOR_DENTAL_AND_LASER, + FOR_CLINIIC, } class AppointmentViaRegionViewmodel extends ChangeNotifier { @@ -94,4 +95,12 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier { page: SelectDoctorPage(), ),); } + + void handleLastStepForDentalAndLaser() { + //todo handle the routing here + navigationService.pop(); + navigationService.push(CustomPageRoute( + page: SelectDoctorPage(), + ),); + } } diff --git a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart index 09c7c40..174fe10 100644 --- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart +++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart @@ -24,7 +24,7 @@ class _RegionBottomSheetBodyState extends State { @override void initState() { scheduleMicrotask(() { - if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION) { + if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER ) { myAppointmentsViewModel.getRegionMappedProjectList(); } else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) { myAppointmentsViewModel.getMappedDoctors(); diff --git a/lib/presentation/book_appointment/select_clinic_page.dart b/lib/presentation/book_appointment/select_clinic_page.dart index 36a490d..2c005d4 100644 --- a/lib/presentation/book_appointment/select_clinic_page.dart +++ b/lib/presentation/book_appointment/select_clinic_page.dart @@ -206,16 +206,17 @@ class _SelectClinicPageState extends State { Navigator.of(context).push( CustomPageRoute( page: SelectLivecareClinicPage(onNegativeClicked: (){ - handleDoctorScreen(); + handleDoctorScreen(clinic); },), ), ); } else { - handleDoctorScreen(); + handleDoctorScreen(clinic); } } - void handleDoctorScreen() { + //17 and 235 + void handleDoctorScreen(GetClinicsListResponseModel clinic) { if (widget.isFromRegionFlow) { Navigator.of(context).push( CustomPageRoute( @@ -223,7 +224,13 @@ class _SelectClinicPageState extends State { ), ); } else { - openRegionListBottomSheet(context, RegionBottomSheetType.FOR_CLINIIC); + + var bottomSheetType = RegionBottomSheetType.FOR_CLINIIC; + print("the cliininc id is ${clinic.clinicID}"); + if(clinic.clinicID == 17 || clinic.clinicID == 235) { + bottomSheetType = RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER; + } + openRegionListBottomSheet(context, bottomSheetType); } }