45 lines
2.7 KiB
PHP
45 lines
2.7 KiB
PHP
<div class="space-y-5">
|
|
<div class="animate-rise">
|
|
<h1 class="text-2xl font-semibold tracking-tight text-ink">{{ __('admin.nav.revenue') }}</h1>
|
|
<p class="mt-1 text-sm text-muted">{{ __('admin.revenue_sub') }}</p>
|
|
</div>
|
|
|
|
@php $rd = ['[animation-delay:40ms]', '[animation-delay:80ms]', '[animation-delay:120ms]', '[animation-delay:160ms]']; @endphp
|
|
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
|
@foreach ($kpis as $i => $kpi)
|
|
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise {{ $rd[$i] ?? '' }}">
|
|
<p class="text-xs font-semibold uppercase tracking-wide text-faint">{{ $kpi['label'] }}</p>
|
|
<p class="mt-2 flex items-baseline gap-2">
|
|
<span class="font-mono text-2xl font-semibold text-ink">{{ $kpi['value'] }}</span>
|
|
<span class="font-mono text-xs font-semibold text-success">{{ $kpi['delta'] }}</span>
|
|
</p>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 gap-4 lg:grid-cols-3">
|
|
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise [animation-delay:60ms] lg:col-span-2">
|
|
<h2 class="font-semibold text-ink">{{ __('admin.mrr_trend') }}</h2>
|
|
<div class="mt-3 h-56" wire:ignore><x-ui.chart :config="$mrrChart" class="h-56" :label="__('admin.mrr_trend')" /></div>
|
|
</div>
|
|
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise [animation-delay:120ms]">
|
|
<h2 class="font-semibold text-ink">{{ __('admin.mrr_by_plan') }}</h2>
|
|
<div class="mt-3 h-56" wire:ignore><x-ui.chart :config="$planChart" class="h-56" :label="__('admin.mrr_by_plan')" /></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="overflow-hidden rounded-xl border border-line bg-surface shadow-xs animate-rise [animation-delay:180ms]">
|
|
<div class="border-b border-line px-5 py-3"><h2 class="font-semibold text-ink">{{ __('admin.recent_payments') }}</h2></div>
|
|
<ul class="divide-y divide-line">
|
|
@foreach ($payments as $p)
|
|
<li class="flex items-center gap-3 px-5 py-3 text-sm">
|
|
<span class="grid size-8 shrink-0 place-items-center rounded-lg bg-surface-2 text-success"><x-ui.icon name="check" class="size-4" /></span>
|
|
<span class="min-w-0 flex-1 truncate font-medium text-ink">{{ $p['customer'] }}</span>
|
|
<span class="font-mono text-xs text-faint">{{ $p['when'] }}</span>
|
|
<span class="font-mono text-body">{{ $p['amount'] }}</span>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|