Deploy Ladill Events / deploy (push) Successful in 57s
The balance is still on Payments & payouts, which is where someone goes when they actually care about it — the overview is for events, not billing. Removes the BillingClient call behind it as well. Leaving that in place would have kept an external billing API request on every overview load to render nothing, and it was the controller's only use of the client, so the dependency goes too.
82 lines
5.1 KiB
PHP
82 lines
5.1 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Overview</x-slot>
|
|
@php $fmt = fn ($m) => 'GHS '.number_format($m / 100, 2); @endphp
|
|
<div class="space-y-6">
|
|
@include('partials.upgrade-banner')
|
|
<div class="flex items-center justify-between gap-3">
|
|
<div class="min-w-0 flex-1">
|
|
<h1 class="truncate text-lg font-semibold text-slate-900 lg:text-xl">Events</h1>
|
|
<p class="mt-1 hidden text-sm text-slate-500 sm:block">Plan events, sell tickets, manage attendees, and share programmes.</p>
|
|
</div>
|
|
@include('partials.mobile-header-btn', [
|
|
'href' => route('events.create'),
|
|
'label' => 'Create event',
|
|
'variant' => 'indigo',
|
|
])
|
|
</div>
|
|
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-5">
|
|
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Upcoming events</p>
|
|
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ $upcomingCount }}</p>
|
|
</div>
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-5">
|
|
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Registrations</p>
|
|
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ number_format($ticketsSold) }}</p>
|
|
</div>
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-5">
|
|
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Revenue</p>
|
|
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ $fmt($revenueMinor) }}</p>
|
|
</div>
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-5">
|
|
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Check-in rate</p>
|
|
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ $checkInRate }}%</p>
|
|
</div>
|
|
</div>
|
|
<div class="grid gap-4 lg:grid-cols-2">
|
|
<div class="rounded-2xl border border-slate-200 bg-white">
|
|
<div class="flex items-center justify-between border-b border-slate-100 px-6 py-4">
|
|
<h2 class="font-semibold text-slate-900">Recent events</h2>
|
|
@include('partials.mobile-icon-link', [
|
|
'href' => route('events.create'),
|
|
'label' => 'Create event',
|
|
'icon' => 'plus',
|
|
'desktopClass' => 'text-sm font-medium text-indigo-600 hover:text-indigo-800',
|
|
])
|
|
</div>
|
|
@if($recentEvents->isEmpty())
|
|
<p class="px-6 py-8 text-sm text-slate-500">No events yet. <a href="{{ route('events.create') }}" class="font-medium text-indigo-600">Create your first event</a>.</p>
|
|
@else
|
|
<div class="divide-y divide-slate-100">
|
|
@foreach($recentEvents as $event)
|
|
<a href="{{ route('events.show', $event) }}" class="flex items-center justify-between px-6 py-4 hover:bg-slate-50">
|
|
<div>
|
|
<p class="font-medium text-slate-900">{{ $event->content()['name'] ?? $event->label }}</p>
|
|
<p class="text-xs text-slate-500">{{ $event->content()['location'] ?? 'No location set' }}</p>
|
|
</div>
|
|
<span class="text-xs text-slate-500">{{ number_format($event->confirmed_count) }} registered</span>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-6">
|
|
<h2 class="font-semibold text-slate-900">Quick links</h2>
|
|
<div class="mt-4 space-y-3">
|
|
<a href="{{ route('events.index') }}" class="flex items-center justify-between rounded-xl border border-slate-100 px-4 py-3 text-sm hover:bg-slate-50">
|
|
<span class="font-medium text-slate-700">All events</span>
|
|
<span class="text-slate-400">→</span>
|
|
</a>
|
|
<a href="{{ route('programmes.index') }}" class="flex items-center justify-between rounded-xl border border-slate-100 px-4 py-3 text-sm hover:bg-slate-50">
|
|
<span class="font-medium text-slate-700">Programmes <span class="text-slate-400">({{ $programmeCount }})</span></span>
|
|
<span class="text-slate-400">→</span>
|
|
</a>
|
|
<a href="{{ route('events.payouts') }}" class="flex items-center justify-between rounded-xl border border-slate-100 px-4 py-3 text-sm hover:bg-slate-50">
|
|
<span class="font-medium text-slate-700">Payments & payouts</span>
|
|
<span class="text-slate-400">→</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-user-layout>
|