@if (session()->has('alert')) @slot('type', session('alert')['type']) @slot('msg', session('alert')['msg']) @endif @if ($errors->any()) @endif {{-- Summary cards --}}
{{ __('Total') }}
{{ $stats['total'] }}
{{ __('Success') }}
{{ $stats['success'] }}
{{ __('Failed') }}
{{ $stats['failed'] }}
{{ __('Unknown') }}
{{ $stats['unknown'] }}
{{-- table --}}
{{ __('Messages History') }}
@if ($messages->total() > 0) {{ __('Delete All history?') }} @endif
@if ($messages->total() == 0) @endif @foreach ($messages as $msg) {{-- Sender --}} {{-- Recipient --}} {{-- Message --}} {{-- Type --}} {{-- Status --}} {{-- Via --}} {{-- Message ID --}} {{-- Provider --}} {{-- Time --}} {{-- Action --}} @endforeach
{{ __('Sender') }} {{ __('Recipient') }} {{ __('Message') }} {{ __('Type') }} {{ __('Status') }} {{ __('Via') }} {{ __('Message ID') }} {{ __('Provider') }} {{ __('Time') }} {{ __('Action') }}
{{ $msg->device->body ?? '-' }}
{{ $msg->number }}
{{ strip_tags($msg->message) }}
@if ($msg->note) {{ \Illuminate\Support\Str::limit($msg->note, 60) }} @endif
@php $typeColors = [ 'text' => 'info', 'media' => 'primary', 'image' => 'primary', 'video' => 'purple', 'audio' => 'secondary', 'document' => 'secondary', 'sticker' => 'warning', 'button' => 'success', 'template' => 'success', 'list' => 'cyan', 'poll' => 'indigo', 'location' => 'danger', 'vcard' => 'teal', 'product' => 'orange', ]; $tColor = $typeColors[$msg->type] ?? 'secondary'; @endphp {{ strtoupper($msg->type) }} @if ($msg->status === 'success') {{ __('Sent') }} @elseif ($msg->status === 'unknown') {{ __('Unknown') }} @elseif ($msg->status === 'delivered') {{ __('Delivered') }} @elseif ($msg->status === 'read') {{ __('Read') }} @else {{ __('Failed') }} @endif @if ($msg->send_by === 'web') {{ __('Web') }} @else {{ __('API') }} @endif @if ($msg->provider_message_id) {{ \Illuminate\Support\Str::limit($msg->provider_message_id, 18) }} @else — @endif @if ($msg->provider) {{ $msg->provider === 'legacy' ? 'Baileys' : ($msg->provider === 'meta_cloud_api' ? 'Meta Cloud' : $msg->provider) }} @else — @endif {{ $msg->created_at->format('d M Y') }}
{{ $msg->created_at->format('H:i') }}
@if ($msg->status !== 'success') @endif
{{-- Payload collapse --}}
{{ $msg->payload }}
{{ $messages->links('pagination::bootstrap-5') }}
{{-- Delete confirmation modal --}}