my appointment fixes

merge-update-with-lab-changes
haroon amjad 5 years ago
parent 506e32e8c8
commit 10efccbce8

@ -235,7 +235,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
return children; return children;
}, },
), ),
onDaySelected: (date, events,holidays) { onDaySelected: (date, events, holidays) {
_onDaySelected(date, events); _onDaySelected(date, events);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },

@ -348,7 +348,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
return children; return children;
}, },
), ),
onDaySelected: (date, event,holidays) { onDaySelected: (date, event, holidays) {
_onDaySelected( _onDaySelected(
date, date,
event, event,

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; 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/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart';
@ -34,13 +36,13 @@ class _MyAppointmentsState extends State<MyAppointments>
bool isDataLoaded = false; bool isDataLoaded = false;
var sharedPref = new AppSharedPreferences(); var sharedPref = new AppSharedPreferences();
var authProvider = new AuthProvider(); AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (authProvider.isLogin) getPatientAppointmentHistory(); if (authenticatedUserObject.isLogin) getPatientAppointmentHistory();
}); });
super.initState(); super.initState();
} }
@ -87,6 +89,11 @@ class _MyAppointmentsState extends State<MyAppointments>
widget.bookedAppoList.clear(); widget.bookedAppoList.clear();
widget.confirmedAppoList.clear(); widget.confirmedAppoList.clear();
widget.arrivedAppoList.clear(); widget.arrivedAppoList.clear();
widget._patientBookedAppointmentListHospital.clear();
widget._patientConfirmedAppointmentListHospital.clear();
widget._patientArrivedAppointmentListHospital.clear();
service.getPatientAppointmentHistory(false, context).then((res) { service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length); print(res['AppoimentAllHistoryResultList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

Loading…
Cancel
Save