@php use App\Enums\TrainingDashboardParticipantProgressSort; /** @var \Illuminate\Contracts\Pagination\LengthAwarePaginator> $participantsProgress */ /** @var array $filterQuery */ /** @var array $filters */ $progressFilters = $filters ?? []; $filterControlClass = 'block h-10 w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-gray-900 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/40'; $sortColumns = [ ['label' => 'Participante', 'sort_by' => TrainingDashboardParticipantProgressSort::Name->value], ['label' => 'Área', 'sort_by' => TrainingDashboardParticipantProgressSort::Sector->value], ['label' => 'Grupo', 'sort_by' => TrainingDashboardParticipantProgressSort::Team->value], ['label' => 'Bateria', 'sort_by' => TrainingDashboardParticipantProgressSort::Battery->value], ['label' => 'Status', 'sort_by' => TrainingDashboardParticipantProgressSort::Status->value], ['label' => 'Pontos', 'sort_by' => TrainingDashboardParticipantProgressSort::Points->value], ['label' => 'Última atividade', 'sort_by' => TrainingDashboardParticipantProgressSort::LastActivity->value], ]; $currentSort = (string) request('sort', TrainingDashboardParticipantProgressSort::Name->value); $currentDirection = (string) request('direction', 'asc'); @endphp

Progresso por participante

Todos os participantes conforme filtros. Quem não iniciou o questionário aparece como «Não iniciou». Sessão exibida: a mais recente no período/área/grupo filtrados.

Baixar Excel
@foreach($filterQuery as $key => $value) @if(! in_array($key, ['search', 'per_page', 'sort', 'direction'], true)) @endif @endforeach
@if ($participantsProgress->total() > 0) Exibindo {{ $participantsProgress->firstItem() }}–{{ $participantsProgress->lastItem() }} de {{ $participantsProgress->total() }} participante(s) @else Nenhum participante encontrado para os filtros selecionados. @endif
@foreach($sortColumns as $column) in_array($column['sort_by'], [TrainingDashboardParticipantProgressSort::Points->value], true)])> @php $sortBy = $column['sort_by']; $nextDirection = ($currentSort === $sortBy && $currentDirection === 'asc') ? 'desc' : 'asc'; $sortUrl = request()->fullUrlWithQuery([ 'sort' => $sortBy, 'direction' => $nextDirection, 'page' => 1, ]); @endphp {{ $column['label'] }} @if($currentSort === $sortBy) @else @endif @endforeach Respostas Acertos Tempo @forelse($participantsProgress as $row)

{{ $row['user_name'] }}

{{ $row['user_email'] }}

{{ $row['account_status_label'] }} @if($row['last_login_label'] !== '—') · login {{ $row['last_login_label'] }} @endif

{{ $row['sector_name'] ?? '—' }} {{ $row['team_name'] ?? '—' }} {{ $row['battery_title'] ?? '—' }} @php $statusClass = match ($row['questionnaire_status_label']) { 'Concluído' => 'bg-green-100 text-green-800', 'Em andamento' => 'bg-amber-100 text-amber-800', default => 'bg-gray-100 text-gray-600', }; @endphp {{ $row['questionnaire_status_label'] }} @if($row['total_points'] !== null) {{ number_format((float) $row['total_points'], 0, ',', '.') }} @else — @endif {{ $row['last_activity_label'] }} {{ $row['answers_label'] }} @if($row['progress_percent'] !== null) {{ $row['progress_percent'] }}% @endif {{ $row['correct_label'] }} @if(($row['elapsed_seconds'] ?? 0) > 0) {{ (int) $row['elapsed_seconds'] }}s @else — @endif @empty Nenhum participante encontrado para os filtros selecionados. @endforelse
@if ($participantsProgress->hasPages())
{{ $participantsProgress->links() }}
@endif