@php
$taskTypes = ['meeting', 'court-filing', 'draft-review', 'call', 'follow-up', 'internal-task', 'other'];
$typeCounts = [];
foreach($taskTypes as $type) {
$typeCounts[$type] = \App\Models\Diary::where('task_type', $type)->count();
}
@endphp
@foreach($taskTypes as $type)
@if($typeCounts[$type] > 0)
{{ ucwords(str_replace('-', ' ', $type)) }}
{{ $typeCounts[$type] }}
@endif
@endforeach