show different no access message when pending or declined
This commit is contained in:
@@ -236,13 +236,22 @@ class _BuildPatientsListState extends State<BuildPatientAccessList> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void noAccessWarning() {
|
void noAccessWarning(int index) {
|
||||||
showDialog(
|
if (widget.patientAccesses[index].status == "pending") {
|
||||||
context: context,
|
showDialog(
|
||||||
builder: (context) {
|
context: context,
|
||||||
return const MIHWarningMessage(warningType: "No Access");
|
builder: (context) {
|
||||||
},
|
return const MIHWarningMessage(warningType: "No Access");
|
||||||
);
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return const MIHWarningMessage(warningType: "Access Declined");
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAccessToProfile(int index) {
|
bool hasAccessToProfile(int index) {
|
||||||
@@ -417,7 +426,7 @@ class _BuildPatientsListState extends State<BuildPatientAccessList> {
|
|||||||
});
|
});
|
||||||
patientProfileChoicePopUp(index, p);
|
patientProfileChoicePopUp(index, p);
|
||||||
} else {
|
} else {
|
||||||
noAccessWarning();
|
noAccessWarning(index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
|
|||||||
Reference in New Issue
Block a user