@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'] ?? 0 }}

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

Total Invoices

{{ $stats['total_invoices'] ?? 0 }}

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

Total Amount

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

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

Messages

{{ $stats['total_messages'] ?? 0 }}

@if(isset($stats['unread_messages']) && $stats['unread_messages'] > 0)
{{ $stats['unread_messages'] }} unread
@endif

Document Processing

Processed {{ $stats['processed_documents'] ?? 0 }}
@if(isset($stats['processing_documents']) && $stats['processing_documents'] > 0)
Processing {{ $stats['processing_documents'] }}
@endif @if(isset($stats['failed_documents']) && $stats['failed_documents'] > 0)
Failed {{ $stats['failed_documents'] }}
@endif

Invoice Status

Paid ${{ number_format($stats['paid_amount'] ?? 0, 2) }}
@if(isset($stats['pending_amount']) && $stats['pending_amount'] > 0)
Pending ${{ number_format($stats['pending_amount'], 2) }}
@endif @if(isset($stats['overdue_amount']) && $stats['overdue_amount'] > 0)
Overdue ${{ number_format($stats['overdue_amount'], 2) }}
@endif
Payment Rate: {{ $stats['payment_rate'] ?? 0 }}%

Storage Usage

{{ $stats['storage_used_mb'] ?? 0 }} MB

Used Storage

{{ 1000 - ($stats['storage_used_mb'] ?? 0) }} MB remaining

@if(isset($stats['storage_used_mb']) && $stats['storage_used_mb'] > 800)

Storage almost full

@endif

Recent Documents

View All
@if(isset($recentDocuments) && $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(isset($recentInvoices) && $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(isset($recentMessages) && $recentMessages->count() > 0)

Recent Messages

@if(isset($stats['unread_messages']) && $stats['unread_messages'] > 0) @endif View All
@foreach($recentMessages as $message)

{{ ucfirst($message->type) }} Message

@if($message->status === 'unread') Unread @endif {{ $message->created_at->diffForHumans() }}

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

@endforeach
@endif
@endsection @push('scripts') @endpush