Files
ladill-mini/resources/views/mini/payment-qrs/show.blade.php
T
isaaccladandCursor db66d99895 Initial Ladill Mini app — trader payment QRs without styling.
Lean control center at mini.ladill.com: payment QR CRUD, Paystack checkout with 5% fee settlement via Billing API, payments feed, and payouts. QR codes use a fixed black-and-white preset only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 18:43:39 +00:00

55 lines
4.0 KiB
PHP

<x-user-layout>
<x-slot name="title">{{ $qrCode->label }}</x-slot>
@php $c = $qrCode->content(); @endphp
<div class="space-y-6">
<div class="flex flex-wrap items-start justify-between gap-4">
<div>
<a href="{{ route('mini.payment-qrs.index') }}" class="text-sm text-slate-500 hover:text-slate-700"> All payment QRs</a>
<h1 class="mt-2 text-xl font-semibold text-slate-900">{{ $qrCode->label }}</h1>
<p class="mt-1 text-sm text-slate-500">{{ $c['business_name'] ?? '' }}@if(!empty($c['branch_label'])) · {{ $c['branch_label'] }}@endif</p>
</div>
<div class="flex flex-wrap gap-2">
<a href="{{ route('mini.payment-qrs.download', [$qrCode, 'png']) }}" class="rounded-lg border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-700 hover:bg-slate-50">PNG</a>
<a href="{{ route('mini.payment-qrs.download', [$qrCode, 'svg']) }}" class="rounded-lg border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-700 hover:bg-slate-50">SVG</a>
<a href="{{ route('mini.payment-qrs.download', [$qrCode, 'pdf']) }}" class="rounded-lg border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-700 hover:bg-slate-50">PDF</a>
</div>
</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
<div class="grid gap-6 lg:grid-cols-2">
<div class="flex flex-col items-center rounded-2xl border border-slate-200 bg-white p-8">
<img src="{{ route('mini.payment-qrs.preview', $qrCode) }}" alt="QR code" class="max-h-64 w-auto">
<p class="mt-4 break-all text-center text-sm text-indigo-600">{{ $qrCode->publicUrl() }}</p>
<p class="mt-2 text-xs text-slate-500">Standard black-and-white QR ready to print at your till or counter.</p>
</div>
<form method="post" action="{{ route('mini.payment-qrs.update', $qrCode) }}" enctype="multipart/form-data" class="space-y-4 rounded-2xl border border-slate-200 bg-white p-6">
@csrf
@method('PATCH')
<h2 class="font-semibold text-slate-900">Settings</h2>
<div>
<label class="block text-sm font-medium text-slate-700">Label</label>
<input type="text" name="label" value="{{ old('label', $qrCode->label) }}" class="mt-1 w-full rounded-xl border-slate-200 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Business name</label>
<input type="text" name="business_name" value="{{ old('business_name', $c['business_name'] ?? '') }}" class="mt-1 w-full rounded-xl border-slate-200 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Branch / till</label>
<input type="text" name="branch_label" value="{{ old('branch_label', $c['branch_label'] ?? '') }}" class="mt-1 w-full rounded-xl border-slate-200 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Replace logo</label>
<input type="file" name="payment_logo" accept="image/*" class="mt-1 block w-full text-sm">
</div>
<label class="flex items-center gap-2 text-sm text-slate-700">
<input type="checkbox" name="is_active" value="1" @checked($qrCode->is_active) class="rounded border-slate-300 text-indigo-600">
QR is active (accepts payments)
</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>
</div>
</x-user-layout>