diff --git a/lib/features/my_appointments/appointment_via_region_viewmodel.dart b/lib/features/my_appointments/appointment_via_region_viewmodel.dart index 852e678..9ffb544 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,19 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier { page: SelectDoctorPage(), ),); } + + void handleLastStepForClinicForDentalAndLaser() { + //todo handle the routing here + navigationService.pop(); + } + + void handleLastStepForDentalAndLaser() { + //todo handle the routing here + navigationService.pop(); + navigationService.push( + CustomPageRoute( + page: SelectDoctorPage(), + ), + ); + } } 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..7a4d7e9 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 @@ -99,11 +99,13 @@ class HospitalBottomSheetBody extends StatelessWidget { if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION) { regionalViewModel.setBottomSheetState(AppointmentViaRegionState.CLINIC_SELECTION); regionalViewModel.handleLastStepForRegion(); - }else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) { - + } 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.handleLastStepForClinicForDentalAndLaser(); + // regionalViewModel.handleLastStepForClinic(); } });}, separatorBuilder: (_, __) => SizedBox( diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart index 036c0e3..cad0309 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart @@ -41,10 +41,10 @@ class HospitalListItem extends StatelessWidget { Transform.flip( flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets( - icon: AppAssets.forward_arrow_icon, + icon: AppAssets.forward_arrow_icon_small, iconColor: AppColors.blackColor, - width: 18, - height: 13, + width: 18.h, + height: 13.h, fit: BoxFit.contain, ), ), 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 869fea3..e1bbf1f 100644 --- a/lib/presentation/book_appointment/select_clinic_page.dart +++ b/lib/presentation/book_appointment/select_clinic_page.dart @@ -206,17 +206,17 @@ class _SelectClinicPageState extends State { Navigator.of(context).push( CustomPageRoute( page: SelectLivecareClinicPage(onNegativeClicked: (){ - handleDoctorScreen(); + handleDoctorScreen(clinic); },), ), ); } else { - handleDoctorScreen(); + handleDoctorScreen(clinic); } } - // ClinicID 17 & Clinic ID 253 - void handleDoctorScreen() { + //17 and 235 + void handleDoctorScreen(GetClinicsListResponseModel clinic) { if (widget.isFromRegionFlow) { Navigator.of(context).push( CustomPageRoute( @@ -224,7 +224,12 @@ 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); } } @@ -253,7 +258,7 @@ class _SelectClinicPageState extends State { if (data.bottomSheetState == AppointmentViaRegionState.HOSPITAL_SELECTION) { return HospitalBottomSheetBody(); } - if(data.bottomSheetState == AppointmentViaRegionState.DOCTOR_SELECTION){ + if (data.bottomSheetState == AppointmentViaRegionState.DOCTOR_SELECTION) { bookAppointmentsViewModel.setProjectID(regionalViewModel.selectedHospital?.patientDoctorAppointmentList?.first.projectID.toString()); } else {