From 99282eb9dad873fe18f58ec435274559d8d22b88 Mon Sep 17 00:00:00 2001 From: esche Date: Mon, 19 Jun 2023 12:12:18 +0200 Subject: [PATCH] bugfix for finance cards --- Frontend-user/lib/finance.dart | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Frontend-user/lib/finance.dart b/Frontend-user/lib/finance.dart index 6a837f1..c4fe843 100644 --- a/Frontend-user/lib/finance.dart +++ b/Frontend-user/lib/finance.dart @@ -31,6 +31,7 @@ class Finance extends StatefulWidget { State createState() => _Finance(); } +//sample data class _Finance extends State { final List transactions = [ Transaction(Art.monatlBeitrag, 0, now, ''), @@ -51,6 +52,11 @@ class _Finance extends State { Transaction(Art.monatlBeitrag, 0, now, ''), Transaction(Art.aufladung, 2042, now, ''), Transaction(Art.einkauf, -2442, now.subtract(const Duration(days: 2)), ''), + Transaction(Art.korrektur, 2332, now.subtract(const Duration(hours: 5)), + 'Korrektur des Warenkorbs'), + Transaction(Art.monatlBeitrag, 0, now, ''), + Transaction(Art.aufladung, 2042, now, ''), + Transaction(Art.einkauf, -2442, now.subtract(const Duration(days: 2)), ''), Transaction(Art.korrektur, 2332, now.subtract(const Duration(hours: 5)), 'Korrektur des Warenkorbs') ]; @@ -122,9 +128,10 @@ class _Finance extends State { '${transactions[index].art}: ${transactions[index].betrag / 100}€'), ], ), - Expand( - expand: transactions[index].elevated, - child: Text(transactions[index].beschreibung)) + if (transactions[index].beschreibung != '') + Expand( + expand: transactions[index].elevated, + child: Text(transactions[index].beschreibung)) ], ), ],