Skip to content

Commit cfbce6f

Browse files
committed
fix: add overdue_checklists to ResearchProgressWidget stats
1 parent feb307b commit cfbce6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Livewire/ResearchProgressWidget.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class ResearchProgressWidget extends Component
2121
'total_checklists' => 0,
2222
'completed_checklists' => 0,
2323
'in_progress_checklists' => 0,
24+
'overdue_checklists' => 0,
2425
'completion_rate' => 0,
2526
'overall_progress' => 0,
2627
];
@@ -106,10 +107,13 @@ protected function refreshData(): void
106107
// Overall progress approximated by completion rate when item-level data not available
107108
$overallProgress = $completionRate;
108109

110+
$overdue = (clone $base)->overdue()->count();
111+
109112
$this->stats = [
110113
'total_checklists' => $total,
111114
'completed_checklists' => $completed,
112115
'in_progress_checklists' => $inProgress,
116+
'overdue_checklists' => $overdue,
113117
'completion_rate' => $completionRate,
114118
'overall_progress' => $overallProgress,
115119
];

0 commit comments

Comments
 (0)