Files
ladill-mini/resources/views/mini/payment-qrs/create.blade.php
T
isaaccladandCursor 7eaa0ab23a
Deploy Ladill Mini / deploy (push) Successful in 44s
Fix payment QR preview rendering using inline data URIs.
Match Events/QR Plus pattern so QR images render without a separate authenticated preview URL, and add a styled preview card on the show page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 19:57:55 +00:00

50 lines
3.6 KiB
PHP

<x-user-layout>
<x-slot name="title">Create Payment QR</x-slot>
<div class="mx-auto max-w-2xl space-y-6">
<div class="flex items-center gap-3 py-1 lg:hidden">
<a href="{{ route('mini.payment-qrs.index') }}"
class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-slate-200 bg-white text-slate-500 shadow-sm transition hover:text-slate-900">
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5"/>
</svg>
</a>
<img src="{{ asset('images/logo/ladillmini-logo.svg') }}?v={{ @filemtime(public_path('images/logo/ladillmini-logo.svg')) ?: '1' }}"
alt="Ladill Mini" class="h-5 w-auto shrink-0">
<span class="min-w-0 flex-1 truncate text-sm font-semibold text-slate-900">Create payment QR</span>
</div>
<div class="hidden lg:block">
<a href="{{ route('mini.payment-qrs.index') }}" class="text-sm text-slate-500 hover:text-slate-700"> Back to payment QRs</a>
<h1 class="mt-2 text-xl font-semibold text-slate-900">Create payment QR</h1>
<p class="mt-1 text-sm text-slate-500">Customers scan, enter an amount, and pay. Your QR is generated automatically no styling needed.</p>
</div>
@if(session('error'))
<div class="rounded-xl border border-red-100 bg-red-50 px-4 py-3 text-sm text-red-700">{{ session('error') }}</div>
@endif
<form method="post" action="{{ route('mini.payment-qrs.store') }}" enctype="multipart/form-data" class="space-y-5 rounded-2xl border border-slate-200 bg-white p-6">
@csrf
<div>
<label class="block text-sm font-medium text-slate-700">QR label</label>
<input type="text" name="label" value="{{ old('label') }}" required maxlength="120" placeholder="e.g. Main till"
class="mt-1 w-full rounded-xl border-slate-200 text-sm focus:border-indigo-500 focus:ring-indigo-500">
<p class="mt-1 text-xs text-slate-500">Internal name shown in your dashboard only.</p>
</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') }}" required maxlength="120" placeholder="e.g. Kofi's Shop"
class="mt-1 w-full rounded-xl border-slate-200 text-sm focus:border-indigo-500 focus:ring-indigo-500">
<p class="mt-1 text-xs text-slate-500">Shown on the customer payment screen.</p>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Branch / till (optional)</label>
<input type="text" name="branch_label" value="{{ old('branch_label') }}" maxlength="80" placeholder="e.g. Osu branch"
class="mt-1 w-full rounded-xl border-slate-200 text-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Logo (optional)</label>
<input type="file" name="payment_logo" accept="image/*" class="mt-1 block w-full text-sm text-slate-500">
</div>
<button type="submit" class="w-full rounded-xl bg-indigo-600 py-2.5 text-sm font-semibold text-white hover:bg-indigo-700">Create payment QR</button>
</form>
</div>
</x-user-layout>