@php $isDenison = !empty($analytics->category_scores) && isset($analytics->category_scores['denison-mission']); $dScores = $analytics->category_scores ?? []; if ($isDenison) { $mission = $dScores['denison-mission'] ?? 0; $adaptability = $dScores['denison-adaptability'] ?? 0; $involvement = $dScores['denison-involvement'] ?? 0; $consistency = $dScores['denison-consistency'] ?? 0; $overallCulture = round(($mission + $adaptability + $involvement + $consistency) / 4, 1); $externalFocus = round(($mission + $adaptability) / 2, 1); $internalFocus = round(($involvement + $consistency) / 2, 1); $flexible = round(($adaptability + $involvement) / 2, 1); $stable = round(($mission + $consistency) / 2, 1); } function detailedPdfColor($score) { if ($score >= 80) return '#16a34a'; if ($score >= 70) return '#65a30d'; if ($score >= 60) return '#ca8a04'; if ($score >= 50) return '#ea580c'; return '#dc2626'; } function detailedPdfLabel($score) { if ($score >= 80) return 'Strong'; if ($score >= 70) return 'Healthy'; if ($score >= 60) return 'Moderate'; if ($score >= 50) return 'Needs Work'; return 'Critical'; } @endphp {{ $isDenison ? 'Detailed Culture Report' : 'Detailed Report' }} - {{ $survey->title }}
@if($isDenison)
{{ $overallCulture }}%
Overall Culture Score
@else
{{ round($analytics->overall_engagement_index) }}%
Engagement Index
@endif

{{ $survey->title }}

{{ $isDenison ? 'Detailed Culture Analysis Report' : 'Detailed Analysis Report' }} | Generated: {{ now()->format('F j, Y') }}

@if($lowVolumeWarnings['level'] !== 'none' && count($lowVolumeWarnings['messages']) > 0)
Note: @foreach($lowVolumeWarnings['messages'] as $message) {{ $message }} @endforeach
@endif
Response Overview
{{ $responseStats['total_responses'] }}
Total Responses
{{ $responseStats['via_invitation'] }}
Via Invitation
{{ $responseStats['via_direct_link'] }}
Via Direct Link
{{ number_format($analytics->grand_mean ?? 0, 2) }}
Grand Mean
out of 5.0
@if($isDenison)
Denison Culture Profile
Internal + Flexible
Involvement
{{ round($involvement) }}%
Empowerment | Team Orientation | Capability Dev.
External + Flexible
Adaptability
{{ round($adaptability) }}%
Creating Change | Stakeholder Focus | Org. Learning
Internal + Stable
Consistency
{{ round($consistency) }}%
Core Values | Agreement | Coordination
External + Stable
Mission
{{ round($mission) }}%
Strategic Direction | Goals | Vision
@else
Engagement Classification
@endif
{{ $isDenison ? 'Trait Scores' : 'Category Scores' }}
@foreach($categories as $category) @php $score = $analytics->category_scores[$category->slug] ?? 0; $interpretation = \App\Models\Category::getScoreInterpretation($score); @endphp @endforeach
{{ $isDenison ? 'Trait' : 'Category' }} Score Status Visual
{{ $category->icon }} {{ $category->name }} {{ round($score) }}% {{ $interpretation['label'] }}

{{ $isDenison ? 'Department x Trait Analysis' : 'Department Analysis & Questions' }}

@if($lowVolumeWarnings['show_heatmap'] && count($heatmapData['data']) > 0)
{{ $isDenison ? 'Department x Denison Trait Heatmap' : 'Department x Category Heatmap' }}
@foreach($heatmapData['categories'] as $cat) @endforeach @foreach($heatmapData['data'] as $row) @foreach($heatmapData['categories'] as $cat) @php $score = $row[$cat['slug']] ?? null; if ($score !== null) { if ($score >= 75) $bg = '#16a34a'; elseif ($score >= 65) $bg = '#65a30d'; elseif ($score >= 55) $bg = '#ca8a04'; elseif ($score >= 45) $bg = '#ea580c'; else $bg = '#dc2626'; } @endphp @endforeach @endforeach
Department{{ $cat['icon'] }} {{ Str::limit($cat['name'], 10) }}
{{ Str::limit($row['department'], 25) }} @if($score !== null) {{ round($score) }} @else - @endif

Departments with fewer than 5 respondents are hidden to protect anonymity.

@else
Department Heatmap

Heatmap unavailable - insufficient responses per department (minimum 5 required for anonymity protection).

@endif
Top 10 Highest Scoring Questions
@foreach($questions->take(10) as $index => $q) @php $interpretation = \App\Models\Category::getScoreInterpretation($q['favorability'] ?? 0); @endphp @endforeach
# Question {{ $isDenison ? 'Trait' : 'Category' }} Mean Fav %
{{ $index + 1 }} {{ Str::limit($q['text'], 50) }} {{ $q['category'] }} {{ number_format($q['mean'] ?? 0, 2) }} {{ round($q['favorability'] ?? 0) }}%
Bottom 10 Lowest Scoring Questions (Focus Areas)
@foreach($questions->sortBy('favorability')->take(10) as $index => $q) @php $interpretation = \App\Models\Category::getScoreInterpretation($q['favorability'] ?? 0); @endphp @endforeach
# Question {{ $isDenison ? 'Trait' : 'Category' }} Mean Fav %
{{ $index + 1 }} {{ Str::limit($q['text'], 50) }} {{ $q['category'] }} {{ number_format($q['mean'] ?? 0, 2) }} {{ round($q['favorability'] ?? 0) }}%