testing fix

This commit is contained in:
2025-03-04 13:56:57 +02:00
parent 23dbe21a2c
commit b051082c9a
4 changed files with 61 additions and 56 deletions

View File

@@ -135,7 +135,8 @@ class MihMzansiCalendarApis {
if (response.statusCode == 200) { if (response.statusCode == 200) {
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).pop(); Navigator.of(context).pop();
if (inWaitingRoom) { Navigator.of(context).pop();
if (inWaitingRoom == true && personalSelected == false) {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/patient-manager', '/patient-manager',
arguments: PatManagerArguments( arguments: PatManagerArguments(
@@ -150,7 +151,7 @@ class MihMzansiCalendarApis {
'/calendar', '/calendar',
arguments: CalendarArguments( arguments: CalendarArguments(
signedInUser, signedInUser,
false, personalSelected,
business, business,
businessUser, businessUser,
), ),
@@ -265,6 +266,7 @@ class MihMzansiCalendarApis {
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context);
String message = String message =
"Your appointment \"$title\" for the $date $title has been deleted."; "Your appointment \"$title\" for the $date $title has been deleted.";
@@ -391,7 +393,7 @@ class MihMzansiCalendarApis {
}), }),
); );
if (response.statusCode == 200) { if (response.statusCode == 200) {
// Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
String message = String message =
@@ -453,7 +455,7 @@ class MihMzansiCalendarApis {
}), }),
); );
if (response.statusCode == 200) { if (response.statusCode == 200) {
// Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
String message = String message =
@@ -515,13 +517,14 @@ class MihMzansiCalendarApis {
}), }),
); );
if (response.statusCode == 200) { if (response.statusCode == 200) {
// Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
String message = String message =
"Your appointment \"$title\" has been updates to the $date $title."; "Your appointment \"$title\" has been updates to the $date $title.";
Navigator.pop(context); // Navigator.pop(context);
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/patient-manager', '/patient-manager',
arguments: PatManagerArguments( arguments: PatManagerArguments(

View File

@@ -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).pop(); Navigator.of(context).pop();
Navigator.of(context).pop();
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/patient-manager', '/patient-manager',
arguments: PatManagerArguments( arguments: PatManagerArguments(

View File

@@ -446,33 +446,33 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
MzanziInnovationHub.of(context)!.theme.primaryColor(), MzanziInnovationHub.of(context)!.theme.primaryColor(),
), ),
), ),
SizedBox( // SizedBox(
width: 500, // width: 500,
height: 50, // height: 50,
child: MIHButton( // child: MIHButton(
onTap: () { // onTap: () {
setState(() { // setState(() {
widget.titleController.text = // widget.titleController.text =
widget.appointmentList[index].title; // widget.appointmentList[index].title;
widget.descriptionIDController.text = // widget.descriptionIDController.text =
widget.appointmentList[index].description; // widget.appointmentList[index].description;
widget.dateController.text = widget // widget.dateController.text = widget
.appointmentList[index].date_time // .appointmentList[index].date_time
.split('T')[0]; // .split('T')[0];
widget.timeController.text = widget // widget.timeController.text = widget
.appointmentList[index].date_time // .appointmentList[index].date_time
.split('T')[1] // .split('T')[1]
.substring(0, 5); // .substring(0, 5);
}); // });
Navigator.of(context).pop(); // Navigator.of(context).pop();
}, // },
buttonText: "Cancel", // buttonText: "Cancel",
buttonColor: // buttonColor:
MzanziInnovationHub.of(context)!.theme.errorColor(), // MzanziInnovationHub.of(context)!.theme.errorColor(),
textColor: // textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(), // MzanziInnovationHub.of(context)!.theme.primaryColor(),
), // ),
), // ),
], ],
) )
], ],
@@ -557,6 +557,7 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
} }
void deleteAppointmentCall(int index) { void deleteAppointmentCall(int index) {
print("personal selected: ${widget.personalSelected}");
MihMzansiCalendarApis.deleteAppointmentAPICall( MihMzansiCalendarApis.deleteAppointmentAPICall(
widget.signedInUser, widget.signedInUser,
widget.personalSelected, widget.personalSelected,

View File

@@ -411,7 +411,7 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
), ),
), ),
Text( 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( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!.theme.errorColor(), color: MzanziInnovationHub.of(context)!.theme.errorColor(),
@@ -420,29 +420,29 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
], ],
), ),
), ),
const SizedBox(height: 20.0), // const SizedBox(height: 15.0),
Wrap(runSpacing: 10, spacing: 10, children: [ Wrap(runSpacing: 10, spacing: 10, children: [
Visibility( // Visibility(
visible: hasAccess, // visible: hasAccess,
child: SizedBox( // child: SizedBox(
width: 300, // width: 300,
height: 50, // height: 50,
child: MIHButton( // child: MIHButton(
buttonText: "Book Appointment", // buttonText: "Book Appointment",
buttonColor: // buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), // MzanziInnovationHub.of(context)!.theme.secondaryColor(),
textColor: // textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(), // MzanziInnovationHub.of(context)!.theme.primaryColor(),
onTap: () { // onTap: () {
if (hasAccess) { // if (hasAccess) {
appointmentPopUp(index); // appointmentPopUp(index);
} else { // } else {
noAccessWarning(); // noAccessWarning();
} // }
}, // },
), // ),
), // ),
), // ),
Visibility( Visibility(
visible: hasAccess, visible: hasAccess,
child: SizedBox( child: SizedBox(