@props(['candidate', 'documents'])

Documents

@foreach ($documents as $document) @if($document->slug == "csv")
CV
@if($candidate->documents->find($document->id))
@else
@endif
@else
{{$document->title}}
@if($candidate->documents->find($document->id))
{{-- @if($candidate->documents->find($document->id) && ($candidate->documents->find($document->id)->consoltunt_seen_docs || $candidate->documents->find($document->id)->consoltunt_approved_the_docs)) --}} @if($candidate->documents->find($document->id) && $candidate->documents->find($document->id)->consoltunt_seen_docs)
@else
@endif @if($candidate->documents->find($document->id) && $candidate->documents->find($document->id)->consoltunt_approved_the_docs)
@else
@endif {{-- @if($candidate->documents->find($document->id) && ($candidate->documents->find($document->id)->consoltunt_seen_docs || $candidate->documents->find($document->id)->consoltunt_approved_the_docs)) --}} {{-- @endif --}} {{-- @else @endif --}}
@if($candidate->changes_request && $candidate->changes_request_arg($document->slug))
Request for Change
@endif
@if($candidate->documents->find($document->id) && $candidate->documents->find($document->id)->docs_expiration_date) @php $exp_date = $candidate->documents->find($document->id)->docs_expiration_date; @endphp @if($document->slug == 'dbs_certificate') @if( $document->reminder_time && (\Carbon\Carbon::parse($exp_date)->addYears(3)->subMonths(5) <= \Carbon\Carbon::now()) )
{{\Carbon\Carbon::parse($exp_date)->addYears(3)->diffInDays(\Carbon\Carbon::now())}} Days
@endif @elseif($document->reminder_time && (\Carbon\Carbon::parse($exp_date)->subMonths($document->reminder_time) <= \Carbon\Carbon::now()))
{{\Carbon\Carbon::parse($exp_date)->diffInDays(\Carbon\Carbon::now())}} Days
@endif @endif @else
Missing document
@endif
@endif @endforeach