@extends('layouts.app') @section('content')
@forelse($assignments as $assignment) @php $training = $assignment->training; $userAttempts = $training->attempts; $attemptCount = $userAttempts->count(); $isLimitReached = $training->max_attempts && $attemptCount >= $training->max_attempts; $isExpired = $training->expires_at && now()->gt($training->expires_at); // Find best graded attempt or highest score $gradedAttempts = $userAttempts->whereNotNull('grade'); $bestGrade = $gradedAttempts->first()?->grade; $highestScore = $userAttempts->max('overall_score'); @endphp
{{ $training->type === 'ai_avatar' ? 'AI Avatar' : 'Solo Pitch' }} @if($bestGrade) Best Grade: {{ $bestGrade }} @elseif($highestScore) Score: {{ $highestScore }}/100 @elseif($isExpired) EXPIRED @elseif($training->scheduled_at && now()->lt($training->scheduled_at)) SCHEDULED @endif

{{ $training->title }}

{{ Str::limit($training->description ?: $training->prompt_text, 90) }}

@if($training->scheduled_at)
Start: {{ $training->scheduled_at->format('M d, Y h:i A') }}
@endif @if($training->expires_at)
Expiry: {{ $training->expires_at->format('M d, Y h:i A') }}
@endif @if($training->max_attempts)
Attempts Taken: {{ $attemptCount }}/{{ $training->max_attempts }}
@endif
@if($isExpired) @elseif($isLimitReached) @elseif($training->scheduled_at && now()->lt($training->scheduled_at)) @elseif($training->isAiAvatar() && $training->status !== 'ready') @else Start Pitch Attempt @endif @if($attemptCount > 0)
@endif
@empty

No simulations assigned

You have no active pitch training assignments at this moment.

@endforelse
@endsection