Skip to content

Commit

Permalink
fix: 23/12/2023 6:29
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomjerry12345 committed Dec 22, 2023
1 parent 2fca8c3 commit ccf34a2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
18 changes: 10 additions & 8 deletions lib/screens/peminjaman/section/detail_peminjaman.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,16 @@ class _DetailPeminjamanState extends State<DetailPeminjaman> {
onPengembalian(data);
},
)
: ButtonElevatedWidget(
"Konfirmasi",
backgroundColor: Colors.green,
fontSize: fontSizeDataCell,
onPressed: () {
onKonfirmasi(id);
},
)),
: data["type_peminjaman"] != "online"
? ButtonElevatedWidget(
"Konfirmasi",
backgroundColor: Colors.green,
fontSize: fontSizeDataCell,
onPressed: () {
onKonfirmasi(id);
},
)
: Container()),
DataCell(ButtonElevatedWidget(
"Perpanjangan",
backgroundColor: Colors.blue,
Expand Down
5 changes: 2 additions & 3 deletions lib/screens/pengembalian/section/detail_pengembalian.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class _DetailPengembalianState extends State<DetailPengembalian> {
],
rows: List<DataRow>.generate(size, (index) {
Map<String, dynamic> data = snapDocs![index].data();
String id = snapDocs[index].id;
final number = index + 1;

return DataRow(cells: [
Expand All @@ -74,9 +73,9 @@ class _DetailPengembalianState extends State<DetailPengembalian> {
data['judul_buku']!,
fontSize: fontSizeDataCell,
)),
DataCell(TextWidget(data['sisa_hari']!,
DataCell(TextWidget(data['sisa_hari'] ?? "-",
color: Colors.black, fontSize: fontSizeDataCell)),
DataCell(TextWidget("${data['denda']!}",
DataCell(TextWidget("${data['denda'] ?? "-"}",
fontSize: fontSizeDataCell)),
DataCell(Container(
padding: EdgeInsets.symmetric(vertical: 8),
Expand Down
21 changes: 10 additions & 11 deletions lib/screens/scan/section/scan_peminjaman.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class _ScanPeminjamanState extends State<ScanPeminjaman> {
}

void onPengembalian(Map<String, dynamic> data) {
print(data);
fs.add("pengembalian", {
"email": data["email"],
"nama_peminjam": data["nama_peminjam"],
Expand Down Expand Up @@ -198,16 +197,16 @@ class _ScanPeminjamanState extends State<ScanPeminjaman> {
onPengembalian(data);
},
)
: data["type_peminjaman"] != "online"
? ButtonElevatedWidget(
"Konfirmasi",
backgroundColor: Colors.green,
fontSize: fontSizeDataCell,
onPressed: () {
onKonfirmasi(id);
},
)
: Container()),
: ButtonElevatedWidget(
"Konfirmasi",
backgroundColor: Colors.green,
fontSize: fontSizeDataCell,
onPressed: () {
data["type_peminjaman"]! != "online"
? onKonfirmasi(id)
: null;
},
)),
DataCell(ButtonElevatedWidget(
"Perpanjangan",
backgroundColor: Colors.blue,
Expand Down
5 changes: 3 additions & 2 deletions task.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: v0.0.2 ✅ ❌ 🔥
version: v0.0.3 ✅ ❌ 🔥
- hilangkan tombol konfirmasi di peminjaman ketika melakukan peminjaman online ✅

version: v0.0.2 ✅ ❌ 🔥
- perbaiki bug tambah buku ✅

version: v0.0.1 ✅ ❌ 🔥

- Buat logic untuk konfirmasi di peminjaman ✅
- Buat logic untuk perpanjangan di peminjaman ✅
- Buat logic untuk hapus peminjaman ✅
Expand Down

0 comments on commit ccf34a2

Please sign in to comment.