|
|
|
|
@ -14,8 +14,10 @@ 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/authentication/authentication_view_model.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/get_clinic_list_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/models/timeslots.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/review_appointment_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
|
|
|
|
|
@ -266,8 +268,23 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
bookAppointmentsViewModel.getAppointmentNearestGate(
|
|
|
|
|
projectID: bookAppointmentsViewModel.selectedDoctor.projectID!, clinicID: bookAppointmentsViewModel.selectedDoctor.clinicID!);
|
|
|
|
|
if (bookAppointmentsViewModel.selectedClinic.clinicID! == 17 && bookAppointmentsViewModel.selectedChiefComplaintID == 0) {
|
|
|
|
|
GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel(
|
|
|
|
|
clinicID: bookAppointmentsViewModel.selectedClinic.clinicID,
|
|
|
|
|
clinicDescription: bookAppointmentsViewModel.selectedClinic.clinicDescription,
|
|
|
|
|
isLiveCareClinicAndOnline: false,
|
|
|
|
|
liveCareServiceID: 0,
|
|
|
|
|
liveCareClinicID: 0);
|
|
|
|
|
bookAppointmentsViewModel.setProjectID(bookAppointmentsViewModel.selectedDoctor.projectID.toString());
|
|
|
|
|
bookAppointmentsViewModel.setSelectedClinic(selectedClinic);
|
|
|
|
|
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: DentalChiefComplaintsPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
bookAppointmentsViewModel.getAppointmentNearestGate(projectID: bookAppointmentsViewModel.selectedDoctor.projectID!, clinicID: bookAppointmentsViewModel.selectedDoctor.clinicID!);
|
|
|
|
|
bookAppointmentsViewModel.setSelectedAppointmentDateTime(selectedDate, selectedTime, selectedDateDisplay);
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
@ -276,6 +293,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
@ -284,8 +302,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Lottie.asset(AppAnimations.errorAnimation,
|
|
|
|
|
repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
|
|
|
|
|
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
(LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.blackColor),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
@ -384,12 +401,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
|
|
|
|
|
selectedButtonIndex = 0;
|
|
|
|
|
List<Map<String, dynamic>> timeList = [];
|
|
|
|
|
for (var i = 0; i < dayEvents.length; i++) {
|
|
|
|
|
Map<String, dynamic> timeSlot = {
|
|
|
|
|
"isoTime": dayEvents[i].isoTime,
|
|
|
|
|
"start": dayEvents[i].start.toString(),
|
|
|
|
|
"end": dayEvents[i].end.toString(),
|
|
|
|
|
"vidaDate": dayEvents[i].vidaDate
|
|
|
|
|
};
|
|
|
|
|
Map<String, dynamic> timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate};
|
|
|
|
|
timeList.add(timeSlot);
|
|
|
|
|
}
|
|
|
|
|
if (dayEvents.isNotEmpty) {
|
|
|
|
|
|