@foreach ($records as $date => $records)
@if ($date == date('Y-m-d')) TODAY @else {{ date( 'D jS F Y', strtotime($date), ) }} @endif
@foreach ($records as $key => $record) @php $normalised_summary = $record->location_summary; $normalised_record_id = $record->id; if(isset($record->record_id)){ $record = $record->earliest_linked_record(); } @endphp @if (isset($record->form))

{{ $record->created_at->format('h:i A') }}

@if (isset($record->reported_location_id) && ($record->location_id != $record->reported_location_id || $record->reported_location_id != $location->id)) Other site This submission relates to {{ $record->reported_location->trading_name }} @endif @if (isset($record->recorded_case))

Case #{{$record->recorded_case->id}}

@endif

@php $pending_forms = $record->get_pending_forms(true); @endphp @if (!empty($record->form->display_name)) {{ $record->form->display_name }} @else {{ $record->form->name }} @endif {{-- Start of timeline recores show --}}
{{-- @if (isset($normalised_summary)) @foreach ($normalised_summary as $data) @if (isset($data['value']))

{{ $data['label'] ?? ' ' }}

@if (is_array($data['value'])) @foreach ($data['value'] as $item)

{{ $item ?? ' ' }}

@endforeach @else @if (isset($data['rating_icon']) && $data['rating_icon'] == 'stars')

@for ($i = 1; $i <= $data['total_options']; $i++) @endfor

@elseif(isset($data['rating_icon']) && $data['rating_icon'] == 'label')

@for ($i = 1; $i <= $data['total_options']; $i++) {{$i}} @endfor

@else

{{ $data['value'] }}

@endif @endif
@endif @endforeach @endif --}}
@if ($record->LfpseSubmissions->count() > 0) LFPSE Submission

@foreach ($record->LfpseSubmissions as $s) Reference No. {{$s->reference_id}} @endforeach

@endif @if (count($pending_forms) > 0)

• {{count($pending_forms)}} Incomplete Form - Action Needed

@endif
{{-- @if ($record->recorded_case && $record->recorded_case->status !== 'closed') @if ($record->form->allow_editing_state !== 'disable' && is_null($record->all_linked_records()->last()->id) != true && $record->canEdit()) @endif @endif --}} @if (isset($record->recorded_case)) View Case @endif Full Report @if (count($record->getCaseFeedbacks()) != 0) Feedback @endif

@endif @endforeach
@endforeach