feat(dashboard): show document status distribution count over total requirements
This commit is contained in:
1 parent
e3452099cd
commit
fa0df9ed40
4 files changed
+29
-10
No files matched your search
@@ -216,11 +216,17 @@ class ActivityByDayEntry {
|
||||
class StatusDistributionEntry {
|
||||
final String status;
|
||||
final int count;
|
||||
const StatusDistributionEntry({required this.status, required this.count});
|
||||
final int total;
|
||||
const StatusDistributionEntry({
|
||||
required this.status,
|
||||
required this.count,
|
||||
this.total = 0,
|
||||
});
|
||||
factory StatusDistributionEntry.fromJson(Map<String, dynamic> j) =>
|
||||
StatusDistributionEntry(
|
||||
status: j['status'] as String? ?? '',
|
||||
count: (j['count'] as num?)?.toInt() ?? 0,
|
||||
total: (j['total'] as num?)?.toInt() ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user