@extends('layout.super-admin-two') @section('title', 'Organizational Unit Details') @section('content') {{-- Success/Error Messages --}} @if(session('success')) @endif @if(session('error')) @endif
{{-- Main Details Card --}}
Unit Information
Station Type

{{ $station->stationType->name ?? 'N/A' }}

Short Name

{{ $station->names()->first()?->shortname ?? 'N/A' }}

Hierarchy Path
{{ $station->getHierarchyPath() ?? 'N/A' }}
{{-- Parent Information --}} @if($station->parent) @else @endif
{{-- Action Buttons --}}
Edit Unit @if( $station->stationType->authority_level == 5) Acquired LR @else Add Child Unit @endif @if(!$station->hasChildren()) @else @endif Back to List
{{-- Child Stations --}} @if($station->hasChildren())
Child Stations
{{ $station->getChildCount() }}
@foreach($station->children()->with('stationType', 'names')->get() as $child) @endforeach
Name Type Children Actions
{{ $child->station_name ?? 'N/A' }}
{{ $child->names()->first()?->shortname ?? 'N/A' }}
{{ $child->stationType->shortcode ?? 'N/A' }} @if($child->hasChildren()) {{ $child->getChildCount() }} @else — @endif
@endif
{{-- Sidebar Information --}}
Unit Details
Type

{{ $station->stationType->name ?? 'N/A' }}

Authority Level: {{ $station->stationType->authority_level ?? 'N/A' }}
Last Updated

{{ $station->date_update?->format('M d, Y') ?? 'Never' }}

{{ $station->date_update?->format('H:i A') ?? 'N/A' }}
Total Children
{{ $station->getChildCount() ?? 0 }} direct child unit(s)
@if($station->parent)
Parent Unit
{{ $station->parent->station_name ?? 'N/A' }}
@endif
{{-- Quick Stats Card --}}
Statistics
{{ $station->getChildCount() ?? 0 }}
Children
{{ $station->stationType->authority_level ?? 'N/A' }}
Level
{{-- Delete Confirmation Modal --}} @endsection @push('styles') @endpush