{{ $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
@endforeach
@if (!count($user_trainings))
@if($isTraineeCompleted)
@if (!in_array($user_training->training->category->id, array(2)))
@endif
@if($isInstructorCompleted)
@endif
@if($isSupervisorCompleted)
@endif
{{ $user_training->training->name }}
@if ($image_name)
@else
@endif
@endif
@if ($user_training->is_completed && $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') }}