forked from yaso_meth/mih-project
remove delete buttom when vioewinjg note in patient mode.
This commit is contained in:
@@ -23,7 +23,7 @@ class BuildFilesList extends StatefulWidget {
|
||||
final Patient selectedPatient;
|
||||
final Business? business;
|
||||
final BusinessUser? businessUser;
|
||||
|
||||
final String type;
|
||||
const BuildFilesList({
|
||||
super.key,
|
||||
required this.files,
|
||||
@@ -31,6 +31,7 @@ class BuildFilesList extends StatefulWidget {
|
||||
required this.selectedPatient,
|
||||
required this.business,
|
||||
required this.businessUser,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -204,14 +205,17 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
||||
)
|
||||
],
|
||||
windowTools: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
deleteFilePopUp(filePath, fileID);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 35,
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
Visibility(
|
||||
visible: widget.type == "business",
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
deleteFilePopUp(filePath, fileID);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 35,
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -24,6 +24,7 @@ class BuildNotesList extends StatefulWidget {
|
||||
final Patient selectedPatient;
|
||||
final Business? business;
|
||||
final BusinessUser? businessUser;
|
||||
final String type;
|
||||
const BuildNotesList({
|
||||
super.key,
|
||||
required this.notes,
|
||||
@@ -31,6 +32,7 @@ class BuildNotesList extends StatefulWidget {
|
||||
required this.selectedPatient,
|
||||
required this.business,
|
||||
required this.businessUser,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -134,13 +136,16 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||
fullscreen: true,
|
||||
windowTitle: selectednote.note_name,
|
||||
windowTools: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
deletePatientPopUp(selectednote.idpatient_notes);
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
Visibility(
|
||||
visible: widget.type == "business",
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
deletePatientPopUp(selectednote.idpatient_notes);
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -529,6 +529,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
selectedPatient: widget.selectedPatient,
|
||||
business: widget.business,
|
||||
businessUser: widget.businessUser,
|
||||
type: widget.type,
|
||||
),
|
||||
]);
|
||||
} else {
|
||||
|
||||
@@ -440,6 +440,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
selectedPatient: widget.selectedPatient,
|
||||
business: widget.business,
|
||||
businessUser: widget.businessUser,
|
||||
type: widget.type,
|
||||
),
|
||||
]);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user