@extends('admin.adminLayout') @section('admin_page_title') Users Hierarchy @endsection @section('admin_content')
{{-- Keep the original hierarchy editor as the first section. --}}

Users Hierarchy

Drag administrators to define parent and child relationships.

Non-super administrators
Super administrators are deliberately excluded from this hierarchy. Only regular administrators and their children appear below.
Editable structure
Drag-and-drop list
Saved
  1. Loading hierarchy…
Configuration
Hierarchy levels
@if($canEditLevels) @endif
@if($canEditLevels)
@csrf @foreach($levels as $level)
@endforeach

Level changes save automatically. The number of configured levels determines the maximum nesting depth.

@else

You can view and reorganize the permitted hierarchy, but only a super administrator can edit hierarchy-level names.

@endif
{{-- The requested visual/binary tree is a separate second section below the original editor. --}}

Visual Administration Tree

A connected tree of regular administrators. Drag a card onto another card to change its parent.

@if(auth()->user()->is_super_admin === 'yes')
Move to root levelDrop a regular administrator here to remove its parent.
@endif
Active administrator Inactive administrator Drag cards to update
Building visual tree…
@endsection @section('script') @endsection