@forelse($topBarang as $index => $item)
@php
$pct = round(($item->jumlah_perawatan / $maxCount) * 100);
$colors = ['#ef4444','#f97316','#f59e0b','#84cc16','#22c55e','#14b8a6','#3b82f6','#8b5cf6','#ec4899','#6b7280'];
$color = $colors[$index] ?? '#6b7280';
$medal = $index == 0 ? '1' : ($index == 1 ? '2' : ($index == 2 ? '3' : ''));
@endphp
{{ $medal ?: ($index + 1) . '.' }}
{{ $item->nama_item }}
{{ $item->kode_barang }}
@if($item->ruangan) · {{ $item->ruangan->nama_ruangan }} @endif
@if($item->kondisi == 'Baik')
Baik
@elseif($item->kondisi == 'Rusak Ringan')
Rusak Ringan
@else
Rusak Berat
@endif
{{ $item->jumlah_perawatan }}x
@empty
Belum ada data perawatan di {{ $namaBulanFull[$bulan] }} {{ $tahun }}
@endforelse