@extends('admin.layouts.app') @section('title','Inventory') @section('breadcrumb') / Inventory @endsection @section('content')
{{ $stats['total_products'] }}
Total Products
{{ $stats['active_products'] }}
Active
{{ $stats['low_stock'] }}
Low Stock (<10)
{{ $stats['out_of_stock'] }}
Out of Stock
All Products
@forelse($products as $i => $product) @empty @endforelse
S.N. Product Code Category Unit Current Stock Status Actions
{{ ($products->currentPage()-1)*$products->perPage()+$i+1 }}
@if($product->product_image) @else
@endif
{{ $product->product_name }}
@if($product->description)
{{ Str::limit($product->description,40) }}
@endif
{{ $product->product_code }} {{ $product->category ?? '—' }} {{ $product->unit ?? 'pcs' }} @php $qty = $product->current_quantity; $color = $qty === 0 ? 'danger' : ($qty < 10 ? 'warning' : 'success'); @endphp {{ $qty }} @if($qty === 0) Out of stock @elseif($qty < 10) Low stock @endif {{ ucfirst($product->status) }}
@if(auth()->user()->hasPermission('products.add_stock')) @endif @if(auth()->user()->hasPermission('products.edit')) @endif @if(auth()->user()->hasPermission('products.delete')) @endif

No products found

@if($products->hasPages()) @endif
@endsection @push('scripts') @endpush