@extends('layouts.admin') @section('content')
{{-- Header --}}

{{ __('Machine Inventory Overview') }}

{{ __('Real-time slot-level inventory across all machines') }}

{{-- Table --}}
@forelse($machines as $machine) @php $maxStock = $machine->slots->sum('max_stock') ?: 1; $currentStock = (int)($machine->total_stock ?? 0); $fillRate = round(($currentStock / $maxStock) * 100); $fillColor = $fillRate >= 50 ? 'emerald' : ($fillRate >= 20 ? 'amber' : 'rose'); @endphp @empty @endforelse
{{ __('Machine') }} {{ __('Serial No.') }} {{ __('Slots') }} {{ __('Total Stock') }} {{ __('Fill Rate') }} {{ __('Actions') }}
{{ $machine->name }} {{ $machine->serial_no }} {{ $machine->total_slots ?? 0 }} {{ $currentStock }}
{{ $fillRate }}%
{{ __('No machines found') }}
{{ $machines->links('vendor.pagination.luxury') }}
{{-- Slot Drawer --}}

{{ __('Loading...') }}
{{ __('No slot data') }}
@endsection