@php $primary = $setting?->primary_color ?: '#124a61'; $accent = $setting?->accent_color ?: '#2e86ab'; $company = $setting?->company_name ?: config('app.name'); $logo = $setting?->logoSrc(); $qty = fn ($v) => rtrim(rtrim(number_format((float) $v, 2), '0'), '.'); $deadline = $rfq->response_deadline; // One place decides what this page is: a live advert, or a notice explaining // why it is no longer one. $mode = match (true) { $rfq->status === 'cancelled' => 'cancelled', $rfq->status === 'awarded' => 'awarded', $rfq->status === 'draft' => 'notyet', // Still running, but the buyer has taken it back to invite-only. The // advertised link keeps working; it just no longer admits new bidders. ! $rfq->is_public && ! $rfq->is_expired && $rfq->status === 'sent' => 'invitesonly', ! $isOpen => 'closed', $registering => 'registering', default => 'advert', }; @endphp
{{-- ============================ HEADER ============================ --}}
@if ($logo) {{ $company }} @else {{ \Illuminate\Support\Str::of($company)->substr(0, 1)->upper() }} @endif

{{ $company }}

{{ __('Open tender') }}

{{-- ============================ HERO ============================== --}}

{{ __('Invitation to tender') }}

{{ $rfq->title ?: __('Request for quotation') }}

{{ $rfq->rfq_number }}

{{ __('Items') }}

{{ $rfq->lines->count() }}

{{ __('Closes') }}

{{ $deadline ? $deadline->format('j M Y, H:i') : __('Open-ended') }}

@if ($rfq->required_by)

{{ __('Required by') }}

{{ $rfq->required_by->format('j M Y') }}

@endif

{{ __('Bidders so far') }}

{{ $bidCount }}

{{-- ============================ NOTICES =========================== --}} @if (in_array($mode, ['cancelled', 'awarded', 'closed', 'notyet', 'invitesonly'], true)) @php $notice = match ($mode) { 'cancelled' => ['title' => __('This tender has been withdrawn'), 'body' => __('The buyer cancelled this request. Nothing further is needed.')], 'awarded' => ['title' => __('This tender has been awarded'), 'body' => __('A supplier has been selected and the tender is closed. Thank you to everyone who quoted.')], 'notyet' => ['title' => __('This tender is not open yet'), 'body' => __('It has not been issued. Please check back, or contact the buyer using the details below.')], 'invitesonly' => ['title' => __('This tender is by invitation only'), 'body' => __('It is no longer open for general registration. Contact the buyer below if you would like to be invited.')], default => ['title' => __('This tender has closed'), 'body' => __('The deadline has passed and new bids can no longer be accepted. If you already quoted, your submission still stands.')], }; @endphp

{{ $notice['title'] }}

{{ $notice['body'] }}

@if ($mode === 'closed')

{{ __('Already bidding? Open the private link that was emailed to you to review your quotation.') }}

@endif
@endif {{-- ============================ REGISTRATION ====================== --}} @if ($mode === 'registering')

{{ __('Register to bid') }}

{{ __('Tell us who you are and we will take you straight to the pricing form. No account, no password — your details are used only for this tender.') }}

@error('company_name')

{{ $message }}

@enderror
@error('contact_name')

{{ $message }}

@enderror
@error('phone')

{{ $message }}

@enderror

{{ __('Your private bidding link is tied to this address. Use the same one if you come back to revise.') }}

@error('email')

{{ $message }}

@enderror
@endif {{-- ============================ THE ADVERT ======================== --}} @if ($mode === 'advert' || $mode === 'registering')
@if ($rfq->scope)

{{ __('Scope of requirement') }}

{{ $rfq->scope }}


@endif

{{ __('What is being tendered') }}

@foreach ($rfq->lines as $i => $line)
{{ $i + 1 }}

{{ $line->description }}

@if ($line->specification)

{{ $line->specification }}

@endif
{{ $qty($line->quantity) }} {{ $line->unit }}
@endforeach
@if ($rfq->delivery_address)

{{ __('Delivery') }}

{{ $rfq->delivery_address }}

@endif @if ($rfq->payment_terms)

{{ __('Payment terms') }}

{{ $rfq->payment_terms }}

@endif @if ($rfq->terms)

{{ __('Conditions') }}

{{ $rfq->terms }}

@endif

{{ __('How this works') }}

  1. {{ __('Register with your company name and email.') }}
  2. {{ __('You are given a private link and price each item on the list.') }}
  3. {{ __('You can revise your quotation any time before the closing date.') }}
  4. {{ __('Bids are sealed — no other bidder sees your prices, and you see none of theirs.') }}

{{ __('This request is not an order and places the buyer under no obligation to purchase.') }}

@endif {{-- ============================ CTA =============================== --}} @if ($mode === 'advert')
@if ($deadline)

{{ __('Closes :when', ['when' => $deadline->diffForHumans()]) }}

@endif
@endif {{-- ============================ FOOTER ============================ --}}