@php use App\Models\AdminTask; $today = now()->startOfDay(); $initials = function ($u) { if (! $u) return '—'; return strtoupper(mb_substr((string) $u->first_name, 0, 1).mb_substr((string) $u->last_name, 0, 1)) ?: 'A'; }; // Due pill renderer (matches the design's taskDuePill). $duePill = function (AdminTask $t) use ($today) { if ($t->isDone()) return ['success', ' Done']; if ($t->due_at === null) return ['neutral', 'No date']; $d = $t->due_at->copy()->startOfDay(); $time = $t->has_time ? ' '.$t->due_at->format('H:i') : ''; $clk = $t->has_time ? ' ' : ''; if ($d->lt($today)) return ['coral', ' '.$t->due_at->format('D j M').$time]; if ($d->eq($today)) return ['amber', $clk.'Today'.$time]; if ($d->eq($today->copy()->addDay())) return ['sky', $clk.'Tomorrow'.$time]; return ['neutral', $clk.$t->due_at->format('D j M').$time]; }; @endphp
{{-- Header --}}
Operations

Tasks

Your task board and reminders — {{ now()->format('D, j F Y') }}.

{{-- Stat tiles --}}
{{ $stat['open'] }}Open tasks
{{ $stat['today'] }}Due today
{{ $stat['overdue'] }}Overdue
{{ $stat['reminders'] }}@if ($stat['ringing']) {{ $stat['ringing'] }} due@endifReminders
{{-- Toolbar --}} @foreach (['all' => 'All', 'mine' => 'Mine', 'high' => 'High', 'alarm' => 'Alarms'] as $key => $label) @endforeach {{-- Quick add --}}
{{-- Grouped list --}} @forelse ($groups as $group)
{{ $group['label'] }}{{ $group['items']->count() }}
@foreach ($group['items'] as $t) @php [$pillVariant, $pillHtml] = $duePill($t); $a = $t->assigneeUser; @endphp
{{ $t->title }} @if ($t->isInProgress())In progress@endif @if ($t->recur !== 'none') {{ ucfirst($t->recur) }}@endif
{{ $initials($a) }} {{ $a ? \Illuminate\Support\Str::of($a->full_name)->explode(' ')->first() : 'Unassigned' }} @if ($t->link_label && $t->linkUrl()) {{ $t->link_label }} @elseif ($t->link_label) {{ $t->link_label }} @endif
@if ($t->reminders) {{ count($t->reminders) }} @endif {!! $pillHtml !!}
@endforeach
@empty
No tasks match. Add one above or with “New task”.
@endforelse
{{-- Shared editor modal (opened via the open-task-editor event) --}}