@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) @vite(['resources/css/app.css', 'resources/js/app.js']) @endif

Kelola Mitra

Driver dan penjual yang terdaftar di sistem

@if (session('success'))
{{ session('success') }}
@endif
@php $customerCount = $users->total() ? $users->where('role', 'customer')->count() : 0; $driverCount = $users->total() ? $users->where('role', 'driver')->count() : 0; $sellerCount = $users->total() ? $users->where('role', 'seller')->count() : 0; $activeCount = $users->total() ? $users->where('status', 'active')->count() : 0; $warningCount = $users->total() ? $users->whereIn('status', ['suspended', 'blocked'])->count() : 0; @endphp
Total mitra {{ $users->total() }}
Pelanggan {{ $customerCount }}
Driver {{ $driverCount }}
Penjual / Restoran {{ $sellerCount }}
@forelse ($users as $user) @empty @endforelse
Nama Role Kontak Rating Warning Status Catatan Aksi
{{ $user->name }}
{{ $user->email }}
@php $roleLabels = [match ($user->role) { 'customer' => 'Pelanggan', 'driver' => 'Driver', 'seller' => 'Penjual', default => ucfirst((string) $user->role), }]; if ($user->sellerApplication?->status === 'approved') $roleLabels[] = 'Seller'; if ($user->driverApplication?->status === 'approved') $roleLabels[] = 'Driver'; $roleLabels = array_unique($roleLabels); @endphp @foreach ($roleLabels as $roleLabel) {{ $roleLabel }} @endforeach
{{ $user->phone ?? '-' }}
{{ $user->created_at->format('d/m/Y') }}
{{ number_format((float) $user->rating, 2) }} @php $warningLevel = $user->warning_level ?? 'normal'; @endphp {{ ucfirst($warningLevel) }} {{ $user->status === 'active' ? 'Aktif' : ($user->status === 'suspended' ? 'Ditangguhkan' : 'Diblokir') }} {{ $user->warning_note ?: '-' }}
Belum ada mitra yang terdaftar.
@if ($users->hasPages())
{{ $users->links() }}
@endif