Client Health Report

Insurance Company Assignment Volume Trends

Generated: {{ now()->format('M d, Y \a\t g:i A') }}
@if (session()->has('error'))
{{ session('error') }}
@endif @if ($errorMessage)
{{ $errorMessage }}
@endif
Showing {{ $this->filteredCompanies->count() }} of {{ count($insuranceCompanies) }} insurance companies @if($searchTerm)
Filtered by: "{{ $searchTerm }}" @endif @if($filterTrend)
Trend filter: {{ ucfirst($filterTrend) }} @endif
@if($isLoading)

Loading data...

@else @forelse($this->paginatedCompanies as $company) @php $tData = $trendData[$company->id] ?? []; $mData = $monthlyData[$company->id] ?? []; $lastfile = $lastfileData[$company->id]->created_date ?? null; @endphp @empty @endforelse
Insurance Company @if($sortBy === 'company_name') @endif Total Assignments @if($sortBy === 'total_assignments') @endif Date ( Last File Submitted ) Trend Change % Monthly Breakdown
{{ $company->company_name }} {{ $lastfile ? \Carbon\Carbon::parse($lastfile)->format('m-d-Y') : '' }} @if(isset($tData['trend'])) @if($tData['trend'] === 'increasing') Increasing @elseif($tData['trend'] === 'decreasing') Decreasing @else Stable @endif @endif @if(isset($tData['percentage'])) @if($tData['percentage'] > 0) +{{ $tData['percentage'] }}% @elseif($tData['percentage'] < 0) {{ $tData['percentage'] }}% @else {{ $tData['percentage'] }}% @endif @endif
@foreach(range(1,12) as $month) @php $monthCount = $mData[$month] ?? 0; $monthStart = \Carbon\Carbon::create($selectedYear, $month, 1)->startOfMonth()->format('Y-m-d'); $monthEnd = \Carbon\Carbon::create($selectedYear, $month, 1)->endOfMonth()->format('Y-m-d'); @endphp
{{ date('M', mktime(0,0,0,$month,1)) }}
@if($monthCount > 0) {{ $monthCount }} @else
{{ $monthCount }}
@endif
@endforeach
No results found.
@endif
{{ $this->paginatedCompanies->links() }}
@if($this->filteredCompanies->count() > 0)
Growing Companies

{{ collect($trendData)->where('trend', 'increasing')->count() }}

Declining Companies

{{ collect($trendData)->where('trend', 'decreasing')->count() }}

Stable Companies

{{ collect($trendData)->where('trend', 'stable')->count() }}

@endif