@php /** @var \App\Models\Branch $branch */ /** @var \Illuminate\Support\Collection|\App\Models\User[] $assignedUsers */ /** @var \Illuminate\Support\Collection|\App\Models\User[] $availableUsers */ /** @var \Illuminate\Support\Collection|\App\Models\Branch[] $otherBranches */ @endphp {{ __('Branch Users') }}
@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

Users for {{ $branch->name }}

Code: {{ $branch->code ?? '—' }} · Status: @if ($branch->is_active) Active @else Inactive @endif @if ($branch->is_default) Default branch @endif

Back to Branches

Add user to this branch

@csrf
@forelse ($assignedUsers as $user) @empty @endforelse
Name Email Department Roles Status Actions
{{ $user->name }} {{ $user->surname }} {{ $user->email }} {{ $user->department->name ?? '—' }} @php $roles = $user->getRoleNames(); @endphp @if ($roles->isEmpty()) No roles @else
@foreach ($roles as $role) {{ $role }} @endforeach
@endif
@if ($user->is_disabled) Disabled @else Active @endif @if ($otherBranches->isEmpty()) No additional branches @else
@csrf
@endif
No users are currently assigned to this branch.