{{-- Print button (hidden on print) --}} {{-- ==================================================== HEADER ===================================================== --}}
LOGO
EMPRESA
{{ $project->name }}
@if($project->address)
{{ $project->address }}
@endif
@if($project->start_date) Inicio: {{ $project->start_date->format('d/m/Y') }} @endif @if($project->end_date_estimated)  •  Fin estimado: {{ $project->end_date_estimated->format('d/m/Y') }} @endif
Informe de Proyecto Generado el {{ now()->format('d/m/Y H:i') }}
Estado: {{ ucfirst(str_replace('_', ' ', $project->status ?? 'N/A')) }}
{{-- ==================================================== SUMMARY STATS ===================================================== --}}
Resumen General
{{ $stats['total_features'] }}
Total elementos
{{ $stats['completed_features'] }}
Completados
{{ $stats['avg_progress'] }}%
Progreso medio
{{ $stats['total_inspections'] }}
Inspecciones
{{ $stats['open_issues'] }}
Issues abiertos
{{-- ==================================================== PHASES ===================================================== --}}
Detalle por Fase
@forelse($phases as $phase) @php $phaseFeatures = $phase->layers->flatMap(fn($l) => $l->features); $phaseColor = $phase->color ?? '#3b82f6'; @endphp
{{ $phase->name }}
@if($phase->planned_start) {{ $phase->planned_start->format('d/m/Y') }} — {{ $phase->planned_end?->format('d/m/Y') ?? 'Sin fecha fin' }} @else Sin fechas planificadas @endif  •  {{ $phaseFeatures->count() }} elementos
{{ $phase->progress_percent ?? 0 }}%
@if($phaseFeatures->count() > 0) @foreach($phaseFeatures as $feature) @php $lastInspection = $feature->inspections->sortByDesc('created_at')->first(); @endphp @endforeach
Elemento Estado Progreso Responsable Última inspección
{{ $feature->name ?? 'Sin nombre' }} {{ match($feature->status) { 'planned' => 'Planificado', 'started' => 'Iniciado', 'in_progress' => 'En progreso', 'completed' => 'Completado', 'verified' => 'Verificado', default => ($feature->status ?? 'N/A'), } }}
{{ $feature->progress ?? 0 }}%
{{ $feature->responsible ?? ($feature->responsibleUser?->name ?? '—') }} {{ $lastInspection?->created_at?->format('d/m/Y') ?? '—' }}
@else
Sin elementos registrados en esta fase.
@endif
@empty
No hay fases registradas en este proyecto.
@endforelse {{-- ==================================================== Footer ===================================================== --}}
ConstProgress — Sistema de Gestión de Obras {{ now()->format('d/m/Y H:i') }}