@foreach($nodos as $nodo)
{{-- Header de categoría --}}
{{ $nodo['nombre'] }} @if($nodo['es_raiz']) (raíz) @endif {{-- Badges --}} @if($nodo['ponderacion'] !== null) {{ number_format($nodo['ponderacion'], 1) }}% @endif {{ $nodo['agregacion'] === 'promedio_ponderado' ? 'Pond.' : 'Simple' }} {{-- Acciones header --}}
@unless($nodo['es_raiz'])
@csrf @method('DELETE')
@endunless
{{-- Form editar categoría --}}
@csrf @method('PUT') @unless($nodo['es_raiz'])
@endunless
{{-- Contenido colapsable --}}
{{-- Ítems --}} @if(!empty($nodo['items']))
@foreach($nodo['items'] as $item) {{-- Fila de edición inline para ítem manual --}} @if(!empty($item['es_manual'])) @endif @endforeach
Actividad Categoría / Peso
{{ $item['titulo'] }} @if(!empty($item['es_manual'])) Manual @endif @if(!empty($item['es_manual'])) {{ $item['ponderacion'] ?? '—' }} @else {{-- Mover ítem de actividad --}}
@csrf @method('PUT')
@endif
@if(!empty($item['es_manual'])) @endif
@csrf @method('PUT')
@csrf @method('DELETE')
@endif {{-- Acciones --}}
@unless($nodo['es_raiz']) @endunless
{{-- Form agregar ítem manual --}}
@csrf
{{-- Form agregar subcategoría --}}
@csrf
{{-- Hijos recursivos --}} @if(!empty($nodo['children']))
@include('aula.partials.calificaciones-config-nodo', [ 'nodos' => $nodo['children'], 'flatCategories' => $flatCategories, 'curso' => $curso, 'escalaMaxima' => $escalaMaxima ?? null, ])
@endif
@endforeach