@extends(getTemplate() .'.panel.layouts.panel_layout') @push('styles_top') @endpush @section('content')

{{ trans('quiz.filter_certificates') }}

{{ trans('quiz.certificate_unified_hint') }}

{{ trans('quiz.my_certificates') }}

@if(!empty($filteredOutAllCerts) && $filteredOutAllCerts) @include(getTemplate() . '.includes.no-result',[ 'file_name' => 'cert.png', 'title' => trans('quiz.my_course_certificates_filter_no_match'), 'hint' => nl2br(trans('quiz.my_course_certificates_filter_no_match_hint')), ]) @elseif(!empty($allCertificates) && $allCertificates->total() > 0)
@foreach($allCertificates as $cert) @php $ctype = $cert->certificate_type ?? 'old'; @endphp @endforeach
{{ trans('quiz.certificate_column_type') }} {{ trans('quiz.certificate_column_subject') }} {{ trans('quiz.certificate_column_grade_or_sn') }} {{ trans('public.certificate_id') }} {{ trans('public.date') }}
@if($ctype === 'old') @if($cert->type === 'course') {{ trans('quiz.certificate_kind_course') }} @elseif($cert->type === 'quiz') {{ trans('quiz.certificate_kind_quiz') }} @elseif($cert->type === 'imtmontessori') {{ trans('quiz.certificate_kind_montessori') }} @else {{ $cert->type }} @endif @elseif($ctype === 'new') {{ trans('quiz.certificate_kind_template') }} @elseif($ctype === 'last') {{ trans('quiz.certificate_kind_generated') }} @endif @if($ctype === 'old') @if($cert->type === 'quiz' && !empty($cert->quiz)) {{ $cert->quiz->webinar ? $cert->quiz->webinar->title : $cert->quiz->title }} @elseif($cert->webinar) {{ $cert->webinar->title }} @else @endif @elseif($ctype === 'new') {{ $cert->course_name ?? optional($cert->template)->title ?? '—' }} @elseif($ctype === 'last') {{ $cert->template_name ?? trans('quiz.certificate_kind_generated') }} @endif @if($ctype === 'old') @if(!empty($cert->user_grade)) {{ $cert->user_grade }}% @elseif(!empty($cert->serial_number)) {{ $cert->serial_number }} @else — @endif @elseif($ctype === 'new') {{ $cert->serial_number ?? '—' }} @else — @endif {{ $cert->id }} @if($ctype === 'old') {{ dateTimeFormat($cert->created_at, 'j M Y') }} @elseif($ctype === 'new') @if(!empty($cert->completion_date)) {{ $cert->completion_date instanceof \Carbon\Carbon ? dateTimeFormat($cert->completion_date->timestamp, 'j M Y') : dateTimeFormat(strtotime((string)$cert->completion_date), 'j M Y') }} @else — @endif @elseif($ctype === 'last') @if(!empty($cert->generated_at)) {{ dateTimeFormat($cert->generated_at instanceof \Carbon\Carbon ? $cert->generated_at->timestamp : strtotime((string)$cert->generated_at), 'j M Y') }} @else — @endif @endif @if($ctype === 'old') @if($cert->type === 'quiz' && !empty($cert->quiz_result_id)) {{ trans('quiz.certificate_download') }} @elseif($cert->type === 'course' && !empty($cert->webinar_id)) {{ trans('quiz.certificate_download') }} @elseif($cert->type === 'imtmontessori') {{ trans('quiz.certificate_download') }} @else {{ trans('quiz.certificate_pending_file') }} @endif @elseif($ctype === 'new') @if(!empty($cert->generated_image_path)) {{ trans('quiz.certificate_download') }} @else {{ trans('quiz.certificate_pending_file') }} @endif @elseif($ctype === 'last') @if(!empty($cert->image_path)) {{ trans('quiz.certificate_download') }} @else {{ trans('quiz.certificate_pending_file') }} @endif @endif
@else @include(getTemplate() . '.includes.no-result',[ 'file_name' => 'cert.png', 'title' => trans('quiz.my_certificates_no_result'), 'hint' => nl2br(trans('quiz.my_certificates_no_result_hint')), ]) @endif
@if(!empty($allCertificates) && $allCertificates->total() > 0)
{{ $allCertificates->appends(request()->input())->links('vendor.pagination.panel') }}
@endif @endsection @push('scripts_bottom') @endpush