@extends('layouts.app') @php use App\Models\Permission; @endphp @section('title', 'Users') @section('heading', 'System users') @section('subheading', 'Each user gets a role, and the role decides what they can reach') @section('actions') @can(Permission::USER_MANAGE) Add user @endcan @endsection @section('content')
{{ number_format($users->total()) }} {{ \Illuminate\Support\Str::plural('user', $users->total()) }}
@forelse ($users as $user) @empty @endforelse
NameEmailRoleRegion scope PositionLast signed inState
{{ $user->name }} @if ($user->staff_no)
Staff no. {{ $user->staff_no }}
@endif
{{ $user->email }} {{ $user->role?->name ?? 'No role' }} {{ $user->region ? $user->region->code.' only' : 'All regions' }} {{ $user->position ?? '—' }} {{ $user->last_login_at?->format('d M Y H:i') ?? 'Never' }} @if ($user->is_active) Active @else Deactivated @endif @if ($user->must_change_password) Password reset pending @endif @can(Permission::USER_MANAGE) @if ($user->is_active)
@csrf @method('DELETE')
@else
@csrf
@endif @endcan
No users match this filter.
@if ($users->hasPages()) @endif
@endsection