@extends('layouts.app') @section('title', 'Chat Management') @section('subtitle', 'Monitor all conversations') @section('content')
Monitor all buyer-seller conversations
Total Chats
{{ $stats['total_chats'] }}
Active Chats
{{ $stats['active_chats'] }}
Total Messages
{{ $stats['total_messages'] }}
Today's Messages
{{ $stats['today_messages'] }}
List of all buyer-seller conversations in the system.
| Participants | Product | Last Message | Status | Messages | Actions |
|---|---|---|---|---|---|
|
{{ strtoupper(substr($chat->buyer->name, 0, 1)) }}
{{ strtoupper(substr($chat->seller->name, 0, 1)) }}
{{ $chat->buyer->name }}
@if($chat->buyer->company_name)
({{ $chat->buyer->company_name }})
@endif
{{ $chat->seller->name }}
@if($chat->seller->company_name)
({{ $chat->seller->company_name }})
@endif
|
{{ Str::limit($chat->product->name, 30) }}
${{ number_format($chat->product->price, 2) }}
|
@if($chat->last_message)
{{ Str::limit($chat->last_message, 50) }}
@else
No messages yet
@endif
@if($chat->last_message_at)
{{ $chat->last_message_at->diffForHumans() }}
@endif
|
{{ ucfirst($chat->status) }} |
{{ $messageCount }} total
@if($unreadCount > 0)
{{ $unreadCount }} unread
@endif
|
|
@if(request('search')) Try adjusting your search terms. @else There are no conversations in the system yet. @endif