Waiting appointment bug fix

merge-update-with-lab-changes
haroon amjad 1 year ago
parent 605f02afe2
commit c6ee01c652

@ -280,7 +280,9 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
selectedDateJSON = freeSlotsResponse[0]; selectedDateJSON = freeSlotsResponse[0];
}); });
openTimeSlotsPickerForDate( openTimeSlotsPickerForDate(
(isLiveCareSchedule != null && isLiveCareSchedule) isWaitingAppointmentAvailable
? DateTime.now()
: (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON) ? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone( : DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON, selectedDateJSON,
@ -289,7 +291,9 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
), ),
), ),
docFreeSlots); docFreeSlots);
_calendarController.selectedDate = (isLiveCareSchedule != null && isLiveCareSchedule) _calendarController.selectedDate = isWaitingAppointmentAvailable
? DateTime.now()
: (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON) ? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone( : DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON, selectedDateJSON,
@ -362,13 +366,13 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
setState(() { setState(() {
_events.clear(); _events.clear();
_events = value; _events = value;
if (widget.doctorSchedule != null) if (widget.doctorSchedule != null) {
{
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])); _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']));
_calendarController.selectedDate = DateUtil.convertStringToDate( _calendarController.selectedDate = DateUtil.convertStringToDate(
widget.doctorSchedule['Date'], widget.doctorSchedule['Date'],
); );
}; }
;
}); });
}); });
} else { } else {

Loading…
Cancel
Save