@extends('layouts.app', ['activePage' => 'dashboard', 'menuParent' => 'dashboard', 'titlePage' => '']) @section('content') @include('includes.tailwind')

Panel de control

Facturas (mes)
{{ number_format($facturasMes ?? 0) }}
Periodo: {{ number_format($facturasAnio ?? 0) }}
Complementos (mes)
{{ number_format($complementosMes ?? 0) }}
Año: {{ number_format($complementosAnio ?? 0) }}
Pólizas (mes)
{{ number_format($polizasMes ?? 0) }}
Año: {{ number_format($polizasAnio ?? 0) }}

Facturas por mes agrupadas por trimestre

filtro por rango
@if(!empty($quarterStats))
@php $qBg = function($label) { $q = is_string($label) ? explode(' ', $label)[0] : ''; return match($q) { 'Q1' => 'from-blue-50', 'Q2' => 'from-emerald-50', 'Q3' => 'from-amber-50', 'Q4' => 'from-violet-50', default => 'from-gray-50', }; }; @endphp @foreach($quarterStats as $qs)
{{ $qs['label'] }}
{{ number_format($qs['total'] ?? 0) }}
@php $growth = $qs['growth']; $isUp = is_numeric($growth) ? $growth >= 0 : null; $growthText = is_null($growth) ? '—' : (number_format(abs($growth), 1) . '%'); @endphp
Crecimiento
{{ is_null($growth) ? 'N/A' : ($isUp ? '▲ ' : '▼ ') }}{{ $growthText }}
Mes pico
{{ $qs['peakMonth'] ?? '—' }} ({{ number_format($qs['peakValue'] ?? 0) }})
@endforeach
@endif

Pólizas por mes agrupadas por trimestre

filtro por rango
@if(!empty($quarterStatsPolizas))
@php $qBg = function($label) { $q = is_string($label) ? explode(' ', $label)[0] : ''; return match($q) { 'Q1' => 'from-blue-50', 'Q2' => 'from-emerald-50', 'Q3' => 'from-amber-50', 'Q4' => 'from-violet-50', default => 'from-gray-50', }; }; @endphp @foreach($quarterStatsPolizas as $qs)
{{ $qs['label'] }}
{{ number_format($qs['total'] ?? 0) }}
@php $growth = $qs['growth']; $isUp = is_numeric($growth) ? $growth >= 0 : null; $growthText = is_null($growth) ? '—' : (number_format(abs($growth), 1) . '%'); @endphp
Crecimiento
{{ is_null($growth) ? 'N/A' : ($isUp ? '▲ ' : '▼ ') }}{{ $growthText }}
Mes pico
{{ $qs['peakMonth'] ?? '—' }} ({{ number_format($qs['peakValue'] ?? 0) }})
@endforeach
@endif

Estados de cuenta (movimientos) por mes agrupados por trimestre

filtro por rango
@if(!empty($quarterStatsEcb))
@php $qBg = function($label) { $q = is_string($label) ? explode(' ', $label)[0] : ''; return match($q) { 'Q1' => 'from-blue-50', 'Q2' => 'from-emerald-50', 'Q3' => 'from-amber-50', 'Q4' => 'from-violet-50', default => 'from-gray-50', }; }; @endphp @foreach($quarterStatsEcb as $qs)
{{ $qs['label'] }}
{{ number_format($qs['total'] ?? 0) }}
@php $growth = $qs['growth']; $isUp = is_numeric($growth) ? $growth >= 0 : null; $growthText = is_null($growth) ? '—' : (number_format(abs($growth), 1) . '%'); @endphp
Crecimiento
{{ is_null($growth) ? 'N/A' : ($isUp ? '▲ ' : '▼ ') }}{{ $growthText }}
Mes pico
{{ $qs['peakMonth'] ?? '—' }} ({{ number_format($qs['peakValue'] ?? 0) }})
@endforeach
@endif
@endsection @push('js') @endpush