@extends('layouts.user_type.auth') @section('header_title', __('Dashboard')) @section('content') @php $formatNumber = fn ($value) => number_format((int) $value); $formatMoney = fn ($value) => number_format((int) $value) . ' ' . __('Toman'); @endphp
@foreach($statCards as $card)

{{ $card['title'] }}

{{ $formatNumber($card['value']) }}

{{ $card['caption'] }}
@endforeach

{{ __('Management') }}

{{ __('Open tickets') }}: {{ $formatNumber($managementSummary['open_tickets']) }}

{{ __('Pending top-ups') }}: {{ $formatNumber($managementSummary['pending_wallet_topups']) }}

{{ __('Active live streams') }}: {{ $formatNumber($managementSummary['active_live_rooms']) }}

{{ __('Finance') }}

{{ __('Total wallet balance') }}: {{ $formatMoney($financialSummary['wallet_balance']) }}

{{ __('This month revenue') }}: {{ $formatMoney($financialSummary['this_month_revenue']) }}

{{ __('Total plan revenue') }}: {{ $formatMoney($financialSummary['total_plan_revenue']) }}

{{ __('Active subscriptions') }}: {{ $formatNumber($financialSummary['active_subscriptions']) }}

{{ __('Active plans') }}: {{ $formatNumber($financialSummary['active_plans']) }}

{{ __('Top selling plans') }}

@forelse($topSellingPlans as $plan)
{{ $plan->name }} {{ $formatMoney($plan->sales_amount) }}
@empty

{{ __('No plan sales yet.') }}

@endforelse

{{ __('Recent users') }}

@forelse($recentUsers as $user) @empty @endforelse
{{ __('Name') }}{{ __('Mobile') }}{{ __('Role') }}
{{ trim(($user->fname ?? '') . ' ' . ($user->lname ?? '')) ?: '-' }} {{ $user->tel ?: '-' }} {{ $user->role_name ?: '-' }}
{{ __('No users found.') }}

{{ __('Recent transactions') }}

@forelse($recentFinancialTransactions as $transaction) @empty @endforelse
{{ __('Title') }}{{ __('User') }}{{ __('Amount') }}{{ __('Status') }}
{{ $transaction->title }} {{ $transaction->user?->tel ?: $transaction->user?->email ?: '-' }} {{ $formatMoney($transaction->amount) }} {{ $transaction->status }}
{{ __('No transactions found.') }}
@endsection