@extends('layouts.app') @section('title', 'Tasks to be done') @push('styles') @endpush @section('contents') @php $bucketMeta = [ 'pending' => [ 'label' => 'Pending', 'hint' => 'Actions waiting on you right now', 'icon' => 'fa-clock', 'mod' => 'pending', ], 'approved' => [ 'label' => 'Approved', 'hint' => 'Recent approvals you completed', 'icon' => 'fa-check-circle', 'mod' => 'approved', ], 'returned' => [ 'label' => 'Returned', 'hint' => 'Items you returned for revision', 'icon' => 'fa-undo-alt', 'mod' => 'returned', ], ]; $activeMeta = $bucketMeta[$selectedBucket] ?? $bucketMeta['pending']; @endphp
Back to dashboard

Tasks to be done

Your actionable work queue — meetings, signatures, forwards, approvals, and returns — in one place.

{{ number_format($pendingCount) }} open pending tasks
@foreach ($bucketMeta as $key => $meta) {{ number_format((int) ($bucketCounts[$key] ?? 0)) }} {{ $meta['label'] }} @endforeach

{{ $activeMeta['label'] }}

{{ $activeMeta['hint'] }} · {{ count($items) }} shown

All notifications
@if (count($items) === 0)

Nothing here

@if ($selectedBucket === 'pending') You’re all caught up — no pending tasks right now. @else No {{ strtolower($activeMeta['label']) }} items in the recent window. @endif

@else
@foreach ($items as $item) @php $href = trim((string) ($item['action_url'] ?? '')); $badge = (string) ($item['badge'] ?? $item['kind_label'] ?? ''); $badgeTone = (string) ($item['badge_tone'] ?? 'awaiting'); $icon = (string) ($item['icon'] ?? 'fa-bell'); $iconClass = (string) ($item['icon_class'] ?? 'dd-pending-icon--other'); $tag = $href !== '' ? 'a' : 'div'; @endphp <{{ $tag }} @if ($href !== '') href="{{ $href }}" @endif class="dd-tasks-page__row" > {{ $item['title'] ?? 'Task' }} @if (! empty($item['message'])) {{ $item['message'] }} @endif @if ($badge !== '') {{ $badge }} @endif @if (! empty($item['return_to'])) Return to: {{ $item['return_to'] }} @endif @if (! empty($item['occurred_at_formatted'])) {{ $item['date_label'] ?? 'Submitted' }}: {{ $item['occurred_at_formatted'] }} @endif @if ($href !== '') @endif @endforeach
@endif
@endsection