From b051082c9a987e4b252a8d7feeb97a85397b5b1e Mon Sep 17 00:00:00 2001 From: yaso Date: Tue, 4 Mar 2025 13:56:57 +0200 Subject: [PATCH] testing fix --- .../mih_apis/mih_mzansi_calendar_apis.dart | 15 +++-- .../lib/mih_apis/mih_notification_apis.dart | 1 + .../builder/build_appointment_list.dart | 55 ++++++++++--------- .../build_mih_patient_search_list.dart | 46 ++++++++-------- 4 files changed, 61 insertions(+), 56 deletions(-) diff --git a/Frontend/lib/mih_apis/mih_mzansi_calendar_apis.dart b/Frontend/lib/mih_apis/mih_mzansi_calendar_apis.dart index f5388b96..d71d4e04 100644 --- a/Frontend/lib/mih_apis/mih_mzansi_calendar_apis.dart +++ b/Frontend/lib/mih_apis/mih_mzansi_calendar_apis.dart @@ -135,7 +135,8 @@ class MihMzansiCalendarApis { if (response.statusCode == 200) { Navigator.of(context).pop(); Navigator.of(context).pop(); - if (inWaitingRoom) { + Navigator.of(context).pop(); + if (inWaitingRoom == true && personalSelected == false) { Navigator.of(context).pushNamed( '/patient-manager', arguments: PatManagerArguments( @@ -150,7 +151,7 @@ class MihMzansiCalendarApis { '/calendar', arguments: CalendarArguments( signedInUser, - false, + personalSelected, business, businessUser, ), @@ -265,6 +266,7 @@ class MihMzansiCalendarApis { Navigator.pop(context); Navigator.pop(context); Navigator.pop(context); + Navigator.pop(context); String message = "Your appointment \"$title\" for the $date $title has been deleted."; @@ -391,7 +393,7 @@ class MihMzansiCalendarApis { }), ); if (response.statusCode == 200) { - // Navigator.pop(context); + Navigator.pop(context); Navigator.pop(context); Navigator.pop(context); String message = @@ -453,7 +455,7 @@ class MihMzansiCalendarApis { }), ); if (response.statusCode == 200) { - // Navigator.pop(context); + Navigator.pop(context); Navigator.pop(context); Navigator.pop(context); String message = @@ -515,13 +517,14 @@ class MihMzansiCalendarApis { }), ); if (response.statusCode == 200) { - // Navigator.pop(context); + Navigator.pop(context); + Navigator.pop(context); Navigator.pop(context); Navigator.pop(context); String message = "Your appointment \"$title\" has been updates to the $date $title."; - Navigator.pop(context); + // Navigator.pop(context); Navigator.of(context).pushNamed( '/patient-manager', arguments: PatManagerArguments( diff --git a/Frontend/lib/mih_apis/mih_notification_apis.dart b/Frontend/lib/mih_apis/mih_notification_apis.dart index ba62292d..ab84d871 100644 --- a/Frontend/lib/mih_apis/mih_notification_apis.dart +++ b/Frontend/lib/mih_apis/mih_notification_apis.dart @@ -252,6 +252,7 @@ class MihNotificationApis { Navigator.of(context).pop(); Navigator.of(context).pop(); Navigator.of(context).pop(); + Navigator.of(context).pop(); Navigator.of(context).pushNamed( '/patient-manager', arguments: PatManagerArguments( diff --git a/Frontend/lib/mih_packages/calendar/builder/build_appointment_list.dart b/Frontend/lib/mih_packages/calendar/builder/build_appointment_list.dart index 8bd78efe..a440069b 100644 --- a/Frontend/lib/mih_packages/calendar/builder/build_appointment_list.dart +++ b/Frontend/lib/mih_packages/calendar/builder/build_appointment_list.dart @@ -446,33 +446,33 @@ class _BuildAppointmentListState extends State { MzanziInnovationHub.of(context)!.theme.primaryColor(), ), ), - SizedBox( - width: 500, - height: 50, - child: MIHButton( - onTap: () { - setState(() { - widget.titleController.text = - widget.appointmentList[index].title; - widget.descriptionIDController.text = - widget.appointmentList[index].description; - widget.dateController.text = widget - .appointmentList[index].date_time - .split('T')[0]; - widget.timeController.text = widget - .appointmentList[index].date_time - .split('T')[1] - .substring(0, 5); - }); - Navigator.of(context).pop(); - }, - buttonText: "Cancel", - buttonColor: - MzanziInnovationHub.of(context)!.theme.errorColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - ), - ), + // SizedBox( + // width: 500, + // height: 50, + // child: MIHButton( + // onTap: () { + // setState(() { + // widget.titleController.text = + // widget.appointmentList[index].title; + // widget.descriptionIDController.text = + // widget.appointmentList[index].description; + // widget.dateController.text = widget + // .appointmentList[index].date_time + // .split('T')[0]; + // widget.timeController.text = widget + // .appointmentList[index].date_time + // .split('T')[1] + // .substring(0, 5); + // }); + // Navigator.of(context).pop(); + // }, + // buttonText: "Cancel", + // buttonColor: + // MzanziInnovationHub.of(context)!.theme.errorColor(), + // textColor: + // MzanziInnovationHub.of(context)!.theme.primaryColor(), + // ), + // ), ], ) ], @@ -557,6 +557,7 @@ class _BuildAppointmentListState extends State { } void deleteAppointmentCall(int index) { + print("personal selected: ${widget.personalSelected}"); MihMzansiCalendarApis.deleteAppointmentAPICall( widget.signedInUser, widget.personalSelected, diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart index 278c76b4..43b54599 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart @@ -411,7 +411,7 @@ class _BuildPatientsListState extends State { ), ), Text( - "By pressing the \"Request Access\" button you accept the above terms.", + "By pressing the \"Request Access\" button you accept the above terms.\n", style: TextStyle( fontWeight: FontWeight.bold, color: MzanziInnovationHub.of(context)!.theme.errorColor(), @@ -420,29 +420,29 @@ class _BuildPatientsListState extends State { ], ), ), - const SizedBox(height: 20.0), + // const SizedBox(height: 15.0), Wrap(runSpacing: 10, spacing: 10, children: [ - Visibility( - visible: hasAccess, - child: SizedBox( - width: 300, - height: 50, - child: MIHButton( - buttonText: "Book Appointment", - buttonColor: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - onTap: () { - if (hasAccess) { - appointmentPopUp(index); - } else { - noAccessWarning(); - } - }, - ), - ), - ), + // Visibility( + // visible: hasAccess, + // child: SizedBox( + // width: 300, + // height: 50, + // child: MIHButton( + // buttonText: "Book Appointment", + // buttonColor: + // MzanziInnovationHub.of(context)!.theme.secondaryColor(), + // textColor: + // MzanziInnovationHub.of(context)!.theme.primaryColor(), + // onTap: () { + // if (hasAccess) { + // appointmentPopUp(index); + // } else { + // noAccessWarning(); + // } + // }, + // ), + // ), + // ), Visibility( visible: hasAccess, child: SizedBox(