@extends('layouts.app') @section('title', 'Stock Alerts') @section('content')

Stock Alert Dashboard

@if($alerts['total_low_stock'] === 0)
All stock items are at adequate levels.
@else

{{ $alerts['critical_count'] }}

Critical Items (Out of Stock)

{{ $alerts['warning_count'] }}

Warning Items (Low Stock)

{{ $alerts['total_low_stock'] }}

Total Alert Items

@if($alerts['critical_count'] > 0)

Critical Items (Out of Stock)

@foreach($alerts['critical_items'] as $item) @endforeach
Item Name Current Quantity Minimum Quantity Category
{{ $item->name }} {{ $item->quantity }} {{ $item->min_quantity ?? 'Not Set' }} {{ $item->category->name ?? 'N/A' }}
@endif @if($alerts['warning_count'] > 0)

Warning Items (Below Minimum)

@foreach($alerts['warning_items'] as $item) @endforeach
Item Name Current Quantity Minimum Quantity Shortage Recommended Order Category
{{ $item->name }} {{ $item->quantity }} {{ $item->min_quantity }} {{ $item->getStockShortage() }} {{ app('App\Services\StockAlertService')->getRecommendedOrderQuantity($item) }} {{ $item->category->name ?? 'N/A' }}
@endif @endif
@endsection