@extends('layouts.app')
@section('title', 'Dashboard')
@section('page', 'dashboard')
@section('content')
{{ greeting() }}, {{ auth()->user()->first_name }}
{{ $summary }}
Active projects
{{ $active->count() }}
{{ $completedThisYear }} completed this year
Waiting for you
{{ $waiting->count() }}
{{ $dueSoon ? $dueSoon.' due by tomorrow' : 'Nothing urgent' }}
Unread messages
{{ $unread }}
{{ $lastReply ? 'Last reply '.strtolower(ago($lastReply->created_at)) : 'No replies yet' }}
@if ($showInvoices)
Amount due
{{ money($amountDue) }}
{{ $open->count() ? 'Due '.d_long($open->first()->due_date) : 'Nothing to pay' }}
@else
Files shared
{{ \App\Models\ProjectFile::visibleTo(auth()->user())->count() }}
Across all projects
@endif
@forelse ($active->take(3) as $p)
@php
$wait = $p->approvals->firstWhere('status', 'waiting');
$ms = $p->currentMilestone();
$line = $p->status === 'in_review' && $wait ? 'Waiting for your approval on the '.lcfirst($wait->title)
: ($ms ? ucfirst(preg_replace('/^(UI|Visual) /', '', $ms->name)).' stage'.($ms->due_date ? ', next milestone '.d_short($ms->due_date) : '') : $p->summary);
@endphp
{{ $p->name }}{{ $line }}
{{ badge($p->statusLabel(), $p->statusClass()) }}
@empty
No active projectsNew projects from {{ agency()->name }} will appear here.
@endforelse
Coming up
@if ($showInvoices && $open->count())
Invoice {{ $open->first()->number }} due
@endif
@foreach ($upcoming as $m)
{{ \Illuminate\Support\Str::before($m->project->name, ' (') }}: {{ strtolower($m->name) }}
@endforeach
@if (! ($showInvoices && $open->count()) && $upcoming->isEmpty())
Nothing scheduled yet.
@endif
@if (agency()->assistant?->enabled && agency()->setting('show_assistant'))
Have a quick question?{{ agency()->assistant->name }} knows your projects and invoices.
Browse help articles
@endif
@endsection