@extends('layouts.app') @section('title', 'Recommendations') @section('content')
@if(($recommendations ?? collect())->isEmpty())
@else
@foreach($recommendations as $rec) @endforeach
Title Type Item Supplier Est. Savings Priority Status Generated
{{ $rec->title }} {{ ucfirst(str_replace('_', ' ', $rec->recommendation_type ?? '')) }} {{ $rec->item->name_en ?? '—' }} {{ $rec->supplier->name ?? '—' }} @if($rec->estimated_savings !== null) {{ number_format($rec->estimated_savings, 2) }} {{ $rec->currency ?? 'SAR' }} @else — @endif @php $prio = strtolower($rec->priority ?? 'medium'); $prioClass = $prio === 'high' ? 'red' : ($prio === 'low' ? 'green' : 'yellow'); @endphp {{ ucfirst($prio) }} {{ optional($rec->generated_at)->format('Y-m-d') ?? '—' }}
@if(method_exists($recommendations, 'links'))
{{ $recommendations->withQueryString()->links() }}
@endif
@endif @endsection