diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 2d857bc9..8d0cc84d 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -235,7 +235,7 @@ class _DocAvailableAppointmentsState extends State return children; }, ), - onDaySelected: (date, events,holidays) { + onDaySelected: (date, events, holidays) { _onDaySelected(date, events); _animationController.forward(from: 0.0); }, diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index 8310528d..1e1fc444 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -348,7 +348,7 @@ class _CovidTimeSlotsState extends State return children; }, ), - onDaySelected: (date, event,holidays) { + onDaySelected: (date, event, holidays) { _onDaySelected( date, event, diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index 71167798..454abb4d 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -1,4 +1,6 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart'; @@ -34,13 +36,13 @@ class _MyAppointmentsState extends State bool isDataLoaded = false; var sharedPref = new AppSharedPreferences(); - var authProvider = new AuthProvider(); + AuthenticatedUserObject authenticatedUserObject = locator(); @override void initState() { _tabController = new TabController(length: 3, vsync: this); WidgetsBinding.instance.addPostFrameCallback((_) { - if (authProvider.isLogin) getPatientAppointmentHistory(); + if (authenticatedUserObject.isLogin) getPatientAppointmentHistory(); }); super.initState(); } @@ -87,6 +89,11 @@ class _MyAppointmentsState extends State widget.bookedAppoList.clear(); widget.confirmedAppoList.clear(); widget.arrivedAppoList.clear(); + + widget._patientBookedAppointmentListHospital.clear(); + widget._patientConfirmedAppointmentListHospital.clear(); + widget._patientArrivedAppointmentListHospital.clear(); + service.getPatientAppointmentHistory(false, context).then((res) { print(res['AppoimentAllHistoryResultList'].length); if (res['MessageStatus'] == 1) {