From 99a9b47a19b57a5a50780e7c0ffea1137ab78ea2 Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Mon, 23 Jun 2025 15:52:58 +0530 Subject: [PATCH] feat: Enhance attendance chart visibility based on project selection --- lib/view/dashboard/dashboard_screen.dart | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/view/dashboard/dashboard_screen.dart b/lib/view/dashboard/dashboard_screen.dart index bb3e0b6..5aa671a 100644 --- a/lib/view/dashboard/dashboard_screen.dart +++ b/lib/view/dashboard/dashboard_screen.dart @@ -59,9 +59,27 @@ class _DashboardScreenState extends State with UIMixin { MySpacing.height(12), _buildDashboardStats(), MySpacing.height(24), - AttendanceDashboardChart(), - - MySpacing.height(300), + GetBuilder( + id: 'dashboard_controller', + builder: (projectController) { + final bool isProjectSelected = + projectController.selectedProject != null; + + return Opacity( + opacity: isProjectSelected ? 1.0 : 0.4, + child: IgnorePointer( + ignoring: !isProjectSelected, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AttendanceDashboardChart(), + MySpacing.height(300), + ], + ), + ), + ); + }, + ), if (!hasMpin) ...[ MyCard( borderRadiusAll: 12,