@extends('layouts.app') @section('content')

{{ app()->getLocale() == 'ar' ? '📊 إدارة مستخدمي الموقع' : '📊 Site Users Management' }}

{{ app()->getLocale() == 'ar' ? 'جميع المستخدمين المسجلين في الموقع' : 'All users registered on the site' }}

{{ app()->getLocale() == 'ar' ? 'مسح' : 'Clear' }}
@forelse($customers as $customer) @php $rating = $customer->rating; $pendingDelays = $customer->paymentDelays()->where('status', '!=', 'paid')->sum('delayed_amount'); $violations = $customer->violations()->count(); $isBlacklisted = $customer->isBlacklisted(); @endphp @empty @endforelse
{{ app()->getLocale() == 'ar' ? 'العميل' : 'Customer' }} {{ app()->getLocale() == 'ar' ? 'الحالة' : 'Status' }} {{ app()->getLocale() == 'ar' ? 'العقود' : 'Contracts' }} {{ app()->getLocale() == 'ar' ? 'المبلغ المتأخر' : 'Outstanding' }} {{ app()->getLocale() == 'ar' ? 'المخالفات' : 'Violations' }} {{ app()->getLocale() == 'ar' ? 'الإجراءات' : 'Actions' }}
{{ substr($customer->name, 0, 1) }}
{{ $customer->name }}
{{ $customer->phone }}
@if($isBlacklisted) 🚫 {{ app()->getLocale() == 'ar' ? 'محظور' : 'Blacklisted' }} @elseif($rating) @if($rating->risk_level == 'critical') 🔴 {{ app()->getLocale() == 'ar' ? 'حرج' : 'Critical' }} @elseif($rating->risk_level == 'high') 🟠 {{ app()->getLocale() == 'ar' ? 'مرتفع' : 'High' }} @elseif($rating->risk_level == 'medium') 🟡 {{ app()->getLocale() == 'ar' ? 'متوسط' : 'Medium' }} @else 🟢 {{ app()->getLocale() == 'ar' ? 'منخفض' : 'Low' }} @endif @else 🆕 {{ app()->getLocale() == 'ar' ? 'جديد' : 'New' }} @endif
{{ $customer->rentals()->count() }}
@php $active = $customer->rentals()->where('status', 'active')->count(); @endphp {{ $active }} {{ app()->getLocale() == 'ar' ? 'نشط' : 'active' }}
{{ number_format($pendingDelays, 0) }} {{ app()->getLocale() == 'ar' ? 'ر.س' : 'SAR' }}
@if($violations > 0) ⚠️ {{ $violations }} @else @endif {{ app()->getLocale() == 'ar' ? 'عرض الملف' : 'View Profile' }}
{{ app()->getLocale() == 'ar' ? 'لا توجد عملاء' : 'No customers found' }}
{{ $customers->links() }}
@endsection