@extends('layouts.app') @section('title', 'Dashboard') @section('content') @can('create', \App\Models\Lead::class) New lead @endcan @can('create', \App\Models\Opportunity::class) New deal @endcan
All tasks @if ($overdueTasks->isEmpty() && $todayTasks->isEmpty() && $rotting->isEmpty())

Nothing overdue and nothing going stale. Good place to be.

@endif @if ($overdueTasks->isNotEmpty())
Overdue
@foreach ($overdueTasks as $task)
{{ $task->title }} {{ $task->due_at->diffForHumans() }}
@endforeach @endif @if ($todayTasks->isNotEmpty())
Due today
@foreach ($todayTasks as $task)
{{ $task->title }} {{ $task->due_at->format('H:i') }}
@endforeach @endif @if ($rotting->isNotEmpty()) {{-- Deals that have sat in one stage longer than that stage allows. This is the number a sales manager actually acts on. --}}
Going stale
@foreach ($rotting as $deal)
{{ $deal->name }} {{ (int) $deal->stage_changed_at->diffInDays(now()) }}d in {{ $deal->stage?->name }}
@endforeach @endif
@include('partials.timeline', ['timeline' => $recent])
@if (! $usage['contacts']['unlimited'] && $usage['contacts']['percent'] >= 80)
You have used {{ number_format($usage['contacts']['used']) }} of {{ number_format($usage['contacts']['limit']) }} contacts on your plan. See your options.
@endif @endsection