@extends('layouts.admin') @section('title', 'Users and roles') @section('crumbs', 'Settings · Super Admin only') @section('actions')Add admin user@endsection @section('content')
Admin panel{{ $admins->count() }} users/admin/login · password + 6-digit code
Team workspace{{ $teamCount }} people/team/login · managed in Team directory
Client portal{{ $clientCount }} client users/client/login · invited from each client
@foreach($admins as $a) @endforeach
NameEmailRoleStatusLast sign-in
{{ $a->initials() }}{{ $a->name }}{{ $a->email }}{{ $a->roleLabel() }}{{ $a->last_login_at?->diffForHumans() ?? 'Never' }}Edit

What each role can open

@php($areas = ['dashboard' => 'Dashboard', 'crm' => 'Leads and clients', 'proposals' => 'Proposals', 'projects' => 'Projects and calendar', 'support' => 'Support tickets', 'finance' => 'Invoices, expenses, finance report', 'content' => 'Website content', 'analytics' => 'Website analytics', 'hr' => 'Team, attendance, leave', 'timesheets' => 'Timesheets', 'payroll' => 'Payroll', 'hiring' => 'Hiring', 'users' => 'Users, settings, activity log'])
@foreach(\App\Models\Admin::ROLES as $r => $l)@endforeach@foreach($areas as $k => $label)@foreach(\App\Models\Admin::ROLES as $r => $l)@php($p = \App\Models\Admin::PERMISSIONS[$r] ?? [])@endforeach@endforeach
Area{{ $l }}
{{ $label }}{{ $r === 'super_admin' || in_array($k, $p) ? '✓ Full' : (in_array($k.'.view', $p) ? 'View only' : '—') }}

Roles are defined in app/Models/Admin.php (PERMISSIONS). Team members and clients never see the admin panel; they have their own separate logins.

@endsection