{{-- "Mes tâches" — cross-project task list for the current person, with tabs (À faire / En retard / À venir / Boîte de réception). Only "À faire" has real content; the other three call the `// TODO` stub count methods on Dashboard.php (always 0 for now) and render a placeholder below instead of a list — see that file's docblocks for the pattern to copy. $activeTaskTab, $myElements and the todoTasks()/todoCount()/overdueCount()/ upcomingCount()/inboxCount()/toggleDone() methods all come from the page class (App\Filament\App\Pages\Dashboard), inherited into scope the same way every ambient variable is on ViewProject's partials. --}} @php $tabs = [ ['key' => 'todo', 'label' => 'Aujourd\'hui', 'count' => $this->todoCount()], ['key' => 'overdue', 'label' => 'En retard', 'count' => $this->overdueCount()], ['key' => 'upcoming', 'label' => 'À venir', 'count' => $this->upcomingCount()], ['key' => 'inbox', 'label' => 'Inbox', 'count' => $this->inboxCount()], ]; @endphp Tout voir →
@foreach ($tabs as $tab) @endforeach
@forelse ($this->currentTabTasks() as $task) @php $isDone = $task->status->category === 'done'; $isOverdue = $task->due_date && $task->due_date->isPast() && ! in_array($task->status->category, ['done', 'cancelled'], true); $projectColor = $task->project->color; @endphp
@if (in_array($task->type->code, ['meeting'], true)) {{ $task->meeting->starts_at->format('H:i') }} @endif $isDone, 'text-gray-700 dark:text-gray-200' => ! $isDone, ]) > {{ $task->title }} @if (in_array($task->type->code, ['chantier', 'milestone'], true)) @endif @if ($projectColor) {{ $task->project->code }} @else {{ $task->project->code }} @endif $isOverdue, 'text-gray-400 dark:text-gray-500' => ! $isOverdue, ]) > {{ $task->due_date?->translatedFormat('j M') ?? '—' }}
@empty
Aucune tâche à faire — bien joué 🎉
@endforelse