Files
ladill-mini/resources/views/mini/payment-qrs/show.blade.php
T
isaaccladandCursor 05ca584016
Deploy Ladill Mini / deploy (push) Successful in 26s
Move payment QR download and share actions back to the page header.
Remove the till/counter helper copy and drop duplicate download buttons from the preview card.

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

72 lines
4.4 KiB
PHP

<x-user-layout>
<x-slot name="title">{{ $qrCode->label }}</x-slot>
@php $c = $qrCode->content(); @endphp
<div class="mx-auto max-w-6xl space-y-6">
<div class="flex flex-wrap items-start justify-between gap-4">
<div class="min-w-0 flex-1">
<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="M6 18 18 6M6 6l12 12"/>
</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">{{ $qrCode->label }}</span>
</div>
<div class="hidden lg:block">
<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>
@include('mini.payment-qrs.partials.header-actions', ['qrCode' => $qrCode])
</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-[380px_1fr]">
<div class="lg:sticky lg:top-6 lg:self-start">
@include('mini.payment-qrs.partials.preview-card', [
'qrCode' => $qrCode,
'previewDataUri' => $previewDataUri,
'showDownloads' => false,
])
<p class="mt-4 break-all text-center text-sm text-indigo-600">{{ $qrCode->publicUrl() }}</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>