Files
ladill-merchant/resources/views/qr/dashboard.blade.php
T
isaaccladandCursor f718b9cfbf Initial Ladill Merchant app with Gitea deploy pipeline.
Shop, menu, and booking storefronts with OIDC SSO, Pay checkout, and merchant.ladill.com deployment workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 23:05:21 +00:00

46 lines
2.7 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">
<div>
<h1 class="text-xl font-semibold text-slate-900">QR Plus</h1>
<p class="mt-1 text-sm text-slate-500">Dynamic utility QR codes links, WiFi, business pages & more.</p>
</div>
<div class="grid gap-4 sm:grid-cols-3">
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Wallet balance</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ $fmt($balanceMinor) }}</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">Active codes</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ $activeCount }}</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">Scans (30d)</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ number_format($scans30d) }}</p>
</div>
</div>
<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 codes</h2>
<a href="{{ route('events.create') }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">Create code</a>
</div>
@if($recentCodes->isEmpty())
<p class="px-6 py-8 text-sm text-slate-500">No QR codes yet. <a href="{{ route('events.create') }}" class="font-medium text-indigo-600">Create your first code</a>.</p>
@else
<div class="divide-y divide-slate-100">
@foreach($recentCodes as $code)
<a href="{{ route('events.show', $code) }}" class="flex items-center justify-between px-6 py-4 hover:bg-slate-50">
<div>
<p class="font-medium text-slate-900">{{ $code->label }}</p>
<p class="text-xs text-slate-500">{{ $code->typeLabel() }}</p>
</div>
<span class="text-xs text-slate-500">{{ number_format($code->scans_total) }} scans</span>
</a>
@endforeach
</div>
@endif
</div>
</div>
</x-user-layout>