{{ $user->fname }} {{ $user->lname }}

{{ __("menus.$category->code") }}
@foreach ($user_trainings as $user_training) @php if (!$user_training->training->name) continue; $images = $user_training->training->image; $image_name = ''; $image_path = 'assets/images/backgrounds/active-bg.png'; foreach ($images as $key => $val) { $image_name = $key; $image_path = $val; } @endphp @php $traineeCompletedCount = \App\Models\TrackRecord::where('trainee', 3) ->where('user_training_id', $user_training->id) ->count(); $instructorCompletedCount = \App\Models\TrackRecord::where('instructor', 1) ->where('user_training_id', $user_training->id) ->count(); $supervisorCompletedCount = \App\Models\TrackRecord::where('supervisor', 1) ->where('user_training_id', $user_training->id) ->count(); $totalTrackRecords = \App\Models\TrackRecord::where('user_training_id', $user_training->id) ->count(); $isTraineeCompleted = ($traineeCompletedCount > 0 && $traineeCompletedCount == $totalTrackRecords); $isInstructorCompleted = ($instructorCompletedCount > 0 && $instructorCompletedCount == $totalTrackRecords); $isSupervisorCompleted = ($supervisorCompletedCount > 0 && $supervisorCompletedCount == $totalTrackRecords); @endphp
@if($isTraineeCompleted)
{{ __('app.completed_by_trainee') }}
@endif @if($isInstructorCompleted)
{{ __('app.completed_by_instructor') }}
@endif @if($isSupervisorCompleted)
{{ __('app.completed_by_supervisor') }}
@endif

{{ $user_training->training->name }}

@if (!in_array($user_training->training->category->id, array(2)))
@if ($image_name) {{ $image_name }} @else @endif
@endif @if ($user_training->is_completed && $user_training->date)
{{ __('app.attestation') }} {{ $user_training->date }}
@endif
{{ __('app.department') }} : {{ $user_training->training->department->name ? : '-' }}
{{ __('app.prefix') }} : {{ $user_training->training->prefix ? : '-' }}
{{ __('app.revision') }} : {{ $user_training->training->rev ? : '-' }}
{{ __('app.renewal_date') }} : {{ 'xxxx' ? : '-' }}
{{ __('app.time_taken') }} : {{ $user_training->track_record_duration }}
@if (!$user_training->track_record_duration_second) {{ __('app.start') }} @else @if ($user_training->is_completed) {{ __('app.completed') }} @else {{ __('app.start') }} @endif @endif {{ __('app.details') }}
@endforeach
@if (!count($user_trainings)) {{ __('menus.' . $category->code) }}

{{ __("app.soon_available") }}

@endif