@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.
@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
@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 }}
@empty
Yetkili kullanıcı bulunmuyor.
@endforelse
@endsection