|
|
|
|
@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
|
|
|
|
|
@ -14,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAl
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
|
|
|
|
|
@ -57,6 +59,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
|
var size = MediaQuery.of(context).size;
|
|
|
|
|
final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
|
|
|
|
|
final double itemWidth = size.width / 2;
|
|
|
|
|
@ -72,7 +75,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
onTap: shouldEnable
|
|
|
|
|
? null
|
|
|
|
|
: () {
|
|
|
|
|
_handleButtonClicks(appoButtonsList[index]);
|
|
|
|
|
_handleButtonClicks(appoButtonsList[index], model);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: appoButtonsList[index].title,
|
|
|
|
|
@ -88,7 +91,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_handleButtonClicks(AppoDetailsButton) {
|
|
|
|
|
_handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) {
|
|
|
|
|
switch (AppoDetailsButton.caller) {
|
|
|
|
|
case "openReschedule":
|
|
|
|
|
widget.tabController.animateTo((widget.tabController.index + 1) % 2);
|
|
|
|
|
@ -113,7 +116,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
case "goToTodoList":
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
|
navigateToToDoPage(context, model);
|
|
|
|
|
break;
|
|
|
|
|
case "askDoc":
|
|
|
|
|
askYourDoc();
|
|
|
|
|
@ -556,6 +560,18 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
|
|
|
|
|
if (widget.projectViewModel.isLogin) {
|
|
|
|
|
if (model.count != 0) {
|
|
|
|
|
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rateAppointment() {
|
|
|
|
|
widget.browser = new MyInAppBrowser();
|
|
|
|
|
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';
|
|
|
|
|
|