Files
ladill-pos/resources/views/pos/settings.blade.php
T
isaaccladandCursor 9a2d196d84
Deploy Ladill POS / deploy (push) Successful in 1m42s
Add barcode scanner, thermal receipt printing, and printer settings.
Register supports USB keyboard-wedge scanners with SKU lookup (local catalog
and CRM in retail mode). Sales get a thermal receipt print template (58/80mm)
with configurable header/footer, plus optional auto-print after cash sales.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 05:40:14 +00:00

122 lines
8.7 KiB
PHP

<x-app-layout title="Settings">
<x-settings.page description="Register location, receipt footer, and catalog imports.">
<x-settings.card title="Location" description="Register name, currency, service style, and receipt footer.">
<form method="POST" action="{{ route('pos.settings.update') }}" class="space-y-4">
@csrf
@method('PUT')
<div>
<label for="name" class="text-sm font-medium text-slate-700">Register name</label>
<input type="text" id="name" name="name" value="{{ old('name', $location->name) }}" required
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label for="currency" class="text-sm font-medium text-slate-700">Currency</label>
<input type="text" id="currency" name="currency" value="{{ old('currency', $location->currency) }}" maxlength="3" required
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm uppercase shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label for="service_style" class="text-sm font-medium text-slate-700">Service style</label>
<select id="service_style" name="service_style"
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value="retail" @selected(old('service_style', $location->service_style) === 'retail')>Retail quick register checkout</option>
<option value="restaurant" @selected(old('service_style', $location->service_style) === 'restaurant')>Restaurant / café tables, tabs & kitchen display</option>
</select>
<p class="mt-1 text-xs text-slate-400">Restaurant mode adds the Floor and Kitchen screens to the sidebar.</p>
</div>
<div>
<label for="receipt_footer" class="text-sm font-medium text-slate-700">Receipt footer</label>
<textarea id="receipt_footer" name="receipt_footer" rows="3"
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">{{ old('receipt_footer', $location->receipt_footer) }}</textarea>
</div>
<div class="border-t border-slate-100 pt-4">
<p class="text-sm font-semibold text-slate-900">Receipt & printer</p>
<p class="mt-1 text-xs text-slate-400">Thermal receipt layout for browser print (58mm or 80mm paper). USB barcode scanners work as keyboard wedges on the register.</p>
</div>
<div>
<label for="receipt_header" class="text-sm font-medium text-slate-700">Receipt header</label>
<input type="text" id="receipt_header" name="receipt_header" maxlength="500"
value="{{ old('receipt_header', $location->receipt_header) }}"
placeholder="Your business name or tagline"
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label for="printer_paper_mm" class="text-sm font-medium text-slate-700">Receipt paper width</label>
<select id="printer_paper_mm" name="printer_paper_mm"
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value="80" @selected((int) old('printer_paper_mm', $location->printer_paper_mm ?? 80) === 80)>80 mm (standard thermal)</option>
<option value="58" @selected((int) old('printer_paper_mm', $location->printer_paper_mm ?? 80) === 58)>58 mm (compact thermal)</option>
</select>
</div>
<label class="flex items-start gap-3 rounded-xl border border-slate-200 bg-slate-50 px-4 py-3">
<input type="checkbox" name="printer_auto_print" value="1"
@checked(old('printer_auto_print', $location->printer_auto_print))
class="mt-0.5 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
<span>
<span class="block text-sm font-medium text-slate-800">Auto-print after cash sales</span>
<span class="mt-0.5 block text-xs text-slate-500">Opens the receipt print dialog when you record a cash payment.</span>
</span>
</label>
<div class="flex justify-end">
<button type="submit" class="btn-primary">Save settings</button>
</div>
</form>
</x-settings.card>
@if ($location->isRestaurant())
<x-settings.card title="Import catalog" description="Seed your local POS catalog from CRM or Merchant storefronts. (Retail mode reads products live from CRM, so no import is needed.)">
<div class="flex flex-wrap gap-3">
<form method="POST" action="{{ route('pos.settings.import-crm') }}">
@csrf
<button type="submit" class="rounded-xl border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
Import from CRM
</button>
</form>
@if ($merchantImportEnabled)
<form method="POST" action="{{ route('pos.settings.import-merchant') }}">
@csrf
<button type="submit" class="rounded-xl border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
Import from Merchant
</button>
</form>
@endif
</div>
</x-settings.card>
<x-settings.card title="Tables" description="Dine-in tables shown on the Floor screen.">
<form method="POST" action="{{ route('pos.settings.tables.store') }}" class="grid gap-2 sm:grid-cols-[1fr_1fr_5rem_auto]">
@csrf
<input type="text" name="area" placeholder="Area (e.g. Patio)"
class="rounded-xl border-slate-300 text-sm focus:border-indigo-500 focus:ring-indigo-500">
<input type="text" name="label" placeholder="Label (e.g. T1)" required
class="rounded-xl border-slate-300 text-sm focus:border-indigo-500 focus:ring-indigo-500">
<input type="number" name="seats" value="2" min="1" max="99" placeholder="Seats"
class="rounded-xl border-slate-300 text-sm focus:border-indigo-500 focus:ring-indigo-500">
<button type="submit" class="btn-primary">Add</button>
</form>
@if ($tables->isNotEmpty())
<ul class="mt-4 divide-y divide-slate-100">
@foreach ($tables as $table)
<li class="flex items-center justify-between py-2.5 text-sm">
<span>
<span class="font-medium text-slate-900">{{ $table->label }}</span>
<span class="text-slate-400">· {{ $table->area ?: 'Floor' }} · {{ $table->seats }} seats · {{ $table->isFree() ? 'free' : 'occupied' }}</span>
</span>
<div class="flex items-center gap-3">
<a href="{{ route('pos.tables.qr', $table) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">QR</a>
<form method="POST" action="{{ route('pos.settings.tables.destroy', $table) }}"
onsubmit="return confirm('Remove this table?');">
@csrf
@method('DELETE')
<button class="text-sm font-medium text-red-500 hover:text-red-700">Remove</button>
</form>
</div>
</li>
@endforeach
</ul>
@endif
</x-settings.card>
@endif
</x-settings.page>
</x-app-layout>