@extends('layouts.app') @section('title', 'Send RFQ — ' . $request->request_number) @section('content')
Send RFQ Invitations
{{ $request->request_number }}
@if($request->project_name)
{{ $request->project_name }}
@endif
{{-- Already invited --}} @if($invitations->count())
Already Invited
@foreach($invitations as $inv) @php $statusColors = [ 'sent' => ['bg'=>'#eff6ff','border'=>'#bfdbfe','color'=>'#1d4ed8'], 'opened' => ['bg'=>'#fffbeb','border'=>'#fde68a','color'=>'#92400e'], 'submitted' => ['bg'=>'#f0fdf4','border'=>'#bbf7d0','color'=>'#15803d'], 'declined' => ['bg'=>'#fef2f2','border'=>'#fecaca','color'=>'#dc2626'], 'pending' => ['bg'=>'#f8fafc','border'=>'#e2e8f0','color'=>'#64748b'], ]; $sc = $statusColors[$inv->status] ?? $statusColors['pending']; @endphp
{{ $inv->supplier->name }}
via {{ ucfirst($inv->channel) }} @if($inv->sent_at) · sent {{ $inv->sent_at->format('d M Y') }} @endif
@if(in_array($inv->channel, ['whatsapp', 'both'])) @php $wsLink = app(\App\Services\RfqInvitationService::class)->whatsappLink($inv); @endphp WhatsApp @endif {{ ucfirst($inv->status) }}
@endforeach
@endif @php $alreadyIds = $invitations->pluck('supplier_id')->toArray(); @endphp
@endsection