From 3680fc57c4c50f74b7907ed3bc41e66d1afb734c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 12 Aug 2022 14:20:16 +0300 Subject: [PATCH] Dashboard overview --- lib/redux/dashboard/dashboard_selectors.dart | 3 ++- lib/ui/dashboard/dashboard_panels.dart | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/redux/dashboard/dashboard_selectors.dart b/lib/redux/dashboard/dashboard_selectors.dart index 58cf6b292..8054c8bdc 100644 --- a/lib/redux/dashboard/dashboard_selectors.dart +++ b/lib/redux/dashboard/dashboard_selectors.dart @@ -20,8 +20,9 @@ class ChartDataGroup { Map> entityMap = {}; List> chartSeries; double preriodTotal = 0.0; - double average = 0.0; double previousTotal = 0.0; + double total = 0.0; + double average = 0.0; } class ChartMoneyData { diff --git a/lib/ui/dashboard/dashboard_panels.dart b/lib/ui/dashboard/dashboard_panels.dart index 65a4984f3..5f2d580a2 100644 --- a/lib/ui/dashboard/dashboard_panels.dart +++ b/lib/ui/dashboard/dashboard_panels.dart @@ -659,6 +659,16 @@ class DashboardPanels extends StatelessWidget { Text(formatNumber(0, context), style: textTheme.headline5, textAlign: TextAlign.center), + if (settings.showTotal) ...[ + SizedBox(height: 20), + Text(localization.total, + style: textTheme.subtitle1, + textAlign: TextAlign.center), + SizedBox(height: 4), + Text(formatNumber(0, context), + style: textTheme.headline5, + textAlign: TextAlign.center), + ] ], ); }).toList(),