@extends('layouts.admin') @section('page_title', $isRtl ? 'الرئيسية' : 'Dashboard') @push('styles') @endpush @section('content') @php $fmt = fn($n) => number_format((float) $n, 0); $money = fn($n) => number_format((float) $n, 0) . ' ' . ($isRtl ? 'ر.س' : 'SAR'); $statusColors = [ 'pending' => '#f59e0b', 'approved' => '#10b981', 'rejected' => '#ef4444', 'canceled' => '#6b7280', 'completed' => '#e31e24', ]; $statusLabels = [ 'pending' => $isRtl ? 'قيد المراجعة' : 'Pending', 'approved' => $isRtl ? 'مقبول' : 'Approved', 'rejected' => $isRtl ? 'مرفوض' : 'Rejected', 'canceled' => $isRtl ? 'ملغي' : 'Canceled', 'completed' => $isRtl ? 'مكتمل' : 'Completed', ]; $totalStatus = max(1, array_sum($statusDistribution)); @endphp {{-- Welcome banner --}}
{{ $isRtl ? 'إليك نظرة عامة على أداء المنصة اليوم' : "Here's what's happening on your platform today" }} — {{ now()->locale(app()->getLocale())->isoFormat('dddd، D MMMM YYYY') }}
{{ $isRtl ? 'المستخدمون' : 'Total Users' }}
{{ $fmt($metrics['users']) }}
{{ $isRtl ? 'طلبات التمويل' : 'Financing Requests' }}
{{ $fmt($metrics['requests']) }}
{{ $isRtl ? 'إجمالي قيمة التمويل' : 'Total Loan Volume' }}
{{ $money($metrics['loan_volume']) }}
{{ $isRtl ? 'طلبات بانتظار المراجعة' : 'Pending Review' }}
{{ $fmt($metrics['pending_requests']) }}
{{ $isRtl ? 'طلبات مقبولة' : 'Approved' }}
{{ $fmt($metrics['approved_requests']) }}
{{ $isRtl ? 'طلبات مكتملة' : 'Completed' }}
{{ $fmt($metrics['completed_requests']) }}
{{ $isRtl ? 'طلبات مرفوضة' : 'Rejected' }}
{{ $fmt($metrics['rejected_requests']) }}
{{ $isRtl ? 'رسائل جديدة' : 'New Messages' }}
{{ $fmt($metrics['new_contacts']) }}
| {{ $isRtl ? 'رقم الطلب' : 'Request #' }} | {{ $isRtl ? 'العميل' : 'Client' }} | {{ $isRtl ? 'المبلغ' : 'Amount' }} | {{ $isRtl ? 'الحالة' : 'Status' }} | {{ $isRtl ? 'التاريخ' : 'Date' }} |
|---|---|---|---|---|
| {{ $r->request_number }} | {{ $r->client_name ?? '—' }} | {{ $r->loan_amount ? $fmt($r->loan_amount) : '—' }} | {{ $r->status_label }} | {{ $r->created_at?->diffForHumans() }} |
| {{ $isRtl ? 'لا توجد طلبات' : 'No requests yet' }} | ||||
| {{ $isRtl ? 'الاسم' : 'Name' }} | {{ $isRtl ? 'البريد' : 'Email' }} | {{ $isRtl ? 'التحقق' : 'Verified' }} | {{ $isRtl ? 'التاريخ' : 'Date' }} |
|---|---|---|---|
| {{ $u->name }} | {{ $u->email }} | @if($u->email_verified_at) @else {{ $isRtl ? 'غير مؤكد' : 'Pending' }} @endif | {{ $u->created_at?->diffForHumans() }} |
| {{ $isRtl ? 'لا يوجد مستخدمون' : 'No users yet' }} | |||