@extends('admin.layouts.app') @section('title', 'Edit User — '.$user->name) @section('content')
{{-- Header --}}
← Back to Users

{{ $user->name }}

{{ $user->roles->pluck('label')->implode(', ') ?: 'No role' }} {{ $user->statusLabel() }} {{ $user->email }} 👁 Details @if($user->teams->isNotEmpty()) @foreach($user->teams as $t) {{ $t->name }} @endforeach @endif
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
@endif
@csrf {{-- 1. ACCOUNT --}}
Account
Fill this only when you want to change the password (min 8 characters).
{{-- 2. CENTRAL PROFILE — mobile/location + status + purpose & interests (§20) --}}
Profile — Purpose & Interests
@php $uInterests = old('interests', $user->interests->where('type', 'interest')->pluck('value')->all()); @endphp
Blocked / Suspended = login + sessions are disabled immediately.
@foreach($interests as $key => $label) @php $checked = in_array($key, $uInterests, true); @endphp @endforeach
All answers are saved to the same User ID — no separate account (One Person → One Account).
{{-- 3. ACCESS: role + teams --}}
Access — Role + Teams
Role = what they can do, Teams = where they can do it — enforcement combines both (already LIVE). Role changes apply immediately: new rules take effect from the next request.
@foreach($roles as $role)
{{ $role->label }}: {{ $role->description }}
@endforeach
@if($teams->isEmpty())
No teams yet — create them first under Administration → Teams.
@else @php $selectedTeamIds = old('teams', $user->teams->pluck('id')->all()); @endphp
@foreach($teams as $team) @php $checked = in_array($team->id, $selectedTeamIds, true); @endphp @endforeach
The team's place is the user's scope. Teams are managed under Administration → Teams, not here.
@endif
Cancel
{{-- DANGER ZONE --}}
Danger Zone
User delete = roles + team links + trusted devices are removed. You cannot delete yourself; the last Super Admin is also protected. @if($user->id !== auth()->id())
@csrf @method('DELETE')
@endif
{{-- Contract note --}}
Contract: Place → Team → User → Role → Permission → Content — this user's scope = their Teams, capability = Role (Administration → Roles).
@endsection