Waiting appointment bug fix

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

@ -280,23 +280,27 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
selectedDateJSON = freeSlotsResponse[0];
});
openTimeSlotsPickerForDate(
(isLiveCareSchedule != null && isLiveCareSchedule)
isWaitingAppointmentAvailable
? DateTime.now()
: (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON,
int.parse(
widget.doctor.projectID.toString(),
),
),
docFreeSlots);
_calendarController.selectedDate = isWaitingAppointmentAvailable
? DateTime.now()
: (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON,
int.parse(
widget.doctor.projectID.toString(),
),
),
docFreeSlots);
_calendarController.selectedDate = (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON,
int.parse(
widget.doctor.projectID.toString(),
),
);
);
_calendarController.displayDate = _calendarController.selectedDate;
return _eventsParsed;
}
@ -360,16 +364,16 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
freeSlotsResponse = res['FreeTimeSlots'];
_getJSONSlots().then((value) {
setState(() {
_events.clear();
_events = value;
if (widget.doctorSchedule != null)
{
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']));
_calendarController.selectedDate = DateUtil.convertStringToDate(
widget.doctorSchedule['Date'],
);
};
});
_events.clear();
_events = value;
if (widget.doctorSchedule != null) {
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']));
_calendarController.selectedDate = DateUtil.convertStringToDate(
widget.doctorSchedule['Date'],
);
}
;
});
});
} else {
DocAvailableAppointments.areAppointmentsAvailable = false;

Loading…
Cancel
Save