Deploy Ladill POS / deploy (push) Successful in 23s
The "links" slice — a guest scans a table's QR, browses the menu (with
modifiers), and submits an order that lands on that table's open tab and fires
straight to the Kitchen Display.
- Public, auth-free flow scoped by an unguessable table short_code:
GET /t/{code} (menu + client cart), POST /t/{code}/order (throttled),
GET /t/{code}/done. Orders open/append the table's dine-in tab, add lines as
source=guest, and send to the kitchen.
- Staff print a per-table QR (Settings → table → QR; renders client-side to the
public menu URL). short_code is generated lazily.
- Guest lines are badged on the ticket and the KDS so staff can tell them apart;
staff still settle the tab as usual (cash / Ladill Pay).
- Extracted PosSaleService::buildProductLine as the single product+modifier
price resolver, now shared by staff and guest ordering (client prices never
trusted).
Schema additive: pos_tables.short_code, pos_sale_lines.source. New
PosRestaurantTest covers the guest order firing to the kitchen; suite green (12).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
1.3 KiB
PHP
21 lines
1.3 KiB
PHP
<x-app-layout title="Table QR">
|
|
<div class="mx-auto max-w-md space-y-4">
|
|
<a href="{{ route('pos.floor') }}" class="inline-flex items-center gap-1 text-sm text-slate-500 hover:text-slate-700 print:hidden">
|
|
<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>
|
|
Floor
|
|
</a>
|
|
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-8 text-center">
|
|
<p class="text-xs font-semibold uppercase tracking-widest text-slate-400">Scan to order</p>
|
|
<h1 class="mt-1 text-2xl font-bold text-slate-900">{{ $table->label }}</h1>
|
|
<div x-data="posQr(@js(['data' => $url, 'size' => 240]))" class="mt-5 flex justify-center"></div>
|
|
<p class="mt-4 break-all text-xs text-slate-400">{{ $url }}</p>
|
|
</div>
|
|
|
|
<div class="flex justify-center gap-2 print:hidden">
|
|
<button type="button" onclick="window.print()" class="btn-primary">Print</button>
|
|
<a href="{{ $url }}" target="_blank" rel="noopener" class="rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Open menu</a>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|