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>
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
</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>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<p class="mt-4 break-all text-center text-sm text-indigo-600">{{ $qrCode->publicUrl() }}</p>
|
||||
</div>
|
||||
|
||||
<div class="space-y-4">
|
||||
<form method="post" action="{{ route('mini.payment-qrs.update', $qrCode) }}" class="space-y-4 rounded-2xl border border-slate-200 bg-white p-6">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
@@ -62,6 +63,18 @@
|
||||
</label>
|
||||
<button type="submit" class="rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-700">Save changes</button>
|
||||
</form>
|
||||
|
||||
<div class="rounded-2xl border border-red-100 bg-white p-6">
|
||||
<h2 class="font-semibold text-red-700">Delete payment QR</h2>
|
||||
<p class="mt-1 text-sm text-slate-500">Removes this QR and its payment link. Scans will stop working. This cannot be undone.</p>
|
||||
<form method="post" action="{{ route('mini.payment-qrs.destroy', $qrCode) }}" class="mt-4"
|
||||
onsubmit="return confirm('Delete {{ $qrCode->label }}? The payment link will stop working.')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="rounded-xl bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700">Delete payment QR</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-user-layout>
|
||||
|
||||
Reference in New Issue
Block a user