@extends('layouts.app') @section('title', 'RFQs') @section('content') @php($input = 'mt-1 w-full rounded border border-slate-300 px-2 py-1.5 text-sm')

{{ $user->role === 'buyer' ? 'My RFQs' : 'RFQs matched to you' }}

@if ($user->role === 'buyer') + New RFQ @endif
@forelse ($rfqs as $rfq)

RFQ #{{ $rfq->id }} · {{ number_format($rfq->volume_mt) }} MT {{ $rfq->productLabel() }}

{{ $rfq->incoterm }} {{ $rfq->destination_port }} ({{ $rfq->destination_country }}) · {{ $rfq->delivery_from->format('d M') }} – {{ $rfq->delivery_to->format('d M Y') }} · {{ config('drixem.payment_methods.'.$rfq->payment_method) }} @if ($rfq->max_ffa_pct) · FFA ≤ {{ $rfq->max_ffa_pct }}% @endif

{{ $rfq->status }}
@if ($rfq->notes)

{{ $rfq->notes }}

@endif @if ($user->role === 'buyer')

Sent to {{ $rfq->matches_count }} verified supplier(s).

@foreach ($rfq->quotes as $quote)

✔ {{ $quote->seller->company_name }} · USD {{ number_format($quote->price_usd_per_mt, 2) }}/MT {{ $quote->incoterm }} · {{ number_format($quote->volume_mt) }} MT

Valid until {{ $quote->valid_until->format('d M Y') }} @if ($quote->payment_terms) · {{ $quote->payment_terms }} @endif @if ($quote->loading_port) · ex {{ $quote->loading_port }} @endif

@if ($quote->notes)

{{ $quote->notes }}

@endif
@if ($quote->status === 'submitted' && $rfq->isOpen())
@csrf
@elseif ($quote->dealRoom) Open deal room @else {{ $quote->status }} @endif
@endforeach @else @php($mine = $rfq->quotes->first()) @if ($mine && $mine->status !== 'submitted')

Your quote: {{ $mine->status }}

@elseif ($rfq->isOpen())
@csrf
@endif @endif
@empty

{{ $user->role === 'buyer' ? 'No RFQs yet. Raise one from the marketplace.' : 'No matched RFQs yet. Keep your listings up to date to get matched.' }}

@endforelse
{{ $rfqs->links() }}
@endsection