@php $navDark = '#1a2035'; $tealAccent = '#2dd4bf'; $primary = '#008060'; $appName = config('app.name', 'TaskCo'); $company = $company ?? []; $companyName = $company['name'] ?? $appName; $companyEmail = $company['email'] ?? null; $companyPhone = $company['phone'] ?? null; $companyAddr = $company['address'] ?? null; $companyCity = trim(implode(', ', array_filter([$company['city'] ?? null, $company['state'] ?? null]))); $companyCountry = trim(implode(', ', array_filter([$company['country'] ?? null, $company['zip'] ?? null]))); $logoDataUri = $logoDataUri ?? null; $reportLabel = $reportLabel ?? 'Report'; $reportUid = $reportUid ?? ('RPT-' . strtoupper(substr(md5(uniqid()), 0, 8))); $filterSummary = $filterSummary ?? ''; $generatedBy = $generatedBy ?? (auth()->user()?->name ?? 'System'); $generatedAt = now()->format('d M Y, H:i'); $sections = $sections ?? []; $svgData = $svgData ?? []; $summary = $summary ?? []; $subSummary = $subSummary ?? []; $inSections = fn(string $k) => in_array($k, $sections); // Build filter pills $filterPills = []; if ($filterSummary && $filterSummary !== 'All records') { foreach (explode(' | ', $filterSummary) as $part) { if (trim($part) !== '') $filterPills[] = trim($part); } } // Summary card icon colors (by index) $cardColors = [ ['icon' => '#2563eb', 'border' => '#3b82f6', 'bg' => '#eff6ff'], ['icon' => '#16a34a', 'border' => '#22c55e', 'bg' => '#f0fdf4'], ['icon' => '#7c3aed', 'border' => '#a78bfa', 'bg' => '#faf5ff'], ['icon' => '#d97706', 'border' => '#fbbf24', 'bg' => '#fffbeb'], ]; // KPI color map $kpiColorMap = [ 'teal' => ['bg' => '#f0fdfa', 'border' => '#5eead4', 'icon' => '#0d9488', 'text' => '#0f766e'], 'green' => ['bg' => '#f0fdf4', 'border' => '#86efac', 'icon' => '#16a34a', 'text' => '#15803d'], 'blue' => ['bg' => '#eff6ff', 'border' => '#93c5fd', 'icon' => '#2563eb', 'text' => '#1d4ed8'], 'red' => ['bg' => '#fef2f2', 'border' => '#fca5a5', 'icon' => '#dc2626', 'text' => '#b91c1c'], 'amber' => ['bg' => '#fffbeb', 'border' => '#fcd34d', 'icon' => '#d97706', 'text' => '#b45309'], 'purple' => ['bg' => '#faf5ff', 'border' => '#d8b4fe', 'icon' => '#9333ea', 'text' => '#7e22ce'], 'orange' => ['bg' => '#fff7ed', 'border' => '#fdba74', 'icon' => '#ea580c', 'text' => '#c2410c'], ]; // Subtracted text color for card subtitle $subtitleColorMap = [ 'green' => '#16a34a', 'red' => '#dc2626', 'amber' => '#d97706', 'gray' => '#6b7280', 'blue' => '#2563eb', ]; @endphp
{{-- Dark header --}}
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{-- ── SUMMARY OVERVIEW CARDS ──────────────────────────── --}}
@if($inSections('summary') && count($summary))
Summary Overview
KPI Metrics
Primary Trend Chart
{{ $reportLabel }} — Trend Overview
@foreach($svgData['primary_chart'] as $b64)
Analytics Charts
@php $chartPairs = array_chunk($svgData['aux_charts'], 2); @endphp
@foreach($chartPairs as $chartPair)
No sections were selected for this export.
@endif
{{-- ── REPORT SUMMARY BOX ──────────────────────────────── --}}
|