@if (session()->has('alert')) @slot('type', session('alert')['type']) @slot('msg', session('alert')['msg']) @endif @if ($errors->any()) @endif @if ($newVersion)
{{__('A new version is available:')}} v{{ $newVersion }} {{__('Click Here')}}
@endif
{{__('Blast/Bulk')}}
@php $totalMessages = $user->blasts_success + $user->blasts_failed + $user->blasts_pending; $successRate = $totalMessages > 0 ? round(($user->blasts_success / $totalMessages) * 100, 2) : 0; @endphp {{ __('Total :successRate% successful message rate', ['successRate' => $successRate]) }}
{{__('Messages')}}
  • {{ number_format($user->blasts_pending) }}

    {{__('Wait')}}

  • {{ number_format($user->blasts_success) }}

    {{__('Sent')}}

  • {{ number_format($user->blasts_failed) }}

    {{__('Fail')}}

  • {{number_format($user->campaigns_count)}}

    {{__('Campaigns')}}

@php $isAdmin = $user->level === 'admin'; $planName = $isAdmin ? __('Administrator') : ($user->plan_name ?? __('No Plan')); $planExpire = $isAdmin ? null : ($user->subscription_expired ?? null); $totalMessages = number_format($user->message_histories_count); $remainMessages = $isAdmin ? '∞' : number_format($user->plan_data['messages_limit'] ?? 0); @endphp
{{ __('All Messages Sent') }}
{{ __('Overview of your usage') }}
{{ __('Sent') }}
{{ $totalMessages }}
{{ __('Remaining') }}
{{ $remainMessages }}

{{ __('Plan') }}
{{ $planName }}
{{ __('Expiry') }}
{{ $isAdmin ? __('Unlimited') : ($planExpire ? \Carbon\Carbon::parse($planExpire)->format('Y-m-d') : __('N/A')) }}
@php $totalLimit = (int) ($user->limit_device ?? 0); $used = (int) ($user->devices_count ?? 0); $available = max($totalLimit - $used, 0); @endphp
{{ __('Devices Overview') }}
{{ __('Your plan device statistics') }}
{{ __('Used') }}
{{ number_format($used) }}
{{ __('Available') }}
{{ number_format($available) }}
{{ __('Total') }}
{{ number_format($totalLimit) }}
@if($user->level == 'admin') @php $diskTotal = disk_total_space('/'); $diskFree = disk_free_space('/'); $diskUsed = $diskTotal - $diskFree; $diskTotalGB = number_format($diskTotal/1024/1024/1024,1); $diskUsedGB = number_format($diskUsed/1024/1024/1024,1); $diskPercent = round($diskUsed / $diskTotal * 100); $phpVersion = phpversion(); $mysqlVersion = DB::selectOne('SELECT VERSION() AS version')->version; $laravelVersion = Illuminate\Foundation\Application::VERSION; @endphp
{{__('System Resources')}}
{{__('Live Memory & Disk')}}
-- / -- {{__('MB')}}
{{__('RAM Usage')}} --%
{{__('Free RAM')}} -- {{__('MB')}}
{{ $diskUsedGB }} / {{ $diskTotalGB }} {{__('GB')}}
{{__('Disk Usage')}} {{ $diskPercent }}%
{{__('Free Disk')}} {{ number_format($diskFree/1024/1024/1024,1) }} {{__('GB')}}
{{__('Server Info')}}
{{__('Environment Versions')}}
{{__('PHP')}}
{{ $phpVersion }}
{{__('Laravel')}}
{{ $laravelVersion }}
{{__('MySQL')}}
{{ $mysqlVersion }}
{{__('CPU Usage')}}
{{__('Real-time Processor Load')}}
--
@endif @php $cu = $chatUi ?? []; $mt = number_format($cu['messages_today'] ?? 0); $as = number_format($cu['active_sessions_today'] ?? 0); $md = number_format($cu['media_today'] ?? 0); $incoming = (int) ($cu['incoming_today'] ?? 0); $outgoing = (int) ($cu['outgoing_today'] ?? 0); $typesLabels = $cu['types_labels'] ?? []; $typesData = $cu['types_data'] ?? []; $topContacts = $cu['top_contacts'] ?? collect(); @endphp
{{ __('Chat Overview') }}

{{ __('Today at a glance') }}

{{ __('Messages Today') }}

{{ number_format($chatUi['messages_today'] ?? 0) }}

{{ __('Active Sessions') }}

{{ number_format($chatUi['active_sessions_today'] ?? 0) }}

{{ __('Media Today') }}

{{ number_format($chatUi['media_today'] ?? 0) }}

{{ __('Direction Split') }}
{{ __('Today') }}

{{ (int)(($chatUi['incoming_today'] ?? 0) + ($chatUi['outgoing_today'] ?? 0)) }}

{{ __('Message Types Today') }}
@foreach(array_slice($typesLabels,0,3) as $i => $lbl)

{{ ucfirst($lbl) }}

{{ number_format($typesData[$i] ?? 0) }}
@endforeach
@foreach(array_slice($typesLabels,3,3) as $j => $lbl) @php $idx = $j + 3; @endphp

{{ ucfirst($lbl) }}

{{ number_format($typesData[$idx] ?? 0) }}
@endforeach
{{ __('Top Contacts Today') }}

{{ __('Contact') }}

{{ __('Messages') }}

@foreach($topContacts as $c)
{{ strtoupper(mb_substr($c->push_name ?: $c->phone_number,0,1)) }}
{{ $c->push_name ?: $c->phone_number }}
{{ $c->phone_number }}
{{ number_format($c->cnt) }}
@endforeach