@extends('layouts.buyer') @section('title', 'My Inquiries') @section('buyer-content')
Total Sent

{{ $inquiries->total() }}

Awaiting Response

{{ $inquiries->where('status', 'new')->count() + $inquiries->where('status', 'viewed')->count() }}

Responded

{{ $inquiries->where('status', 'responded')->count() }}

All Inquiries
@forelse($inquiries as $inquiry)
@if($inquiry->seller && $inquiry->seller->logo) @else
{{ strtoupper(substr($inquiry->seller->company_name ?? 'S', 0, 1)) }}
@endif
{{ $inquiry->seller->company_name ?? 'Seller' }} @if($inquiry->seller && $inquiry->seller->isPaid()) @endif
@if($inquiry->product) @endif
You sent

{{ $inquiry->message }}

{{ $inquiry->created_at->format('d M, h:i A') }}
@if($inquiry->seller_response)
Seller Replied

{{ $inquiry->seller_response }}

{{ $inquiry->responded_at?->format('d M, h:i A') }}
@endif
{!! $inquiry->status_badge !!}
{{ $inquiry->created_at->diffForHumans() }}
@empty
No Inquiries Sent

Browse products and send inquiries to suppliers to see them here.

Browse Products
@endforelse
@if($inquiries->hasPages())
{{ $inquiries->links() }}
@endif
@endsection