@extends('layouts.client') @section('page_title', $isRtl ? 'الرئيسية' : 'Dashboard') @include('client.financing-request._home_theme') @section('content') @php $user = auth()->user(); $name = $user->name; $hour = (int) now()->format('H'); $greeting = $isRtl ? ($hour < 12 ? 'صباح الخير' : 'مساء الخير') : ($hour < 12 ? 'Good morning' : ($hour < 18 ? 'Good afternoon' : 'Good evening')); $stageLabels = [ 'pending_payment' => $isRtl ? 'بانتظار الدفع' : 'Pending Payment', 'paid' => $isRtl ? 'مدفوع' : 'Paid', 'offers' => $isRtl ? 'عرض العروض' : 'Offers', 'offer_selected' => $isRtl ? 'تم اختيار العرض' : 'Offer Selected', 'completed' => $isRtl ? 'مكتمل' : 'Completed', ]; $statusLabels = [ 'pending' => $isRtl ? 'قيد المراجعة' : 'Pending', 'approved' => $isRtl ? 'موافق' : 'Approved', 'rejected' => $isRtl ? 'مرفوض' : 'Rejected', 'canceled' => $isRtl ? 'ملغى' : 'Canceled', 'completed'=> $isRtl ? 'مكتمل' : 'Completed', ]; $statusColors = [ 'pending' => ['#FFF4E5', '#B25C00'], 'approved' => ['#E6F7EA', '#166534'], 'rejected' => ['#FEE2E2', '#991B1B'], 'canceled' => ['#F3F4F6', '#4B5563'], 'completed' => ['#DBEAFE', '#1D4ED8'], ]; $totalAll = max(1, $stats['total']); $completionPct = $stats['total'] > 0 ? round(($stats['completed'] / $stats['total']) * 100) : 0; @endphp
{{ $isRtl ? 'تابع طلبات التمويل وحالتها من مكان واحد.' : 'Track your financing requests and their status in one place.' }}
{{ $isRtl ? "من إجمالي {$stats['total']} طلب، {$stats['completed']} مكتمل." : "Out of {$stats['total']} requests, {$stats['completed']} completed." }}
{{ number_format($stats['total']) }}
{{ number_format($stats['pending']) }}
{{ number_format($stats['completed']) }}
{{ number_format($stats['awaiting_payment']) }}
{{ number_format($stats['awaiting_offer']) }}
{{ number_format($stats['rejected']) }}
{{ $isRtl ? 'ابدأ بتقديم طلبك الأول خلال دقائق.' : 'Submit your first request in minutes.' }}
{{ $isRtl ? 'قدّم طلبك الأول' : 'Submit your first' }}| {{ $isRtl ? 'رقم الطلب' : 'Request #' }} | {{ $isRtl ? 'الاسم التجاري' : 'Commercial Name' }} | {{ $isRtl ? 'الحالة' : 'Status' }} | {{ $isRtl ? 'المرحلة' : 'Stage' }} | {{ $isRtl ? 'التاريخ' : 'Date' }} | |
|---|---|---|---|---|---|
| {{ $req->request_number }} | {{ $req->commercial_name ?: '—' }} | {{ $label }} | {{ $stageLabels[$req->stage] ?? ($req->stage ?: '—') }} | {{ optional($req->created_at)->format('Y-m-d') }} | {{ $isRtl ? 'عرض' : 'View' }} |