Training

@php // Ensure categories is set and is a collection if (!isset($categories) || !$categories) { $categories = collect(); } @endphp @if($categories && $categories->count() > 0) {{-- Category Navigation Tabs --}} @if($categories->count() > 1) @endif {{-- Selected Category Content --}} @if(isset($category) && $category)
{{ $category->name ?? 'Training' }}
@if(isset($category->description) && $category->description)

{{ $category->description }}

@endif @php try { $categoryStats = $this->getCategoryStats($category); } catch (\Exception $e) { $categoryStats = ['completed' => 0, 'total' => 0]; } @endphp @if($categoryStats['total'] > 0)
{{ $categoryStats['completed'] }} of {{ $categoryStats['total'] }} videos completed
@endif
@if(isset($videos) && $videos && $videos->count() > 0)
@foreach($videos as $video) @if(isset($video) && $video && isset($video->id) && $video->id && isset($video->video_file_path) && $video->video_file_path)
{{ $video->title ?? 'Untitled Video' }} @if($this->isCompleted($video->id)) Completed @endif
@if($video->description)

{{ $video->description }}

@endif
@if(!$this->isCompleted($video->id))
@else
Completed
@endif
@endif @endforeach
@else @endif @else @endif @else @endif