@extends('components.app-layout') @section('title', 'Inventory Items') @php $dynamicSubtitle = 'Manage ' . ($organizationSettings['name'] ?? 'Presbyterian Church of Ghana') . ' inventory items'; @endphp @section('subtitle', $dynamicSubtitle) @section('content')

Inventory Items

Browse, search, and manage all your inventory items in one place

Advanced Search
Smart Filtering
Stock Tracking
Clear Filters

Inventory Items

{{ $items->total() }} items found

@if($items->count() > 0)
@foreach($items as $item)

{{ $item->name }}

{{ $item->item_code }}

@php $stockStatus = $item->stock_status; $badgeClass = match($stockStatus) { 'out_of_stock' => 'bg-red-100 text-red-800', 'low_stock' => 'bg-orange-100 text-orange-800', 'overstock' => 'bg-blue-100 text-blue-800', default => 'bg-green-100 text-green-800' }; $badgeIcon = match($stockStatus) { 'out_of_stock' => 'fas fa-times-circle', 'low_stock' => 'fas fa-exclamation-triangle', 'overstock' => 'fas fa-arrow-up', default => 'fas fa-check-circle' }; @endphp {{ ucfirst(str_replace('_', ' ', $stockStatus)) }}
{{ $item->category->name ?? 'No Category' }}
@if($item->location)
{{ $item->location }}
@endif
Current Stock {{ $item->current_stock }}
Min: {{ $item->minimum_stock }} {{ $item->unit_of_measure }}
@php $maxForProgress = $item->maximum_stock ?? ($item->minimum_stock * 3); $percentage = $maxForProgress > 0 ? min(($item->current_stock / $maxForProgress) * 100, 100) : 0; @endphp
Unit Cost: ₵{{ number_format($item->unit_cost, 2) }}
Stock Value: ₵{{ number_format($item->stock_value, 2) }}
@if($item->track_expiry && $item->expiry_date) @php $daysToExpiry = $item->days_to_expiry; @endphp @if($daysToExpiry <= 30)
@if($daysToExpiry <= 7) Expires in {{ $daysToExpiry }} days @elseif($daysToExpiry <= 14) Expires in {{ $daysToExpiry }} days @else Expires in {{ $daysToExpiry }} days @endif
@endif @endif
View Details
@endforeach
@if($items->hasPages())
{{ $items->appends(request()->query())->links() }}
@endif @else

No Items Found

@if(request()->hasAny(['search', 'category', 'stock_status'])) No items match your current filters. Try adjusting your search criteria. @else You haven't added any inventory items yet. Start by adding your first item. @endif

@if(request()->hasAny(['search', 'category', 'stock_status'])) Clear Filters @endif Add First Item
@endif
@endsection