feat: Add no data message to attendance dashboard chart
This commit is contained in:
parent
95c625a55b
commit
67d78f02b7
@ -92,9 +92,11 @@ class AttendanceDashboardChart extends StatelessWidget {
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: isLoading
|
||||
? SkeletonLoaders.buildLoadingSkeleton()
|
||||
: isChartView
|
||||
? _buildChart()
|
||||
: _buildTable(),
|
||||
: filteredData.isEmpty
|
||||
? _buildNoDataMessage()
|
||||
: isChartView
|
||||
? _buildChart()
|
||||
: _buildTable(),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -236,6 +238,26 @@ class AttendanceDashboardChart extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataMessage() {
|
||||
return SizedBox(
|
||||
height: 200,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.info_outline, color: Colors.grey.shade500, size: 48),
|
||||
const SizedBox(height: 12),
|
||||
MyText.bodyMedium(
|
||||
'No attendance data available for the selected range or project.',
|
||||
textAlign: TextAlign.center,
|
||||
color: Colors.grey.shade600,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTable() {
|
||||
final formattedDateMap = {
|
||||
for (var e in filteredData)
|
||||
|
Loading…
x
Reference in New Issue
Block a user