@extends('layouts.admin') @section('title', 'Detailed Report') @section('header', 'Detailed Analysis Report') @section('subheader', 'Comprehensive breakdown of survey results') @section('header-actions') Download PDF @endsection @section('content') @include('company.partials.survey-selector') @include('company.partials.low-volume-warning')

Report Overview

Survey:

{{ $survey->title }}

Period:

{{ $survey->starts_at ? $survey->starts_at->format('M j') : 'N/A' }} - {{ $survey->ends_at ? $survey->ends_at->format('M j, Y') : 'Ongoing' }}

Total Responses:

{{ $responseStats['total_responses'] }}

Grand Mean:

{{ number_format($analytics->grand_mean ?? 0, 2) }} / 5.00

Response Breakdown

@include('company.partials.response-stats')

Engagement Classification

@include('company.partials.engagement-breakdown')

Category Analysis

@foreach($categories as $category) @php $score = $analytics->category_scores[$category->slug] ?? 0; $interpretation = \App\Models\Category::getScoreInterpretation($score); @endphp @endforeach
Category Score Status Visual
{{ $category->icon }} {{ $category->name }} {{ round($score) }}% {{ $interpretation['label'] }}
@if($lowVolumeWarnings['show_heatmap'] && count($heatmapData['data']) > 0)

Department × Category Heatmap

@foreach($heatmapData['categories'] as $cat) @endforeach @foreach($heatmapData['data'] as $row) @foreach($heatmapData['categories'] as $cat) @php $score = $row[$cat['slug']] ?? null; $interpretation = $score !== null ? \App\Models\Category::getScoreInterpretation($score) : null; @endphp @endforeach @endforeach
Department{{ $cat['icon'] }}
{{ $row['department'] }} @if($score !== null) {{ round($score) }} @else - @endif
@elseif(!$lowVolumeWarnings['show_heatmap'])

Department × Category Heatmap

Heatmap unavailable due to insufficient data per department (minimum 5 required for anonymity).

@endif

All Questions Ranked

{{ $questions->count() }} questions
@foreach($questions as $index => $q) @php $interpretation = \App\Models\Category::getScoreInterpretation($q['favorability'] ?? 0); @endphp @endforeach
# Question Mean Favorability
{{ $index + 1 }}

{{ Str::limit($q['text'], 70) }}

{{ $q['category'] }}
{{ number_format($q['mean'] ?? 0, 2) }} {{ round($q['favorability'] ?? 0) }}%

Open-Ended Responses

{{ $openResponses }}

Total open-ended comments collected

View All Comments
@endsection