From 55f1e4166e8101ecb109ba3ff09a7110c4d28b9b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 29 Oct 2023 16:13:34 +0300 Subject: [PATCH] updates --- lib/core/service/client/base_app_client.dart | 2 +- .../widgets/AppointmentActions.dart | 21 ++++++++++++++++--- lib/pages/ToDoList/ToDo.dart | 7 ++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index bf6bff20..313742fa 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -150,7 +150,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 2001273; //3844083 + // body['PatientID'] = 4767512; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 8068c541..0802f91d 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -73,7 +73,8 @@ class _AppointmentActionsState extends State { shrinkWrap: true, itemBuilder: (context, index) { // bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule"); - bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc")); + bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") || + (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc")); return InkWell( onTap: shouldEnable ? null @@ -583,12 +584,26 @@ class _AppointmentActionsState extends State { navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) { if (widget.projectViewModel.isLogin) { if (model.count != 0) { - Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + Navigator.push( + context, + FadePage( + page: ToDo( + isShowAppBar: true, + isFromMyAppointments: true, + appointment: widget.appo, + ))); } else { AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); } } else { - Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + Navigator.push( + context, + FadePage( + page: ToDo( + isShowAppBar: true, + isFromMyAppointments: true, + appointment: widget.appo, + ))); } } diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 75290ab1..b147f6c1 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -55,8 +55,10 @@ class ToDo extends StatefulWidget { bool isShowAppBar = true; Function onBackClick; + bool isFromMyAppointments; + AppoitmentAllHistoryResultList appointment; - ToDo({@required this.isShowAppBar, this.onBackClick}); + ToDo({@required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment}); @override _ToDoState createState() => _ToDoState(); @@ -833,6 +835,9 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { }); } dataLoaded = true; + if(widget.isFromMyAppointments) { + getPatientShare(context, widget.appointment); + } }); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']);