@extends('layouts.admin') @section('title', 'Track: ' . $track->track) @section('content')
{{-- Page Header --}} @include('admin.components.page-header', [ 'title' => $track->track, 'subtitle' => 'Manage track details, levels, and skills', 'icon' => 'route', 'breadcrumbs' => [ ['title' => 'Tracks', 'url' => route('admin.tracks.index')], ['title' => $track->track, 'url' => ''] ], 'actions' => [ [ 'text' => 'Add Skill', 'onclick' => 'showAddSkillForm()', 'icon' => 'plus', 'class' => 'success' ], [ 'text' => 'Actions', 'type' => 'dropdown', 'icon' => 'ellipsis-v', 'class' => 'outline-secondary', 'items' => [ ['text' => 'Duplicate Track', 'icon' => 'copy', 'onclick' => 'copyTrack(' . $track->id . ', \'' . addslashes($track->track) . '\', ' . $track->skills->count() . ')'], ['text' => 'Export Skills', 'icon' => 'download', 'onclick' => 'exportSkills()'], 'divider', ['text' => 'Delete Track', 'icon' => 'trash', 'onclick' => 'deleteTrack(' . $track->id . ')'] ] ] ] ]) {{-- Statistics Row --}} @include('admin.components.stats-row', [ 'stats' => [ [ 'value' => $track->skills->count(), 'label' => 'Skills', 'color' => 'primary', 'icon' => 'brain' ], [ 'value' => $track->skills->sum(function($skill) { return $skill->questions ? $skill->questions->count() : 0; }), 'label' => 'Questions', 'color' => 'info', 'icon' => 'question-circle' ], [ 'value' => $track->skills->where('status_id', 3)->count(), 'label' => 'Active Skills', 'color' => 'success', 'icon' => 'check-circle' ], [ 'value' => $track->level ? $track->level->level : 'N/A', 'label' => 'Level', 'color' => 'warning', 'icon' => 'layer-group' ] ] ])
{{-- Track Details Card --}}
Track Details
{{ $track->track }}
@if($track->status_id == 3) Active @elseif($track->status_id == 4) Draft @else Unknown @endif
@if($track->level) Level {{ $track->level->description }} @else No level assigned @endif
@if($track->field) {{ $track->field->field }} @else No field assigned @endif
{{ $track->description ?? 'No description' }}
{{ $track->created_at->format('M j, Y') }}
{{-- Skills Card --}}
Skills ({{ $track->skills->count() }})
@if($track->skills->count() > 0) @endif
@if($track->skills->count() > 0)
@foreach($track->skills as $skill) @endforeach
Id Skill Questions Status Actions
{{ $skill->id }}
{{ $skill->skill }}
@if(strlen($skill->description ?? '') > 100) {{ substr($skill->description, 0, 100) }}... @else {{ $skill->description ?? 'No description' }} @endif
@if($skill->questions && $skill->questions->count() > 0) {{ $skill->questions->count() }} @else 0 @endif {{ $skill->status ? ucfirst($skill->status->status) : 'Unknown' }}
@else @include('admin.components.empty-state', [ 'icon' => 'brain', 'title' => 'No Skills Assigned', 'message' => 'Add skills to this track to get started' ]) @endif
{{-- Sidebar --}}
{{-- Field Information Card --}} @if($track->field)
Field Information
{{ $track->field->field }}

{{ $track->field->description }}

{{ $track->field->tracks->count() ?? 0 }} tracks in this field
@endif {{-- Maxile Level Information Card --}}
Maxile Level Information
@if($track->level)

Level {{ $track->level->level }}

{{ $track->level->description }}

{{ $track->level->tracks->count() }} tracks at this level @else @include('admin.components.empty-state', [ 'icon' => 'layer-group', 'title' => 'No Maxile Level Assigned', 'message' => 'Assign a level to organize this track' ]) @endif
{{-- Quick Actions --}} @include('admin.components.management-grid', [ 'columns' => 12, 'items' => [ [ 'title' => 'Skills Analytics', 'description' => 'View detailed skills performance in this track', 'icon' => 'chart-line', 'color' => 'info', 'onclick' => 'showAnalytics()', 'action_text' => 'View Analytics', 'action_icon' => 'chart-bar' ], [ 'title' => 'Bulk Operations', 'description' => 'Perform bulk actions on track skills', 'icon' => 'tasks', 'color' => 'warning', 'onclick' => 'showBulkOperations()', 'action_text' => 'Bulk Actions', 'action_icon' => 'cogs' ] ] ]) {{-- System Status --}} @include('admin.components.system-status', [ 'title' => 'Track Status', 'icon' => 'heartbeat', 'lastUpdated' => $track->updated_at->diffForHumans(), 'statuses' => [ [ 'label' => 'Track Status', 'value' => $track->status ? ucfirst($track->status->status) : 'Unknown', 'type' => 'status', 'color' => $track->status && $track->status->status === 'active' ? 'success' : 'warning', 'icon' => 'route' ], [ 'label' => 'Field', 'value' => $track->field ? $track->field->field : 'Not assigned', 'type' => 'badge', 'color' => 'secondary' ], [ 'label' => 'Skills Count', 'value' => $track->skills->count(), 'type' => 'badge', 'color' => 'primary' ], [ 'label' => 'Questions Total', 'value' => $track->skills->sum(function($skill) { return $skill->questions ? $skill->questions->count() : 0; }), 'type' => 'badge', 'color' => 'info' ] ] ])
{{-- Add Skill Modal --}} {{-- Copy Track Modal --}} @endsection @push('scripts') @endpush