@extends('layouts.app') @section('title', $inquiry->title) @section('content') @include('assetexchange::layouts.nav')

{{ $inquiry->title }}

{{ $inquiry->inquiry_code }} — {{ $inquiry->listing?->title }}

@lang('assetexchange::lang.sla_status'): @if($slaStatus === 'breached') @lang('assetexchange::lang.sla_breached') @elseif($slaStatus === 'overdue') @lang('assetexchange::lang.sla_overdue_due') @elseif($slaStatus === 'warning') @lang('assetexchange::lang.sla_warning') @elseif($slaStatus === 'ok') @lang('assetexchange::lang.sla_ok') @else @endif (@lang('assetexchange::lang.sla_hint', ['hours' => $sla['inquiry_sla_hours'] ?? 48]))

@can('aex.inquiries.manage') @if($inquiry->status === 'draft')
@csrf
@endif @endcan

@lang('assetexchange::lang.inquiry_lines')

@foreach($inquiry->lines as $line) @endforeach
{{ $line->part_name ?: $line->description }} {{ $line->target_condition }} {{ $line->reference_price ? $aexUtil->formatMoney($line->reference_price) : '—' }}

@lang('assetexchange::lang.recipients')

@foreach($inquiry->recipients as $recipient)

{{ $recipient->recipient_type === 'supplier' ? ($recipient->contact?->name ?? '—') : ($recipient->user?->user_full_name ?? '—') }} {{ $aexUtil->statusLabel($recipient->status) }}

@if($recipient->quoted_price)

@lang('assetexchange::lang.quoted_price'): {{ $aexUtil->formatMoney($recipient->quoted_price) }} {{ $recipient->currency }}

{{ $recipient->quote_notes }}

@elseif(auth()->user()->can('aex.inquiries.manage')) {!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\PriceInquiryController::class, 'recordQuote'], [$recipient->id]), 'method' => 'post']) !!}
{!! Form::close() !!} @endif
@endforeach
@endsection