|
|
@ -4,12 +4,14 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
@ -22,6 +24,7 @@ import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_countdown_timer/current_remaining_time.dart';
|
|
|
|
import 'package:flutter_countdown_timer/current_remaining_time.dart';
|
|
|
|
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
|
|
|
|
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ToDo extends StatefulWidget {
|
|
|
|
class ToDo extends StatefulWidget {
|
|
|
@ -47,8 +50,11 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
|
|
|
|
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ToDoCountProviderModel toDoProvider;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
|
|
|
|
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
widget.patientShareResponse = new PatientShareResponse();
|
|
|
|
widget.patientShareResponse = new PatientShareResponse();
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
if (authenticatedUserObject.isLogin) getPatientData();
|
|
|
|
if (authenticatedUserObject.isLogin) getPatientData();
|
|
|
@ -514,6 +520,19 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getToDoCount() {
|
|
|
|
|
|
|
|
toDoProvider.setState(0, true);
|
|
|
|
|
|
|
|
ClinicListService service = new ClinicListService();
|
|
|
|
|
|
|
|
service.getActiveAppointmentNo(context).then((res) {
|
|
|
|
|
|
|
|
print(res['AppointmentActiveNumber']);
|
|
|
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
|
|
|
toDoProvider.setState(res['AppointmentActiveNumber'], true);
|
|
|
|
|
|
|
|
} else {}
|
|
|
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
|
|
|
print(err);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getPatientAppointmentHistory() {
|
|
|
|
getPatientAppointmentHistory() {
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
@ -529,11 +548,7 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {}
|
|
|
|
} else {}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
widget.appoList.forEach((element) {
|
|
|
|
getToDoCount();
|
|
|
|
print(element.isLiveCareAppointment);
|
|
|
|
|
|
|
|
print(element.nextAction);
|
|
|
|
|
|
|
|
print(element.remaniningHoursTocanPay);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|