<?php

namespace App\Http\Controllers;

use App\Models\Inventario;
use Illuminate\View\View;

class ReposicionInventarioController extends Controller
{
    public function index(): View
    {
        $items = Inventario::with(['categoria', 'departamento', 'unidad'])
            ->where('active', true)
            ->whereColumn('stock_actual', '<=', 'stock_min')
            ->orderBy('nombre')
            ->get();

        return view('reposicion.index', compact('items'));
    }
}
