@extends('layouts.client') @section('title', 'Dashboard') @section('content')

Welcome back, {{ $client->name }}!

Here's what's happening with your account today.

Last updated: {{ now()->format('M d, Y H:i') }}
My Profile

Total Documents

{{ $stats['total_documents'] }}

@if($stats['documents_growth'] != 0)
{{ abs($stats['documents_growth']) }}% from last month
@endif

Total Invoices

{{ $stats['total_invoices'] }}

{{ $stats['paid_invoices'] }} paid {{ $stats['pending_invoices'] }} pending

Total Amount

${{ number_format($stats['total_amount'], 2) }}

${{ number_format($stats['paid_amount'], 2) }} paid

Messages

{{ $stats['total_messages'] }}

@if($stats['unread_messages'] > 0)
{{ $stats['unread_messages'] }} unread
@endif
Document Processing
Processed {{ $stats['processed_documents'] }}
@if($stats['processing_documents'] > 0)
Processing {{ $stats['processing_documents'] }}
@endif @if($stats['failed_documents'] > 0)
Failed {{ $stats['failed_documents'] }}
@endif
Invoice Status
Paid ${{ number_format($stats['paid_amount'], 2) }}
@if($stats['pending_amount'] > 0)
Pending ${{ number_format($stats['pending_amount'], 2) }}
@endif @if($stats['overdue_amount'] > 0)
Overdue ${{ number_format($stats['overdue_amount'], 2) }}
@endif
Payment Rate: {{ $stats['payment_rate'] }}%
Storage Usage
{{ $stats['storage_used_mb'] }} MB

Used Storage

{{ 1000 - $stats['storage_used_mb'] }} MB remaining
Recent Documents
View All
@if($recentDocuments->count() > 0)
@foreach($recentDocuments as $document)
{{ $document->name }}

{{ strtoupper($document->type) }} • {{ number_format($document->size / 1024, 2) }} KB

{{ $document->created_at->diffForHumans() }}
{{ ucfirst($document->status) }}
@endforeach
@else

No documents uploaded yet.

Upload Your First Document
@endif
Recent Invoices
View All
@if($recentInvoices->count() > 0)
@foreach($recentInvoices as $invoice)
{{ $invoice->invoice_number }}

${{ number_format($invoice->amount, 2) }}

Due: {{ $invoice->due_date->format('M d, Y') }}
{{ ucfirst($invoice->status) }}
@endforeach
@else

No invoices yet.

@endif
@if($recentMessages->count() > 0)
Recent Messages
@if($stats['unread_messages'] > 0) @endif View All
@foreach($recentMessages as $message)
{{ ucfirst($message->type) }} Message
{{ $message->created_at->diffForHumans() }}

{{ Str::limit($message->message, 100) }}

@if($message->status === 'unread') Unread @endif
@endforeach
@endif
@endsection @push('scripts') @endpush