{{-- Pre-filtered element list — see ElementList.php for the "why" (caller supplies $elementIds + optional $title, this component only knows how to display/mutate them). $compact only changes spacing/density below, never which actions are available. Row title isn't clickable yet (would open the element detail view) — that wiring lands once App\Livewire\Apercu\ElementDetail exists. --}}
@if ($title)

$compact, 'text-base' => ! $compact])> {{ $title }}

@endif
$compact, 'mt-4' => ! $compact])> @forelse ($this->elements() as $element) @php $isDone = $element->status->category === 'done'; $isMeeting = $element->type->code === 'meeting'; $isToday = $element->due_date && ($element->due_date->toDateString() == Carbon\Carbon::today()->toDateString()); $isOverdue = $element->due_date && ($element->due_date->toDateString() <= Carbon\Carbon::today()->subDay()->toDateString()) && ! in_array($element->status->category, ['done', 'cancelled'], true); $statuses = $this->statusesFor($element->project_id); @endphp
$compact, 'px-1 py-3.5' => ! $compact])> {{-- Compléter --}} @php $isMeeting = $element->type->code === 'meeting'; $canToggleDone = ! $isMeeting || $element->meeting?->organizer_id === $this->currentPersonId(); @endphp @if ($canToggleDone) @else @endif {{-- Titre --}}

$isDone, 'text-gray-700 dark:text-gray-200' => ! $isDone, ]) > {{ $element->title }}

@unless ($compact)

{{ $element->project->code }}

@endunless
@if ($element->type->code === 'meeting') @php $color = $element->meeting->organizer->avatar_color ?? '#9CA3AF'; @endphp {{ $element->meeting->organizer->initials ?? '?' }} @endif @if ($compact && $element->project->code) project->color) style="background-color: {{ $element->project->color }}1a; color: {{ $element->project->color }}" @else class="shrink-0 rounded-md bg-gray-100 px-2 py-1 text-xs font-bold text-gray-500 dark:bg-white/5 dark:text-gray-400" @endif > {{ $element->project->code }} @endif {{-- Échéance : verrouillée pour les réunions (pilotée par Outlook) --}} @if ($isMeeting) {{ $element->due_date?->translatedFormat('j M') ?? '—' }} @else $isOverdue, 'text-gray-500 dark:text-gray-400' => ! $isOverdue, ]) /> @endif {{-- Statut --}} @foreach ($statuses as $status) {{ $status->label }} @endforeach
@empty
Aucun élément.
@endforelse