@extends('layouts.management') @section('content')

Organization Structure

Enterprise Topology

Complete administrative topology from parent enterprise down to divisions and branches.

{{ substr($organization->code ?? 'T', 0, 1) }}
ENTERPRISE ROOT • LEVEL 1

{{ $organization->name }}

Edit Profile
Entity Code: {{ $organization->code }}
Headquarters: {{ $organization->city ?? 'Dar es Salaam' }}, {{ $organization->country ?? 'Tanzania' }}
Operating Scope: {{ $organization->businessUnits->count() }} Units, {{ $organization->businessUnits->flatMap->branches->count() }} Branches
LEVEL 2: COMMERCIAL BUSINESS DIVISIONS {{ $organization->businessUnits->count() }} Registered
View Directory →
@forelse($organization->businessUnits as $bu)
{{ $bu->code }}

{{ $bu->name }}

{{ $bu->category ?? 'Commercial Division' }}

@if($bu->status) Active @else Inactive @endif
{{ substr($bu->manager_name ?? ($bu->managerUser->name ?? 'M'), 0, 1) }}
Unit Manager

{{ $bu->managerUser->name ?? ($bu->manager_name ?? 'Unassigned') }}

@if($bu->cost_center) {{ $bu->cost_center }} @endif
LEVEL 3: Outlets ({{ $bu->branches->count() }}) + Add
@if($bu->branches->isEmpty())
No branches assigned.
@else
    @foreach($bu->branches as $branch)
  • {{ $branch->name }}
    {{ $branch->code }} @if($branch->city) • {{ $branch->city }} @endif
  • @endforeach
@endif
@empty

No divisions registered yet.

@endforelse
@endsection