Skip to content

Commit

Permalink
fix: 15/01/2024 2:37
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomjerry12345 committed Jan 14, 2024
1 parent 6e1478f commit fb3b1af
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
73 changes: 42 additions & 31 deletions lib/screens/buku_tamu/buku_tamu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,44 +29,55 @@ class _BukuTamuState extends State<BukuTamu> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Data Anggota",
"Buku Tamu",
style: TextStyle(
fontSize: 25, fontWeight: FontWeight.w600),
),
],
),
),
Padding(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 40, top: 15),
child: Column(
children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: DataTable(
headingRowColor:
MaterialStateProperty.resolveWith(
(states) => Colors.blue.shade200),
columns: [
DataColumn(label: Text("Nama")),
DataColumn(label: Text("Tanggal berkunjung")),
],
rows: List<DataRow>.generate(
snapshot.data!.docs.length, (index) {
DocumentSnapshot data =
snapshot.data!.docs[index];
Card(
color: Colors.black54,
child: Padding(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 40, top: 15),
child: Column(
children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: DataTable(
headingRowColor:
MaterialStateProperty.resolveWith(
(states) => Colors.blue.shade200),
columns: [
DataColumn(label: Text("No anggota")),
DataColumn(label: Text("Nama")),
DataColumn(label: Text("Alamat")),
DataColumn(label: Text("Tanggal berkunjung")),
DataColumn(label: Text("Pekerjaan")),
DataColumn(label: Text("No Hp")),
],
rows: List<DataRow>.generate(
snapshot.data!.docs.length, (index) {
DocumentSnapshot data =
snapshot.data!.docs[index];

return DataRow(cells: [
DataCell(Text(data['nama'])),
DataCell(Text(data['tanggal'])),
]);
})),
),
//Now let's set the pagination
SizedBox(
height: 40.0,
),
],
return DataRow(cells: [
DataCell(Text(data['no_anggota'])),
DataCell(Text(data['nama'])),
DataCell(Text(data['alamat'])),
DataCell(Text(data['tanggal'])),
DataCell(Text(data['pekerjaan'])),
DataCell(Text(data['noHp'])),
]);
})),
),
//Now let's set the pagination
SizedBox(
height: 40.0,
),
],
),
),
),
],
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/dashboard_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
label: Text("Data Buku"),
),
NavigationRailDestination(
icon: Icon(Icons.library_books),
icon: Icon(Icons.book),
label: Text("Peminjaman"),
),
// NavigationRailDestination(
Expand All @@ -105,7 +105,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
label: Text("Pengembalian"),
),
NavigationRailDestination(
icon: Icon(Icons.group),
icon: Icon(Icons.menu),
label: Text("Buku tamu"),
),
NavigationRailDestination(
Expand Down

0 comments on commit fb3b1af

Please sign in to comment.