@extends('layouts.meridian') @section('title', 'Dashboard') @push('head') @endpush @section('content')
@foreach($stats as $stat) @php $tone = $stat['tone'] ?? 'blue'; $isSegmented = ! empty($stat['segments']); $sparkline = $stat['sparkline'] ?? []; $maxSpark = max($sparkline ?: [1]); $points = collect($sparkline)->map(function ($value, $index) use ($sparkline, $maxSpark) { $count = max(count($sparkline) - 1, 1); $x = round(($index / $count) * 240, 2); $y = round(88 - (($value / max($maxSpark, 1)) * 64), 2); return "{$x},{$y}"; })->implode(' '); $areaPoints = $points ? "0,104 {$points} 240,104" : ''; $gridClass = 'xl:col-span-4'; $trendValue = (float) ($stat['trend'] ?? 0); @endphp
{{ $stat['label'] }}
{{ number_format($stat['value']) }}

{{ $stat['caption'] }}

{{ $trendValue < 0 ? '↓' : '↑' }} {{ $stat['trend'] }}
@if($isSegmented) @php $segments = collect($stat['segments']); $template = $segments->map(fn ($segment) => max((int) $segment['percent'], 1) . 'fr')->implode(' '); @endphp
@foreach($segments as $segment) @endforeach
@foreach($segments as $segment)
{{ $segment['label'] }}
{{ number_format($segment['value']) }}
{{ $segment['percent'] }}%
@endforeach
@else @endif
@endforeach
Aktivitas Pos Terbaru Pos Baru
@forelse($recentPosts as $post) @empty @endforelse
Judul Slug Status Aksi
{{ $post->title }} {{ $post->slug }} {{ $post->published ? 'Published' : 'Draft' }} Edit
Belum ada pos.
Inquiry Terbaru Lihat
@forelse($recentInquiries as $inquiry) {{ strtoupper(substr($inquiry->name, 0, 2)) }} {{ $inquiry->name }} {{ $inquiry->email ?: $inquiry->phone }} @empty

Belum ada inquiry.

@endforelse
@endsection