@extends('layouts.app') @section('title', 'Reports Archive') @section('content')
{{ $user->first_name }}'s Reports
@if ($reportsAndExams->count() == 0)
No training reports yet.
@else @foreach($reportsAndExams as $reportModel) @if(is_a($reportModel, '\App\Models\TrainingReport')) @if(!$reportModel->draft || $reportModel->draft && \Auth::user()->isMentorOrAbove()) @php $uuid = "instance-".Ramsey\Uuid\Uuid::uuid4(); @endphp
@if(isset($reportModel->position)) {{ $reportModel->position }}  @endif {{ isset(\App\Models\User::find($reportModel->written_by_id)->name) ? \App\Models\User::find($reportModel->written_by_id)->name : "Unknown" }} @can('view', [\App\Models\Training::class, $reportModel->training]) View training @endcan
@markdown($reportModel->content)
@if(isset($reportModel->contentimprove) && !empty($reportModel->contentimprove))

 Areas to improve

@markdown($reportModel->contentimprove)
@endif @if($reportModel->attachments->count() > 0)
@foreach($reportModel->attachments as $attachment) @endforeach @endif
@endif @else @php $uuid = "instance-".Ramsey\Uuid\Uuid::uuid4(); @endphp
@if(isset($reportModel->position)) {{ \App\Models\Position::find($reportModel->position_id)->callsign }}  @endif {{ isset(\App\Models\User::find($reportModel->examiner_id)->name) ? \App\Models\User::find($reportModel->examiner_id)->name : "Unknown" }} @can('view', [\App\Models\Training::class, $reportModel->training]) View training @endcan
@if($reportModel->result == "PASSED") PASSED @elseif($reportModel->result == "FAILED") FAILED @elseif($reportModel->result == "INCOMPLETE") INCOMPLETE @elseif($reportModel->result == "POSTPONED") POSTPONED @endif
@if($reportModel->attachments->count() > 0) @foreach($reportModel->attachments as $attachment) @endforeach @endif
@endif @endforeach @endif
@endsection