feat(dashboard): isolate needs attention into dedicated endpoint and provider

This commit is contained in:
ssbg04 committed 2026-10-11 20:13:27 +08:00
1 parent 2416a598a1
commit 502b2ea9f1
6 files changed
+38 -10

No files matched your search

@@ -66,4 +66,15 @@ class DashboardRepository {
throw Exception(e.response?.data['message'] ?? 'Failed to fetch KPIs.');
}
}
Future<NeedsAttentionData> getNeedsAttention() async {
try {
final options = await _getAuthOptions();
final response = await _dio.get('/dashboard/needs-attention', options: options);
return NeedsAttentionData.fromJson(response.data as Map<String, dynamic>);
} on DioException catch (e) {
throw Exception(e.response?.data['message'] ?? 'Failed to fetch Needs Attention data.');
}
}
}