forked from yaso_meth/mih-project
UI Update
This commit is contained in:
@@ -90,27 +90,40 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 290.0,
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider();
|
||||
},
|
||||
itemCount: widget.files.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
widget.files[index].file_name,
|
||||
),
|
||||
subtitle: Text(widget.files[index].insert_date),
|
||||
trailing: const Icon(Icons.arrow_forward),
|
||||
onTap: () {
|
||||
viewFilePopUp(widget.files[index].file_name);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
if (widget.files.isNotEmpty) {
|
||||
return SizedBox(
|
||||
height: 290.0,
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider();
|
||||
},
|
||||
itemCount: widget.files.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
widget.files[index].file_name,
|
||||
),
|
||||
subtitle: Text(widget.files[index].insert_date),
|
||||
trailing: const Icon(Icons.arrow_forward),
|
||||
onTap: () {
|
||||
viewFilePopUp(widget.files[index].file_name);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox(
|
||||
height: 290.0,
|
||||
child: Center(
|
||||
child: Text(
|
||||
"No Files Available",
|
||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,50 +97,42 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 290.0,
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider();
|
||||
},
|
||||
itemCount: widget.notes.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
widget.notes[index].note_name,
|
||||
),
|
||||
subtitle: Text(
|
||||
"${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}"), //Text(widget.notes[index].note_text),
|
||||
trailing: const Icon(Icons.arrow_forward),
|
||||
onTap: () {
|
||||
viewNotePopUp(widget.notes[index].note_name,
|
||||
"${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}");
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (context) => AlertDialog(
|
||||
// title: Center(child: Text(widget.notes[index].note_name)),
|
||||
// content: SizedBox(
|
||||
// width: 700,
|
||||
// height: 250,
|
||||
// child: Text(
|
||||
// "${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}",
|
||||
// style: TextStyle(fontSize: 16),
|
||||
// ),
|
||||
// ),
|
||||
// actions: [
|
||||
// TextButton(
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context);
|
||||
// },
|
||||
// child: const Text("Close"))
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
if (widget.notes.isNotEmpty) {
|
||||
return SizedBox(
|
||||
height: 290.0,
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider();
|
||||
},
|
||||
itemCount: widget.notes.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
widget.notes[index].note_name,
|
||||
),
|
||||
subtitle: Text(
|
||||
"${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}"), //Text(widget.notes[index].note_text),
|
||||
trailing: const Icon(Icons.arrow_forward),
|
||||
onTap: () {
|
||||
viewNotePopUp(widget.notes[index].note_name,
|
||||
"${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}");
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox(
|
||||
height: 290.0,
|
||||
child: Center(
|
||||
child: Text(
|
||||
"No Notes Available",
|
||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,67 +534,64 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
final filesList = snapshot.data!;
|
||||
return Flexible(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Container(
|
||||
//height: 300.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
border: Border.all(color: Colors.blueAccent, width: 3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
"Files",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
child: Container(
|
||||
//height: 300.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
border: Border.all(color: Colors.blueAccent, width: 3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
"Files",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
medCertPopUp();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sick_outlined,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
medCertPopUp();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sick_outlined,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
prescritionPopUp();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.medication_outlined,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
prescritionPopUp();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.medication_outlined,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
uploudFilePopUp();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.add,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Divider(color: Colors.blueAccent),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
BuildFilesList(files: filesList),
|
||||
]),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
uploudFilePopUp();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.add,
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Divider(color: Colors.blueAccent),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
BuildFilesList(files: filesList),
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -219,45 +219,42 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
final notesList = snapshot.data!;
|
||||
return Flexible(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Container(
|
||||
//height: 300.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
border: Border.all(color: Colors.blueAccent, width: 3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
"Notes",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blueAccent),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
addNotePopUp();
|
||||
},
|
||||
icon: const Icon(Icons.add, color: Colors.blueAccent),
|
||||
)
|
||||
],
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Divider(color: Colors.blueAccent),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
BuildNotesList(notes: notesList),
|
||||
]),
|
||||
),
|
||||
child: Container(
|
||||
//height: 300.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
border: Border.all(color: Colors.blueAccent, width: 3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
"Notes",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blueAccent),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
addNotePopUp();
|
||||
},
|
||||
icon: const Icon(Icons.add, color: Colors.blueAccent),
|
||||
)
|
||||
],
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Divider(color: Colors.blueAccent),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
BuildNotesList(notes: notesList),
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -32,6 +32,9 @@ class _PatientViewState extends State<PatientView> {
|
||||
PatientNotes(
|
||||
patientIndex: widget.selectedPatient.idpatients,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
PatientFiles(
|
||||
patientIndex: widget.selectedPatient.idpatients,
|
||||
selectedPatient: widget.selectedPatient,
|
||||
|
||||
Reference in New Issue
Block a user