@extends('layouts.app') @section('title', __('whatsappnotification::lang.whatsapp_notification') . ' - ' . __('whatsappnotification::lang.notification_logs')) @section('content') @component('components.widget', ['class' => 'box-primary']) @slot('title') {{ __('whatsappnotification::lang.notification_logs') }} @endslot @slot('tool') {{ __('whatsappnotification::lang.settings') }} @endslot @if(session('status')) @if(session('status.success'))
{{ session('status.msg') }}
@else
{{ session('status.msg') }}
@endif @endif {{-- Summary Stats --}}
Successful {{ $logs->where('status', 'success')->count() }}
Failed {{ $logs->where('status', 'failed')->count() }}
Pending {{ $logs->where('status', 'pending')->count() }}
Total Sent {{ $logs->total() }}
@forelse($logs as $index => $log) @empty @endforelse
# {{ __('whatsappnotification::lang.log_date') }} {{ __('whatsappnotification::lang.log_customer') }} {{ __('whatsappnotification::lang.log_mobile') }} {{ __('whatsappnotification::lang.log_invoice') }} {{ __('whatsappnotification::lang.log_amount') }} {{ __('whatsappnotification::lang.log_status') }} {{ __('whatsappnotification::lang.log_error') }} {{ __('whatsappnotification::lang.log_response_status') }} {{ __('whatsappnotification::lang.actions') }}
{{ $logs->firstItem() + $index }} {{ \Carbon\Carbon::parse($log->created_at)->format('d M Y h:i A') }} {{ $log->customer_name ?? '—' }} {{ $log->mobile_number }} @if($log->transaction_id) {{ $log->invoice_no ?? 'N/A' }} @else {{ $log->invoice_no ?? '—' }} @endif {{ $log->total_amount ? number_format($log->total_amount, 2) : '—' }} @if($log->status === 'success') {{ __('whatsappnotification::lang.status_success') }} @elseif($log->status === 'failed') {{ __('whatsappnotification::lang.status_failed') }} @else {{ __('whatsappnotification::lang.status_pending') }} @endif @if($log->error_message) {{ \Illuminate\Support\Str::limit($log->error_message, 40) }} @else — @endif @if($log->response_status) {{ $log->response_status }} @else — @endif @if($log->status === 'failed')
@csrf
@endif @if($log->request_payload) @endif

{{ __('whatsappnotification::lang.no_logs') }}
{{-- Pagination --}}
{{ $logs->links() }}

WhatsApp Connect v{{ config('whatsappnotification.module_version', '1.0') }} — {{ __('whatsappnotification::lang.powered_by') }} | bigbrainstechnolabs.com
@endcomponent {{-- Payload Detail Modal --}} @stop @section('javascript') @endsection