@extends('layouts.management') @section('content')
Corporate Administration / Staff & Identity

User & Staff Management

Access Governance

Oversee registered users, station supervisors, unit leaders, and role assignments across TANRAIL.

@if(session('success'))

{{ session('success') }}

@endif @if(session('error'))

{{ session('error') }}

@endif
Total System Personnel

{{ $users->total() }}

Registered ERP user accounts

Assigned Roles

{{ $roles->count() }}

Configured access categories

Security & Sovereignty

Enterprise Guarded

Role & Scope level security active

@if(($search ?? false) || ($roleFilter ?? false)) Clear @endif

Personnel Directory

Official officers, unit directors, and station personnel.

+ Register Staff
@forelse($users as $user) @empty @endforelse
Staff Member Assigned Role Operational Jurisdiction Registered Actions
{{ substr($user->name, 0, 1) }}
{{ $user->name }} @if(auth()->id() === $user->id) You @endif
{{ $user->email }}
@if($user->roles->isNotEmpty()) @foreach($user->roles as $role) {{ $role->name }} @endforeach @else No role assigned @endif @php $firstRole = $user->roles->first(); $pivot = $firstRole?->pivot; @endphp @if($pivot) @if(str_contains($pivot->scope_type, 'Organization')) Enterprise Sovereignty (All Units) @elseif(str_contains($pivot->scope_type, 'BusinessUnit')) @php $bu = \App\Domains\Core\Models\BusinessUnit::find($pivot->scope_id); @endphp Division: {{ $bu?->name ?? 'Unit #'.$pivot->scope_id }} @elseif(str_contains($pivot->scope_type, 'Branch')) @php $br = \App\Domains\Core\Models\Branch::find($pivot->scope_id); @endphp Station: {{ $br?->name ?? 'Branch #'.$pivot->scope_id }} @else {{ class_basename($pivot->scope_type) }} #{{ $pivot->scope_id }} @endif @else General User @endif {{ $user->created_at ? $user->created_at->format('M d, Y') : 'N/A' }} Edit @if(auth()->id() !== $user->id)
@csrf @method('DELETE')
@endif

No staff members found matching criteria.

+ Register First Staff Member
@if($users->hasPages())
{{ $users->links() }}
@endif
@endsection