@extends('layouts.panel', ['area' => 'admin'])
@section('title', 'داشبورد مدیریت')
@section('content')
@include('partials.stat', ['icon' => 'users', 'label' => 'کاربران', 'value' => number_format($users), 'sub' => 'امروز: '.$newUsers, 'color' => 'indigo'])
@include('partials.stat', ['icon' => 'link', 'label' => 'لینکها', 'value' => number_format($links), 'color' => 'sky'])
@include('partials.stat', ['icon' => 'mouse-pointer-click', 'label' => 'کل کلیکها', 'value' => number_format($clicks), 'sub' => 'امروز: '.number_format($todayClicks), 'color' => 'violet'])
@include('partials.stat', ['icon' => 'banknote', 'label' => 'فروش این ماه', 'value' => toman($revenueMonth), 'sub' => 'کل: '.toman($revenueAll), 'color' => 'emerald'])
@foreach([['admin.orders.index', 'receipt', 'رسید در انتظار تایید', $pendingReview, 'amber'], ['admin.tickets.index', 'life-buoy', 'تیکت باز', $openTickets, 'rose'], ['admin.withdrawals.index', 'wallet', 'برداشت در انتظار', $withdrawals, 'sky'], ['admin.reports.index', 'flag', 'گزارش تخلف جدید', $reports, 'rose']] as [$r, $i, $l, $v, $c])
@include('partials.stat', ['icon' => $i, 'label' => $l, 'value' => number_format($v), 'color' => $c])
@endforeach
کلیک و فروش ۱۴ روز اخیر
@include('partials.chart', ['id' => 'adminChart', 'labels' => collect($chart)->pluck('label'), 'datasets' => [['label' => 'کلیک', 'data' => collect($chart)->pluck('clicks'), 'color' => '#6366f1'], ['label' => 'فروش (تومان)', 'data' => collect($chart)->pluck('sales'), 'color' => '#10b981']]])
آخرین سفارشها
@forelse($recentOrders as $o)
| {{ $o->user?->email }} | {{ $o->typeLabel() }} | {{ toman($o->final_amount) }} | {{ $o->statusLabel() }} |
@empty| سفارشی نیست. |
@endforelse
پربازدیدترین لینکها
@forelse($topLinks as $l)
| {{ $l->domain->host }}/{{ $l->code }} | {{ $l->long_url }} | {{ number_format($l->clicks) }} |
@empty| لینکی نیست. |
@endforelse
@endsection