@if ($showNotification)
@if($notificationType === 'success') @elseif($notificationType === 'error') @else @endif

{{ $notificationMessage }}

@endif @if($showChangesSummary)

Unsaved Changes

You have {{ count($changesSummary) }} unsaved change{{ count($changesSummary) > 1 ? 's' : '' }}:

    @foreach($changesSummary as $field => $change)
  • {{ $change['label'] }}: @if($field === 'permissions') Permissions updated @elseif($field === 'role') {{ ucfirst($change['from']) }} → {{ ucfirst($change['to']) }} @elseif($field === 'status') {{ ucfirst($change['from']) }} → {{ ucfirst($change['to']) }} @elseif($field === 'selectedDepartments' || $field === 'primaryDepartment') @if(is_array($change['from'])) {{ count($change['from']) }} → {{ count($change['to']) }} departments @else {{ $change['from'] ?: 'None' }} → {{ $change['to'] ?: 'None' }} @endif @else @if(empty($change['from'])) Added: "{{ is_array($change['to']) ? implode(', ', $change['to']) : $change['to'] }}" @elseif(empty($change['to'])) Removed: "{{ is_array($change['from']) ? implode(', ', $change['from']) : $change['from'] }}" @else "{{ is_array($change['from']) ? implode(', ', $change['from']) : $change['from'] }}" → "{{ is_array($change['to']) ? implode(', ', $change['to']) : $change['to'] }}" @endif @endif
  • @endforeach
@endif

Edit User: {{ $user->name }}

{{ ucfirst($user->status) }} {{ ucfirst($user->role) }}

Update user information and permissions @if($showChangesSummary) • {{ count($changesSummary) }} unsaved change{{ count($changesSummary) > 1 ? 's' : '' }} @endif

@if($isUpdating)
Updating...
@endif
@if($user->id === auth()->id())

Note: You are editing your own account. Some restrictions apply to prevent self-lockout.

@endif

Basic Information

user()->hasPermission('users.update')) disabled @endif> @error('name')

{{ $message }}

@enderror
user()->hasPermission('users.update')) disabled @endif> @error('email')

{{ $message }}

@enderror
user()->hasPermission('users.update')) disabled @endif> @error('phone')

{{ $message }}

@enderror
user()->hasPermission('users.update')) disabled @endif> @error('job_title')

{{ $message }}

@enderror
@foreach($departments as $department)
user()->hasPermission('users.update')) disabled @endif> @if(in_array($department->id, $selectedDepartments))
user()->hasPermission('users.update')) disabled @endif>
@endif
@endforeach
@if(empty($departments))

No departments available. Create departments first.

@endif

Security

Leave password fields empty to keep the current password

user()->hasPermission('users.update')) disabled @endif>
@error('password')

{{ $message }}

@enderror @if(!empty($password))

✓ New password entered ({{ strlen($password) }} characters)

Strength: @php $strength = 0; $strengthLabel = 'Weak'; $strengthColor = 'bg-red-500'; if (strlen($password) >= 8) $strength++; if (preg_match('/[A-Z]/', $password)) $strength++; if (preg_match('/[a-z]/', $password)) $strength++; if (preg_match('/[0-9]/', $password)) $strength++; if (preg_match('/[^A-Za-z0-9]/', $password)) $strength++; if ($strength >= 4) { $strengthLabel = 'Strong'; $strengthColor = 'bg-green-500'; } elseif ($strength >= 3) { $strengthLabel = 'Medium'; $strengthColor = 'bg-yellow-500'; } @endphp
{{ $strengthLabel }}
Requirements: 8+ chars, uppercase, lowercase, number, special character
@endif
user()->hasPermission('users.update')) disabled @endif>
@error('password_confirmation')

{{ $message }}

@enderror @if(!empty($password_confirmation))

{{ $password === $password_confirmation ? '✓ Passwords match' : '✗ Passwords do not match' }}

@endif

Role & Permissions

@error('role')

{{ $message }}

@enderror @if($user->id === auth()->id())

You cannot change your own role.

@elseif(!auth()->user()->isSuperadmin())

Super Administrator role restricted. Only super admins can assign this role.

@elseif($role === 'external')

External users will have access to the future KYC system.

@elseif($role === 'lawyer')

Lawyers can review conflict of interest notifications.

@endif
@if($role === 'lawyer')
@error('lawyer_level')

{{ $message }}

@enderror

Senior: Can manage KYC, approve conflicts. Associate: Can read clients/proposals, manage KYC. Trainee: Can only review conflicts.

@endif
@error('status')

{{ $message }}

@enderror @if($user->id === auth()->id())

You cannot deactivate yourself.

@endif
@if($role !== 'admin' && $role !== 'lawyer')
@foreach($availablePermissions as $permission => $label)
@endforeach
@if($role === 'external')

External users have limited access to internal CRM features.

@endif @error('permissions')

{{ $message }}

@enderror
@elseif($role === 'admin')

Administrator Role: This user has full access to all system features and can manage other users.

@elseif($role === 'lawyer')

Lawyer Role: This user can review conflict of interest notifications and provide legal assessments.

@endif

Workload Configuration

user()->hasPermission('users.update')) disabled @endif> @error('daily_hours')

{{ $message }}

@enderror

Number of hours per day for workload calculation

user()->hasPermission('users.update')) disabled @endif> @error('hourly_rate')

{{ $message }}

@enderror

Hourly rate for workload calculation

@if($user->daily_hours && $user->hourly_rate)

Current Workload Status

Daily Capacity
{{ $user->daily_hours }} hours
Hourly Rate
€{{ number_format($user->hourly_rate, 2) }}
Monthly Value
€{{ number_format($user->getMonthlyWorkloadValue(), 2) }}
{{ $user->getWorkloadStatusLabel() }}
@endif

Workload Tracking: These fields help calculate user workload status and capacity utilization. Leave empty if not applicable.

Additional Information

@error('notes')

{{ $message }}

@enderror

Account Information

Account Created
{{ $user->created_at->format('M j, Y g:i A') }}
Last Updated
{{ $user->updated_at->format('M j, Y g:i A') }}
Last Login
{{ $user->last_login_at ? $user->last_login_at->format('M j, Y g:i A') : 'Never' }}
Email Verified
@if($user->email_verified_at) Verified @else Not Verified @endif
@if(auth()->user()->hasPermission('contacts.manage')) @endif @if(auth()->user()->hasPermission('users.update')) @else
Read-only mode - You can view but not edit user information
@endif
@livewire('user-departure-manager')