@extends('admin.layouts.main') @section('title','Manajemen Anggota & Staff') @push('styles') @endpush @section('content') {{-- Stats --}}
@foreach([ ['Total Anggota',$stats['total'],'fas fa-users','#dbeafe','#2563eb'], ['Super Admin',$stats['admin'],'fas fa-user-shield','#f5f3ff','#7c3aed'], ['Staff',$stats['staff'],'fas fa-user-tie','#f0fdfa','#0d9488'], ['Aktif',$stats['active'],'fas fa-check-circle','#dcfce7','#16a34a'], ] as $s)
{{ $s[1] }}
{{ $s[0] }}
@endforeach
{{-- Filter --}}
{{-- Table --}}
Daftar Anggota ({{ $users->total() }})
@forelse($users as $user) @empty @endforelse
Anggota Role & Posisi Hak Akses Login Terakhir Status Aksi
{{ $user->initials }}
{{ $user->name }} @if($user->id === auth()->id()) Anda @endif
{{ $user->email }}
@if($user->phone)
{{ $user->phone }}
@endif
{{ $user->role_label }} @if($user->position)
{{ $user->position }}
@endif
@if($user->role === 'admin') Semua Akses @else @php $perms = \App\Models\RolePermission::getPermissionsForRole($user->role); @endphp {{ count($perms) }} hak akses Lihat detail → @endif {{ $user->last_login_at ? $user->last_login_at->diffForHumans() : 'Belum pernah' }} @if($user->last_login_at)
{{ $user->last_login_at->format('d M Y H:i') }}
@endif
@if($user->is_active) Aktif @else Nonaktif @endif
@if(auth()->user()->can('edit_users')) @if($user->id !== auth()->id())
@csrf
@endif @endif @if(auth()->user()->can('delete_users') && $user->id !== auth()->id())
@csrf @method('DELETE')
@endif
Belum ada anggota
@if($users->hasPages())
{{ $users->links() }}
@endif
@endsection