@foreach ($programs as $program) @if($program->candidate_has_training_program(Auth::user()->candidate->id) && ($program->candidate_has_training_program(Auth::user()->candidate->id)->status == 'started' || $program->candidate_has_training_program(Auth::user()->candidate->id)->status == 'in_progress' || $program->candidate_has_training_program(Auth::user()->candidate->id)->status == 'finished') && (!$program->candidate_has_training_program(Auth::user()->candidate->id)->passed_assessment && !$program->candidate_has_training_program(Auth::user()->candidate->id)->faild_assessment) )
@if($program->subject)
{{$program->subject->title}}
@endif #
@if($program->type_training == "external") {{$program->provider_name}} @else Long Term Futures @endif

{{$program->title}}

@if(!$program->type_training == "external") @livewire('dashboard.candidate.teacher-training.progress-bar', ['url_title' => $program->url_title], key(rand())) @endif
@if($program->candidate_has_training_program(Auth::user()->candidate->id)->status == 'finished' && !$program->assesment) @elseif($program->candidate_has_training_program(Auth::user()->candidate->id)->status == 'finished' && $program->assesment) @else
@if($program->type_training == "external") Continue @else Continue @endif
@endif
@elseif( $program->candidate_has_training_program(Auth::user()->candidate->id) && ($program->candidate_has_training_program(Auth::user()->candidate->id)->passed_assessment))
@if($program->subject)
{{$program->subject->title}}
@endif #
@if($program->type_training == "external") {{$program->provider_name}} @else Long Term Futures @endif

{{$program->title}}

Passed - Test Score {{$program->candidate_has_training_program(Auth::user()->candidate->id)->passed_assessment->points}}/100
View @if(!$program->candidate_has_training_program(Auth::user()->candidate->id)->rating) Leave a review @endif
@elseif( $program->candidate_has_training_program(Auth::user()->candidate->id) && ($program->candidate_has_training_program(Auth::user()->candidate->id)->faild_assessment))
@if($program->subject)
{{$program->subject->title}}
@endif #
@if($program->type_training == "external") {{$program->provider_name}} @else Long Term Futures @endif

{{ $program->title}}

Failed - Test score {{$program->candidate_training_program->faild_assessment->points}}/100
@else
@if($program->subject)
{{$program->subject->title}}
@endif #
@if($program->type_training == "external") {{$program->provider_name}} @else Long Term Futures @endif

{{$program->title}}

#

Lessons {{count($program->lessons)}}

#

{{$program->time_to_complete}}

@if($program->type_training == "external") View Program @elseif($program->url_title) View Program @endif
@endif @endforeach
{{ $programs->onEachSide(1)->links() }}
@push('modals') @livewire('dashboard.teacher-training.modals.filter-modal') @livewire('dashboard.candidate.teacher-training.assessment.modals.quiz-review') @endpush