rapproche encore le tableau de bord de la démo /cockpit : avancement par vérification, mains levées avec action réelle, progression de la séance
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
0573894721
commit
ee079ddffb
6 changed files with 178 additions and 6 deletions
|
|
@ -36,6 +36,10 @@
|
|||
<p class="font-extrabold">Séance en cours</p>
|
||||
<p class="mt-1">{{ $seance->lab->titre }}</p>
|
||||
<p class="mt-2 font-mono text-xs">{{ $seance->statut === \App\Models\Seance::EN_COURS ? 'En cours' : 'Salle d\'attente' }}</p>
|
||||
@if ($progressionSeance !== null)
|
||||
<div class="mt-2 h-2 rounded-lg border border-[#dadce0] bg-white"><div class="h-full rounded-lg bg-black" style="width:{{ $progressionSeance }}%"></div></div>
|
||||
<p class="mt-1 font-mono text-[11px] text-[#5f6368]">{{ $progressionSeance }}% du temps estimé ({{ $seance->lab->duree_min }} min)</p>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</aside>
|
||||
|
|
@ -78,15 +82,68 @@
|
|||
<p class="mt-2 font-mono text-3xl font-semibold leading-none">{{ $reussiteMoyenne }}%</p>
|
||||
</li>
|
||||
@endif
|
||||
@if ($mainsLevees !== null)
|
||||
@if ($seance->visioOuverte())
|
||||
<li class="flex flex-col rounded-lg border border-[#dadce0] bg-[#fce8e6] p-4">
|
||||
<p class="text-sm font-bold">Mains levées (visio)</p>
|
||||
<p class="mt-2 font-mono text-3xl font-semibold leading-none">{{ $mainsLevees }}</p>
|
||||
<p class="mt-2 font-mono text-3xl font-semibold leading-none">{{ count($mains) }}</p>
|
||||
</li>
|
||||
@endif
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@if ($seance && $avancement->isNotEmpty())
|
||||
{{-- Équivalent réel de la « répartition par étape » de la démo :
|
||||
une barre par vérification du lab, comptée sur les vraies
|
||||
dernières corrections (pas de fausse étape numérotée). --}}
|
||||
<section class="mt-6 rounded-lg border border-[#dadce0] bg-white p-5" aria-labelledby="t-avancement">
|
||||
<div class="flex flex-wrap items-baseline justify-between gap-2">
|
||||
<h2 id="t-avancement" class="text-lg font-extrabold">Avancement du lab « {{ $seance->lab->titre }} »</h2>
|
||||
<p class="font-mono text-xs font-semibold text-[#5f6368]">{{ $avancement->count() }} vérifications · {{ $avancement->first()['total'] }} élève(s) corrigé(s)</p>
|
||||
</div>
|
||||
<ul class="mt-4 grid gap-2">
|
||||
@foreach ($avancement as $v)
|
||||
<li class="flex items-center gap-3">
|
||||
<span class="w-40 shrink-0 truncate text-sm font-bold" title="{{ $v['titre'] }}">{{ $v['titre'] }}</span>
|
||||
<span class="h-3 flex-1 rounded-lg border border-[#dadce0] bg-[#f8f9fa]"><span class="block h-full rounded-lg bg-[#3C8A5A]" style="width:{{ $v['total'] ? round($v['reussi'] / $v['total'] * 100) : 0 }}%"></span></span>
|
||||
<span class="w-14 shrink-0 text-right font-mono text-sm font-semibold">{{ $v['reussi'] }}/{{ $v['total'] }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
@if ($seance && $seance->visioOuverte())
|
||||
{{-- Équivalent réel du panneau « Mains levées » de la démo : la
|
||||
même file que la page de visio, avec la même action (donner
|
||||
la parole), juste accessible sans quitter le tableau de bord. --}}
|
||||
<section class="mt-6 rounded-lg border border-[#dadce0] bg-white" aria-labelledby="t-mains">
|
||||
<div class="flex items-center justify-between border-b border-[#e3e5e8] bg-[#fce8e6] p-4">
|
||||
<h2 id="t-mains" class="text-lg font-extrabold">Mains levées</h2>
|
||||
<span class="font-mono text-xs font-semibold">ordre d'arrivée</span>
|
||||
</div>
|
||||
@if (empty($mains))
|
||||
<p class="p-4 font-semibold">Aucune main levée pour l'instant.</p>
|
||||
@else
|
||||
<ol class="divide-y divide-[#e3e5e8]">
|
||||
@foreach ($mains as $i => $main)
|
||||
<li class="flex items-center justify-between gap-3 p-4">
|
||||
<span class="flex items-center gap-3">
|
||||
<span class="font-mono text-sm font-semibold">{{ $i + 1 }}</span>
|
||||
<span class="font-extrabold">{{ $main['nom'] }}</span>
|
||||
@php($attente = max(0, time() - $main['depuis']))
|
||||
<span class="font-mono text-xs text-[#5f6368]">· depuis {{ intdiv($attente, 60) }} min {{ str_pad((string) ($attente % 60), 2, '0', STR_PAD_LEFT) }} s</span>
|
||||
</span>
|
||||
<form action="{{ route('seances.visio.parole', [$seance, $main['eleve_id']]) }}" method="post">
|
||||
@csrf
|
||||
<button type="submit" class="inline-flex h-9 items-center rounded-lg bg-black px-3 text-xs font-extrabold text-white hover:bg-[#ec3013]">Donner la parole</button>
|
||||
</form>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
|
||||
@if ($seance)
|
||||
{{-- Vraies données de la séance en cours : un élève, son état, sa dernière vérification. --}}
|
||||
<section class="mt-6 rounded-lg border border-[#dadce0] bg-white" aria-labelledby="t-seance-encours">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue