Skip to content

Commit c60386e

Browse files
authored
Fix calculation of incident badge (#199)
1 parent 0f58a9d commit c60386e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Filament/Resources/IncidentResource.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ public static function getPluralLabel(): ?string
227227

228228
public static function getNavigationBadge(): ?string
229229
{
230-
return static::getModel()::unresolved()->count();
230+
return static::getModel()::unresolved()
231+
->get()
232+
->filter(fn (Incident $incident) => in_array($incident->latest_status, IncidentStatusEnum::unresolved()))->count();
231233
}
232234

233235
public static function getNavigationBadgeColor(): string

0 commit comments

Comments
 (0)