@extends('components.app-layout') @section('title', 'Inventory Alerts') @section('subtitle', 'Monitor stock levels and expiring items') @section('content')

Stock Alerts

Monitor inventory levels and take action on items that need attention

Low Stock
Out of Stock
Expiring Soon

Low Stock

{{ $lowStockItems->total() }}

Items need restocking

Out of Stock

{{ $outOfStockItems->total() }}

Items unavailable

Expiring Soon

{{ $expiringItems->total() }}

Items expiring (30 days)
@if($lowStockItems->count() > 0)

Low Stock Items

Items below minimum stock level

View All
@foreach($lowStockItems as $item)

{{ $item->name }}

{{ $item->category->name ?? 'No Category' }}

Current: {{ $item->current_stock }} Min: {{ $item->minimum_stock }}
@if($item->location)

{{ $item->location }}

@endif
{{ $item->current_stock }}
@endforeach
@if($lowStockItems->hasPages())
{{ $lowStockItems->links() }}
@endif
@endif @if($outOfStockItems->count() > 0)

Out of Stock Items

Items with zero stock

View All
@foreach($outOfStockItems as $item)

{{ $item->name }}

{{ $item->category->name ?? 'No Category' }}

Stock: 0 Min: {{ $item->minimum_stock }}
@if($item->location)

{{ $item->location }}

@endif
View Details
@endforeach
@if($outOfStockItems->hasPages())
{{ $outOfStockItems->links() }}
@endif
@endif @if($expiringItems->count() > 0)

Expiring Soon

Items expiring within 30 days

@foreach($expiringItems as $item)

{{ $item->name }}

{{ $item->category->name ?? 'No Category' }}

Stock: {{ $item->current_stock }} Expires: {{ $item->expiry_date->format('M d, Y') }}
@php $daysToExpiry = $item->days_to_expiry; @endphp @if($daysToExpiry <= 7) {{ $daysToExpiry }} days left @elseif($daysToExpiry <= 14) {{ $daysToExpiry }} days left @else {{ $daysToExpiry }} days left @endif
{{ $daysToExpiry }}d
@endforeach
@if($expiringItems->hasPages())
{{ $expiringItems->links() }}
@endif
@endif @if($lowStockItems->count() == 0 && $outOfStockItems->count() == 0 && $expiringItems->count() == 0)

All Good!

No inventory alerts at this time. All items are well stocked and none are expiring soon.

Back to Dashboard
@endif
@endsection