@extends('layouts.management') @section('content')
Oversee registered users, station supervisors, unit leaders, and role assignments across TANRAIL.
{{ session('success') }}
{{ session('error') }}
{{ $users->total() }}
Registered ERP user accounts
{{ $roles->count() }}
Configured access categories
Enterprise Guarded
Role & Scope level security active
Official officers, unit directors, and station personnel.
| 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) @endif |
|
No staff members found matching criteria. + Register First Staff Member |
||||