{{-- Back --}}
{{-- Header --}}
{{-- Grouped by Listing --}}
@php
$grouped = $inquiries->groupBy('car_listing_id');
@endphp
@forelse($grouped as $listingId => $listingInquiries)
@php $listing = $listingInquiries->first()->listing; @endphp
@endforelse
{{ $seller->name }}
{{ $inquiries->count() }} Total {{ Str::plural('Inquiry', $inquiries->count()) }}
{{-- Car Header — click pe car view page --}}
{{ $listingInquiries->count() }} {{ Str::plural('Inquiry', $listingInquiries->count()) }}
{{-- Inquiries --}}
@foreach($listingInquiries as $inq)
@empty
{{ $listing->title ?? 'Listing #' . $listing->id }}
{{-- Avatar initials --}}
{{-- Message --}}
{{-- Time --}}
@endforeach
{{ strtoupper(substr($inq->first_name, 0, 1)) }}
{{-- Name & Contact --}}
{{ $inq->first_name }} {{ $inq->last_name }}
{{ $inq->phone }} @if($inq->email) · {{ $inq->email }} @endif
{{ $inq->created_at->diffForHumans() }}
{{ $inq->created_at->format('M d, Y') }}
{{-- Status Badge --}}
@php
$statusMap = [
'pending' => ['pill' => 'pill-pending', 'dot' => 'dot-pending', 'label' => 'Pending'],
'contacted' => ['pill' => 'pill-contacted', 'dot' => 'dot-contacted', 'label' => 'Contacted'],
'not-available' => ['pill' => 'pill-na', 'dot' => 'dot-na', 'label' => 'Not Available'],
];
$s = $statusMap[$inq->status] ?? $statusMap['pending'];
@endphp
{{ $inq->created_at->format('M d, Y') }}
{{ $s['label'] }}
No inquiries found for this seller.