{{-- resources/views/dashboard.blade.php --}} @extends('layouts.app') @section('title', 'Dashboard') @section('content')
{{-- KPIs --}}
Total Applications
{{ number_format($stats['applications_total']) }}
{{ $stats['applications_growth'] }} vs last month
New (This Week)
{{ number_format($stats['applications_new_week']) }}
Renewals: {{ number_format($stats['renewals_week']) }}
Unbilled Assessments
{{ number_format($stats['unbilled_count']) }}
Est. ₱{{ number_format($stats['unbilled_amount'], 2) }}
Collections Today
₱{{ number_format($stats['collections_today'], 2) }}
ORs: {{ number_format($stats['ors_today']) }}
{{-- Charts + Lists --}}
Applications by Month ({{ $appsYear }})
{{-- Monthly counts row (horizontal) --}}
@foreach ($appsByMonthLabels as $i => $label) @php /** @var int $count */ $count = (int) ($appsByMonthData[$i] ?? 0); @endphp {{ $label }} {{-- If you use Bootstrap, this becomes a nice pill badge automatically --}} {{ $count }} @endforeach
{{-- Compact chart --}}
{{-- Status tags (horizontal) --}} @if (isset($statusBreakdown) && $statusBreakdown->count())
@foreach ($statusBreakdown as $row) @php $cnt = (int) ($row->total ?? 0); @endphp {{ $row->status ?? '—' }} {{ $cnt }} @endforeach
@endif

Recent Applications

Manage
@foreach ($recentApplications as $app) @endforeach
Tracking # Business Type Status Updated
{{ $app['tracking_no'] }} {{ $app['business_name'] }} {{ ucfirst($app['type']) }} @php $statusClass = match ($app['status']) { 'Pending' => 'warning', 'Assessed' => 'info', 'Billed' => 'secondary', 'Paid' => 'success', 'Released' => 'primary', default => 'light', }; @endphp {{ $app['status'] }} {{ \Carbon\Carbon::parse($app['updated_at'])->diffForHumans() }}

Top Lines of Business

@foreach ($stats['top_lobs'] as $lob)
{{ $lob['name'] }}
{{ number_format($lob['count']) }} applications
₱{{ number_format($lob['fees'], 2) }}
@endforeach
{{-- Billing & Recent Applications --}}

Billing (Invoices)

Go to Billing
Unpaid / Aging buckets shown for the last 6 months.
@endsection @push('scripts') @endpush