@extends('client.layouts.dashboard') @section('title', 'Follow-up Tasks') @section('styles') @endsection @section('content') {{-- Quick Counters --}} @php $overdueCount = \App\Models\Reminder::where('client_id', $client->id)->overdue()->count(); $todayCount = \App\Models\Reminder::where('client_id', $client->id)->dueToday()->count(); $upcomingCount = \App\Models\Reminder::where('client_id', $client->id)->upcoming()->count(); $completedCount = \App\Models\Reminder::where('client_id', $client->id)->where('is_completed', true)->count(); @endphp
{{ $overdueCount }}
Overdue Tasks
{{ $todayCount }}
Due Today
{{ $upcomingCount }}
Upcoming Tasks
{{ $completedCount }}
Completed Tasks
{{-- Filters Card --}}
{{-- Reminders Timeline list --}}
Task Queue
@forelse($reminders as $reminder) @php $timingClass = 'task-upcoming'; if ($reminder->is_completed) { $timingClass = 'task-completed'; } elseif ($reminder->isOverdue()) { $timingClass = 'task-overdue'; } elseif ($reminder->remind_at->isToday()) { $timingClass = 'task-today'; } @endphp
{{ $reminder->phone_number }} @if($reminder->lead) {{ $reminder->lead->contact_name ?: 'Unknown' }} @endif {{ ucfirst(str_replace('_', ' ', $reminder->reminder_type)) }}
{{ $reminder->title }}
@if($reminder->note)

{{ $reminder->note }}

@endif
Scheduled: {{ $reminder->remind_at->format('M d, Y h:i A') }} Agent: {{ $reminder->user->name ?? 'Unassigned' }}
@if($reminder->lead) View Lead @endif @if(!$reminder->is_completed)
@csrf @method('PUT')
@else Completed @endif
@empty
No Follow-up Tasks Found

Try clearing filters or schedule new reminders from the Leads pipeline.

@endforelse @if($reminders->hasPages())
{{ $reminders->withQueryString()->links() }}
@endif
@endsection