@extends('nfc.account.console', ['title' => $title ?? 'Yetkili Kullanıcılar']) @section('content')
@if(session('admin_impersonation.active'))
Admin Görünümü{{ $user->name }} kullanıcısının panelini görüntülüyorsunuz.
Hesabı Düzenle
@csrf
@endif

Yetkili Kullanıcılar

{{ $customer?->name ?: 'Bayi Hesabı' }} · {{ $user->name }}

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif

Bayi Yetkili Kullanıcıları

Bayi hesabınıza bağlı kullanıcıları görüntüleyin ve mevcut rol/yetkileriniz kapsamında yönetin.

@if($canCreate ?? false) @endif
@forelse($users ?? collect() as $row) @php $status=(string)($row->status ?? ''); $statusLabel=match($status){ 'active'=>'AKTİF', 'inactive'=>'PASİF', 'locked'=>'KİLİTLİ', 'pending'=>'DOĞRULAMA BEKLİYOR', default=>mb_strtoupper($status ?: 'BİLİNMİYOR','UTF-8'), }; $roleText=$row->relationLoaded('roles') ? ($row->roles->pluck('name')->filter()->join(', ') ?: '-') : '-'; $accountLabel=((string)$row->account_type === 'individual') ? 'Bireysel' : 'Bayi'; @endphp
{{ $row->name ?: 'İsimsiz Kullanıcı' }} {{ $row->email ?: '-' }} · {{ $row->phone ?: '-' }}
{{ $statusLabel }}
Müşteri{{ $customer?->name ?: '-' }}
Hesap Tipi{{ $accountLabel }}
Rol{{ $roleText }}
E-posta{{ $row->email_verified_at ? 'Doğrulandı' : 'Doğrulanmadı' }}
@if($canUpdate ?? false) @endif @if(($canStatus ?? false) && (int)$row->id !== (int)$user->id)
@csrf
@endif @if(($canDelete ?? false) && (int)$row->id !== (int)$user->id && (int)$row->id !== (int)($primaryUserId ?? 0))
@csrf @method('DELETE')
@endif
@empty
Yetkili kullanıcı bulunmuyor.
@endforelse
@endsection