|
|
|
|
@ -10,13 +10,17 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/book_appointment/dental_chief_complaints_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/book_appointment/laser/laser_appointment.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
|
import 'package:lottie/lottie.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
@ -25,11 +29,13 @@ class DoctorCard extends StatelessWidget {
|
|
|
|
|
super.key,
|
|
|
|
|
required this.doctorsListResponseModel,
|
|
|
|
|
required this.isLoading,
|
|
|
|
|
this.isDoctorNameSearch = false,
|
|
|
|
|
required this.bookAppointmentsViewModel,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
final DoctorsListResponseModel doctorsListResponseModel;
|
|
|
|
|
final bool isLoading;
|
|
|
|
|
final bool isDoctorNameSearch;
|
|
|
|
|
|
|
|
|
|
final BookAppointmentsViewModel bookAppointmentsViewModel;
|
|
|
|
|
|
|
|
|
|
@ -173,6 +179,29 @@ class DoctorCard extends StatelessWidget {
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.bookAppo.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
if (isDoctorNameSearch && doctorsListResponseModel.clinicID == 17) {
|
|
|
|
|
GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel(
|
|
|
|
|
clinicID: doctorsListResponseModel.clinicID, clinicDescription: doctorsListResponseModel.clinicName, isLiveCareClinicAndOnline: false, liveCareServiceID: 0, liveCareClinicID: 0);
|
|
|
|
|
bookAppointmentsViewModel.setProjectID(doctorsListResponseModel.projectID.toString());
|
|
|
|
|
bookAppointmentsViewModel.setSelectedClinic(selectedClinic);
|
|
|
|
|
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: DentalChiefComplaintsPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else if (isDoctorNameSearch && doctorsListResponseModel.clinicID == 253) {
|
|
|
|
|
GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel(
|
|
|
|
|
clinicID: doctorsListResponseModel.clinicID, clinicDescription: doctorsListResponseModel.clinicName, isLiveCareClinicAndOnline: false, liveCareServiceID: 0, liveCareClinicID: 0);
|
|
|
|
|
bookAppointmentsViewModel.setSelectedClinic(selectedClinic);
|
|
|
|
|
bookAppointmentsViewModel.getLaserClinic();
|
|
|
|
|
bookAppointmentsViewModel.setIsDoctorsListLoading(true);
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: LaserAppointment(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
bookAppointmentsViewModel.setSelectedDoctor(doctorsListResponseModel);
|
|
|
|
|
LoaderBottomSheet.showLoader();
|
|
|
|
|
bookAppointmentsViewModel.isLiveCareSchedule
|
|
|
|
|
@ -261,6 +290,7 @@ class DoctorCard extends StatelessWidget {
|
|
|
|
|
// isCloseButtonVisible: true,
|
|
|
|
|
// );
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
|