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