{{-- One row of "Aujourd'hui" — same content as my-tasks-card.blade.php's row, except the project badge: a non-rangé element shows a red "À ranger" badge here instead of the neutral-gray one used everywhere else in the app. Kept as its own partial (not shared with my-tasks-card) precisely for that one difference — decision made explicit with the user before building this page, rather than adding a "$redUnfiledBadge" flag to the shared partial. $task — the ProjectElement to render. --}} @php $isDone = $task->status->category === 'done'; $isOverdue = $task->due_date && ($task->due_date->toDateString() <= Carbon\Carbon::today()->subDay()->toDateString()) && ! in_array($task->status->category, ['done', 'cancelled'], true); $isMeeting = $task->type->code === 'meeting'; $canToggleDone = ! $isMeeting || $task->meeting?->organizer_id === $this->currentPersonId(); $projectColor = $task->projectColorOrNeutral(); @endphp
@if ($canToggleDone) @else @endif @if ($isMeeting && $task->meeting->starts_at != null) {{ $task->meeting->starts_at->format('H:i') }} @endif {{-- `flex-col` by default so the badge/assign-button/date reflow onto their own line under the title below `md` (Todoist-style), and `md:flex-row` puts everything back inline once there's room. `md:contents` on the group just below is what makes that work without duplicating markup: on mobile it's a real flex row (the second line), on desktop the box itself disappears so its children become direct flex items of *this* row, right after the title — same DOM order as before, so desktop's appearance doesn't change. --}}
$isDone, 'text-gray-700 dark:text-gray-200' => ! $isDone, ]) > {{ $task->title }}
@if (! $task->assignees->isNotEmpty()) Me l'assigner En cours @endif @if ($task->isUnfiled()) À ranger @elseif ($projectColor) {{ $task->projectCodeOrUnfiled() }} @else {{ $task->projectCodeOrUnfiled() }} @endif $isOverdue, 'text-gray-400 dark:text-gray-500' => ! $isOverdue, ]) > {{ $this->relativeDateLabel($task->due_date) ?? '—' }}