feat: Enhance attendance chart visibility based on project selection

This commit is contained in:
Vaibhav Surve 2025-06-23 15:52:58 +05:30
parent 67d78f02b7
commit 99a9b47a19

View File

@ -59,9 +59,27 @@ class _DashboardScreenState extends State<DashboardScreen> with UIMixin {
MySpacing.height(12),
_buildDashboardStats(),
MySpacing.height(24),
AttendanceDashboardChart(),
MySpacing.height(300),
GetBuilder<ProjectController>(
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,