@extends('layouts.management') @section('content') @php $currentScopeType = 'organization'; $currentScopeId = $organizations->first()?->id ?? 1; $currentScopeTitle = $organizations->first()?->name ?? 'TANRAIL'; if (isset($activeRole) && $activeRole->pivot) { if (str_contains($activeRole->pivot->scope_type, 'BusinessUnit')) { $currentScopeType = 'business_unit'; $currentScopeId = $activeRole->pivot->scope_id; $bu = $businessUnits->firstWhere('id', $currentScopeId); $currentScopeTitle = $bu ? $bu->name : 'Business Unit #'.$currentScopeId; } elseif (str_contains($activeRole->pivot->scope_type, 'Branch')) { $currentScopeType = 'branch'; $currentScopeId = $activeRole->pivot->scope_id; $br = $branches->firstWhere('id', $currentScopeId); $currentScopeTitle = $br ? $br->name : 'Branch #'.$currentScopeId; } else { $currentScopeType = 'organization'; $currentScopeId = $activeRole->pivot->scope_id; $currentScopeTitle = $organizations->first()?->name ?? 'TANRAIL'; } } @endphp
Modify personnel profile credentials, access roles, or reassign operational station jurisdiction.