@extends('layouts.app') @section('title', 'User Management') @section('content') @include('partials.flash') @php $selInput = 'py-2.5 px-3 bg-surface-container rounded-lg border-none focus:ring-2 focus:ring-primary/20 text-body-md outline-none'; $curService = (int) request('service'); $curServiceName = optional($services->firstWhere('id', $curService))->name; $hasFilters = request()->hasAny(['q', 'role', 'service', 'status', 'login']); @endphp
@if($hasFilters){{ $users->total() }} {{ Str::plural('user', $users->total()) }} match your filters.
@endif {{-- Standalone bulk form (checkboxes attach via the form= attribute so the per-row delete forms are never nested inside it). --}}| {!! $sortHeader('name', 'User') !!} | {!! $sortHeader('role', 'Role') !!} | {!! $sortHeader('location', 'Location') !!} | {!! $sortHeader('joined', 'Joined') !!} | Actions | |
|---|---|---|---|---|---|
|
{{ strtoupper($initials) }}
{{ $user->name }} {{ $user->email }} |
{{ $role ? (($role === 'service_manager' && ($smLabel = \App\Models\User::smTitleLabel($user->sm_title))) ? $smLabel : (\App\Models\User::roleLabels()[$role] ?? \Illuminate\Support\Str::headline($role))) : 'No role' }} | @php $loc = $user->locationLabel(); $others = $user->services->where('id', '<>', $user->location_service_id)->pluck('name')->sort()->values(); @endphp @if($loc) {{ $loc }} @if($others->isNotEmpty()) + {{ $others->count() > 2 ? $others->take(2)->implode(', ').' +'.($others->count() - 2).' more' : $others->implode(', ') }} @endif @else — @endif | {{ $user->created_at?->format('j M Y') }} |
monitoring
@if($user->id !== auth()->id() && ! $user->hasRole('admin'))
@endif
edit
@if($user->id !== auth()->id())
@else
lock
@endif
|
|
| No users found. Add one. | |||||