pending appointment can be cancelled but not be viewed

This commit is contained in:
2024-10-09 11:03:05 +02:00
parent 1a6df221a5
commit 6a17372e7a

View File

@@ -175,23 +175,27 @@ class _BuildPatientsListState extends State<BuildPatientQueueList> {
child: MIHButton( child: MIHButton(
onTap: () { onTap: () {
//updateAccessAPICall(index, "approved"); //updateAccessAPICall(index, "approved");
Patient selectedPatient; if (widget.patientQueue[index].access == "approved") {
fetchPatients(widget.patientQueue[index].app_id).then( Patient selectedPatient;
(result) { fetchPatients(widget.patientQueue[index].app_id).then(
setState(() { (result) {
selectedPatient = result; setState(() {
Navigator.of(context) selectedPatient = result;
.pushNamed('/patient-manager/patient', Navigator.of(context)
arguments: PatientViewArguments( .pushNamed('/patient-manager/patient',
widget.signedInUser, arguments: PatientViewArguments(
selectedPatient, widget.signedInUser,
widget.businessUser, selectedPatient,
widget.business, widget.businessUser,
"business", widget.business,
)); "business",
}); ));
}, });
); },
);
} else {
noAccessWarning();
}
}, },
buttonText: "View Patient Profile", buttonText: "View Patient Profile",
buttonColor: buttonColor:
@@ -321,7 +325,8 @@ class _BuildPatientsListState extends State<BuildPatientQueueList> {
} else if (widget.patientQueue[index].access == "cancelled") { } else if (widget.patientQueue[index].access == "cancelled") {
appointmentCancelledWarning(); appointmentCancelledWarning();
} else { } else {
noAccessWarning(); viewConfirmationPopUp(index);
//noAccessWarning();
} }
}, },
trailing: Icon( trailing: Icon(