@foreach ($docPage['parts'] ?? [] as $part)
@if (($part['type'] ?? '') === 'section_title' && ! empty($part['text']))
{{ display_text($part['text']) }}
@elseif (($part['type'] ?? '') === 'fullwidth' && ! empty($part['html']))
@php($pciFwLayout = (string) ($part['fullwidth_layout'] ?? ''))
{!! $part['html'] !!}
@elseif (($part['type'] ?? '') === 'technical_parameters_brief' && ! empty($part['html']))
{!! $part['html'] !!}
@elseif (($part['type'] ?? '') === 'embed_attachments' && ! empty(trim((string) ($part['html'] ?? ''))))
{!! $part['html'] !!}
@elseif (($part['type'] ?? '') === 'location_photos' && ! empty($part['photos']))
Field Location Photos
@foreach ($part['photos'] as $lPhoto)
@if($lPhoto['name_of_location'])
{{ $lPhoto['name_of_location'] }}
@endif
@if($lPhoto['latitude'] && $lPhoto['longitude'])
GPS: {{ $lPhoto['latitude'] }}, {{ $lPhoto['longitude'] }}
@endif
@if($lPhoto['captured_at'])
{{ $lPhoto['captured_at'] }}
@endif
@endforeach
@elseif (($part['type'] ?? '') === 'sign_off_sheet' && ! empty($part['data']) && is_array($part['data']))
@php($sign = $part['data'])
NAME OF SCHEME :
{{ display_text($sign['scheme_upper'] ?? '—') }}
@foreach (($sign['blocks'] ?? []) as $sigBlock)
{{ display_text($sigBlock['side_label'] ?? '') }}
@foreach (($sigBlock['segments'] ?? $sigBlock['lines'] ?? []) as $seg)
@if (($seg['type'] ?? '') === 'signature')
@if (! empty($seg['url']))
 }})
@else
@endif
@else
{{ display_text((string) ($seg['text'] ?? '')) }}
@endif
@endforeach
@endforeach
@elseif (($part['type'] ?? '') === 'sec5_continuation')
@if (! empty(trim((string) ($part['heading_text'] ?? ''))))
{{ display_text($part['heading_text']) }}
@endif
@if (! empty($part['show_sector_intro']))
{!! nl2br(e(display_text($part['sector_intro_plain'] ?? ''))) !!}
{!! $part['objectives_html'] !!}
@else
{!! $part['objectives_html'] !!}
@endif
@if (! empty(trim((string) ($part['attachments_html'] ?? ''))))
{!! $part['attachments_html'] !!}
@endif
@elseif (($part['type'] ?? '') === 'location_fields' && ! empty($part['fields']) && is_array($part['fields']))
@foreach ($part['fields'] as $locField)
@if (is_array($locField))
{{ display_text($locField['label'] ?? '') }}
{{ display_text($locField['value'] ?? '') }}
@endif
@endforeach
@elseif (($part['type'] ?? '') === 'lv')
@php($pciLvLabel = trim((string) display_text($part['label'] ?? '')))
@if ($pciLvLabel !== ''){!! nl2br(e($pciLvLabel)) !!}:@endif
{!! ($part['value_html'] ?? '') !!}
@elseif (($part['type'] ?? '') === 'table' && ! empty($part['rows']))
@php($pciTableLayout = (string) ($part['layout'] ?? ''))
@php($pciTableIsChecklist = $pciTableLayout === 'checklist')
@php($pciTableIsSdg = $pciTableLayout === 'sdg')
@php($pciTableIsLocationCoords = $pciTableLayout === 'location_coords')
@php($pciTableIsCoaCombined = $pciTableLayout === 'coa_combined_total')
@if (! empty($part['title']))
{{ display_text($part['title']) }}
@endif
@foreach ($part['headers'] ?? [] as $hi => $h)
| {{ display_text($h) }} |
@endforeach
@foreach ($part['rows'] as $trow)
@foreach ($trow as $ci => $cell)
| {{ display_text($cell) }} |
@endforeach
@endforeach
@if (! empty($part['footer_row']) && is_array($part['footer_row']))
@foreach ($part['footer_row'] as $cell)
| {{ display_text($cell) }} |
@endforeach
@endif
@endif
@endforeach