@extends('dashboard.layouts.master') @section('title', 'Chat Thread | Admin Panel') @push('after-styles') @endpush @section('content') @can('offer.chat.show')
{{-- ── Page Header ── --}}
{{-- ── Read-only notice ── --}}
lock This is a read-only view. Chat content cannot be modified. You may take account actions below if necessary.
{{-- ── Participants ── --}}
{{ strtoupper(substr($chatInfo->sender_name, 0, 1)) }}
{{ $chatInfo->sender_name }} {{ $chatInfo->sender_type == 2 ? 'Business' : 'End User' }}  •  @if($chatInfo->sender_status == 3) Suspended @elseif($chatInfo->sender_status == 2) Deleted @else Active @endif
swap_horiz
{{ strtoupper(substr($chatInfo->receiver_name, 0, 1)) }}
{{ $chatInfo->receiver_name }} {{ $chatInfo->receiver_type == 2 ? 'Business' : 'End User' }}  •  @if($chatInfo->receiver_status == 3) Suspended @elseif($chatInfo->receiver_status == 2) Deleted @else Active @endif
{{-- ── Message thread ── --}}
@forelse($messages as $msg) @php $isSender = ($msg->sender_id == $chatInfo->sender_id); @endphp
{{ strtoupper(substr($isSender ? $chatInfo->sender_name : $chatInfo->receiver_name, 0, 1)) }}
{{ $isSender ? $chatInfo->sender_name : $chatInfo->receiver_name }}
@if($msg->message_type == 2)
[Image]
@elseif($msg->message_type == 3)
[Video]
@else
{{ $msg->message }}
@endif @if($msg->attachment) attach_file View Attachment @endif
{{ \Carbon\Carbon::parse($msg->created_at)->format('d M Y, H:i') }}
@empty
No messages found in this conversation.
@endforelse
{{-- ── Admin Action Panel ── --}} @canany(['offer.chat.approve', 'offer.chat.delete'])
warning Account Actions — Use only if abusive or fraudulent behaviour is detected
@can('offer.chat.approve') @if($chatInfo->sender_status != 3 && $chatInfo->sender_status != 2) @endif @if($chatInfo->receiver_status != 3 && $chatInfo->receiver_status != 2) @endif @endcan @can('offer.chat.delete') @if($chatInfo->sender_status != 2) @endif @if($chatInfo->receiver_status != 2) @endif @endcan
@endcanany
{{-- ── Suspend Modal ── --}} @else @endcan @endsection @push('after-scripts') @endpush