@extends('layouts.app', ['title' => 'Dashboard', 'showNav' => true]) @push('styles') @endpush @section('content')

Dashboard

Add animal
{{-- Summary row --}}
Total animals
{{ $stats['totals']['all'] }}
Active animals
{{ $stats['active']['all'] }}
{{-- Per-category cards --}}
@foreach($categories as $cat) @php $clr = $colors[$cat]; @endphp
{{ $labels[$cat] }}
{{ $stats['totals'][$cat] }}
Active: {{ $stats['active'][$cat] }} Inactive: {{ $stats['totals'][$cat] - $stats['active'][$cat] }}
@endforeach
{{-- Visual bar charts --}} @php $maxTotal = max(1, max($stats['totals']['all'], 1)); @endphp
Total by category
@foreach($categories as $cat) @php $pct = $maxTotal ? round($stats['totals'][$cat] / $maxTotal * 100) : 0; @endphp
{{ $labels[$cat] }}
{{ $stats['totals'][$cat] }}
@endforeach
Active by category
@foreach($categories as $cat) @php $pct = $maxTotal ? round($stats['active'][$cat] / $maxTotal * 100) : 0; @endphp
{{ $labels[$cat] }}
{{ $stats['active'][$cat] }}
@endforeach
@endsection