@php $results = $getRecord()->results; @endphp
@if($results->isEmpty())

{{ __('initiative_result.no_results_yet') }}

@else
@foreach($results as $result)
{{-- Action buttons (always visible at top-end) --}}
{{-- Edit button --}} {{-- Delete button --}}
{{-- Quarterly Results Header --}}

{{ __('initiative_result.quarterly_targets') }}

{{-- Quarterly Results Grid --}}
{{-- Q1 --}}
{{ __('initiative_result.q1') }}
{{ __('initiative_result.expected') }}: {{ $result->expected_q1 ? number_format($result->expected_q1, 2) : '—' }}
{{ __('initiative_result.actual') }}: {{ $result->actual_q1 ? number_format($result->actual_q1, 2) : '—' }}
{{-- Q2 --}}
{{ __('initiative_result.q2') }}
{{ __('initiative_result.expected') }}: {{ $result->expected_q2 ? number_format($result->expected_q2, 2) : '—' }}
{{ __('initiative_result.actual') }}: {{ $result->actual_q2 ? number_format($result->actual_q2, 2) : '—' }}
{{-- Q3 --}}
{{ __('initiative_result.q3') }}
{{ __('initiative_result.expected') }}: {{ $result->expected_q3 ? number_format($result->expected_q3, 2) : '—' }}
{{ __('initiative_result.actual') }}: {{ $result->actual_q3 ? number_format($result->actual_q3, 2) : '—' }}
{{-- Q4 --}}
{{ __('initiative_result.q4') }}
{{ __('initiative_result.expected') }}: {{ $result->expected_q4 ? number_format($result->expected_q4, 2) : '—' }}
{{ __('initiative_result.actual') }}: {{ $result->actual_q4 ? number_format($result->actual_q4, 2) : '—' }}
{{-- Performance Card Results --}} @if($result->performanceCardResults->isNotEmpty())
{{ __('initiative_result.linked_performance_results') }}
@foreach($result->performanceCardResults as $pcResult) {{ $pcResult->name }} @endforeach
@endif
@endforeach
@endif
{{-- Action Modals --}}