From 075167e28565c4d48515ed83308c527fa3bdb3c7 Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Sat, 27 Sep 2025 11:30:18 +0530 Subject: [PATCH] feat: Update Dashboard Overview to display total employees instead of absent count --- .../widgets/dashbaord/dashboard_overview_widgets.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/helpers/widgets/dashbaord/dashboard_overview_widgets.dart b/lib/helpers/widgets/dashbaord/dashboard_overview_widgets.dart index fcebbd9..3ced75a 100644 --- a/lib/helpers/widgets/dashbaord/dashboard_overview_widgets.dart +++ b/lib/helpers/widgets/dashbaord/dashboard_overview_widgets.dart @@ -58,14 +58,13 @@ class DashboardOverviewWidgets { final total = dashboardController.totalEmployees.value; final inToday = dashboardController.inToday.value.clamp(0, total); - final absent = (total - inToday).clamp(0, total); final percent = total > 0 ? inToday / total : 0.0; final hasData = total > 0; final data = hasData ? [ _ChartData('In Today', inToday.toDouble(), _accentA), - _ChartData('Absent', absent.toDouble(), _muted), + _ChartData('Total', total.toDouble(), _muted), ] : [ _ChartData('No Data', 1.0, _hint), @@ -86,11 +85,11 @@ class DashboardOverviewWidgets { footer: _SingleColumnKpis( stats: { "In Today": _comma.format(inToday), - "Absent": _comma.format(absent), + "Total": _comma.format(total), }, colors: { "In Today": _accentA, - "Absent": _muted, + "Total": _muted, }, ), );