@extends('layouts.app') @section('title', __('auth::messages.users.title')) @section('content') @can('create', \App\Models\User::class) {{ __('auth::messages.users.create') }} @endcan
{{ __('common.reset') }}
@forelse ($users as $user) @empty @endforelse
{{ __('auth::messages.fields.name') }} {{ __('auth::messages.fields.roles') }} {{ __('auth::messages.fields.branch') }} {{ __('auth::messages.fields.status') }} {{ __('auth::messages.users.last_sign_in') }} {{ __('common.actions') }}
{{ $user->name }}
{{ $user->email }}
@forelse ($user->roles as $role) {{ __('roles.'.$role->name) }} @empty {{ __('auth::messages.users.no_roles') }} @endforelse {{ $user->branch?->name ?? '—' }} {{-- Status carries an icon as well as a colour. Roughly one man in twelve has a colour vision deficiency, and a row that only differs by hue is unreadable to them. --}} @php($tone = ['active' => 'px-pill--green', 'suspended' => 'px-pill--amber', 'inactive' => 'px-pill--grey'][$user->status] ?? 'px-pill--grey') @php($icon = ['active' => 'bi-check-circle', 'suspended' => 'bi-pause-circle', 'inactive' => 'bi-slash-circle'][$user->status] ?? 'bi-circle') {{ __('users.status.'.$user->status) }} @if ($user->isLocked()) @endif {{ $user->last_login_at?->diffForHumans() ?? __('auth::messages.users.never_signed_in') }} @can('update', $user) @endcan

{{ __('auth::messages.users.empty') }}

{{ __('auth::messages.users.empty_text') }}

@if ($users->hasPages())
{{ $users->links() }}
@endif
@endsection