| Attempt NO# | Status | Time Spent | Description | Edit |
|---|---|---|---|---|
| {{$submission->attempts}} | @php $statusClass = ''; if ($submission->status === 'completed') { $statusClass = 'bg-green-100 text-green-800'; } elseif ($submission->status === 'failed') { $statusClass = 'bg-red-100 text-red-800'; } elseif ($submission->status === 'processing') { $statusClass = 'bg-secondary-100 text-secondary-800'; } elseif ($submission->status === 'pending') { $statusClass = 'bg-blue-100 text-blue-800'; } @endphp {{ucfirst($submission->status)}} | {{-- get the difference between start and end time from submission using carbon and if end is null then use current time --}} @php $start = Carbon\Carbon::parse($submission->start); $end = Carbon\Carbon::parse($submission->end ?? now()); $time = $end->diff($start)->format('%H:%I:%S'); @endphp {{$time}} | Current Attempt | View @if ($submission->status === 'completed' || $submission->status === 'failed') | Download Results @endif |
| Past Attempts | ||||
| {{$history->attempts}} | @php $statusClass = ''; if ($history->status === 'completed') { $statusClass = 'bg-green-100 text-green-800'; } elseif ($history->status === 'failed') { $statusClass = 'bg-red-100 text-red-800'; } elseif ($history->status === 'processing') { $statusClass = 'bg-secondary-100 text-secondary-800'; } elseif ($history->status === 'pending') { $statusClass = 'bg-blue-100 text-blue-800'; } @endphp {{ucfirst($history->status)}} | @php $history_start = Carbon\Carbon::parse($history->start); $history_end = Carbon\Carbon::parse($history->end ?? now()); $history_time = $history_end->diff($history_start)->format('%H:%I:%S'); @endphp {{$history_time}} | {{$history->description}} | View | Download Results |