Files
ladill-mini/resources/views/mini/payment-qrs/index.blade.php
T
isaaccladandCursor f52e3e882e
Deploy Ladill Mini / deploy (push) Successful in 33s
Add delete for Mini payment QRs.
Vendors can remove a payment QR from the show page; stored images are cleaned up and the short link stops resolving.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 20:49:15 +00:00

41 lines
2.5 KiB
PHP

<x-user-layout>
<x-slot name="title">My Payment QR</x-slot>
<div class="space-y-6">
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h1 class="text-xl font-semibold text-slate-900">My Payment QR</h1>
<p class="mt-1 text-sm text-slate-500">Static QRs to print or display one per till or branch.</p>
</div>
<a href="{{ route('mini.payment-qrs.create') }}" class="inline-flex rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-700">New payment QR</a>
</div>
@if(session('success'))
<div class="rounded-xl border border-emerald-100 bg-emerald-50 px-4 py-3 text-sm text-emerald-800">{{ session('success') }}</div>
@endif
@if($qrCodes->isEmpty())
<div class="rounded-2xl border border-dashed border-slate-200 bg-white px-6 py-12 text-center">
<p class="text-sm text-slate-500">No payment QRs yet.</p>
<a href="{{ route('mini.payment-qrs.create') }}" class="mt-3 inline-block text-sm font-semibold text-indigo-600 hover:text-indigo-800">Create your first payment QR</a>
</div>
@else
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
@foreach($qrCodes as $qr)
@php $c = $qr->content(); @endphp
<a href="{{ route('mini.payment-qrs.show', $qr) }}" class="rounded-2xl border border-slate-200 bg-white p-5 transition hover:border-indigo-200 hover:shadow-sm">
<div class="flex items-start justify-between gap-3">
<div>
<p class="font-semibold text-slate-900">{{ $qr->label }}</p>
<p class="mt-0.5 text-sm text-slate-500">{{ $c['business_name'] ?? '' }}</p>
@if(!empty($c['branch_label']))
<p class="mt-1 text-xs text-slate-400">{{ $c['branch_label'] }}</p>
@endif
</div>
<img src="{{ $previewDataUris[$qr->id] ?? '' }}" alt="" class="h-16 w-16 rounded-lg border border-slate-100 bg-white object-contain p-1">
</div>
<p class="mt-4 truncate text-xs text-indigo-600">{{ $qr->publicUrl() }}</p>
</a>
@endforeach
</div>
@endif
</div>
</x-user-layout>