Add restaurant/café mode: floor, open tabs, and kitchen display (Phase 1)
Deploy Ladill POS / deploy (push) Successful in 30s
Deploy Ladill POS / deploy (push) Successful in 30s
Gated by a per-location service_style (retail | restaurant). Restaurant mode adds: - Floor screen with tables (areas, seats, status) — tap a free table to open a dine-in tab; takeaway/counter orders open from the same screen. - Open tickets (tabs): a sale stays pending while items are added; lines persist as you go (posTicket Alpine component posts each change to the server). - Send-to-kitchen fires un-sent lines; a polling Kitchen Display (KDS) shows active tickets and bumps items queued → preparing → ready → served. - Settlement reuses the existing cash / Ladill Pay flow; paying closes the tab and frees the table (PosSaleService::closeTicket, wired into both pay paths). - Settings gains the mode toggle and a tables manager. Schema is additive (new pos_tables; service_style on locations; order/kitchen columns on sales + lines). Retail flow is untouched. Sidebar surfaces Floor + Kitchen only in restaurant mode. New PosRestaurantTest covers the dine-in lifecycle end to end; suite green (10 passed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e9a0c92308
commit
d9e4b6e06e
@@ -19,6 +19,15 @@
|
||||
<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"
|
||||
@@ -49,5 +58,42 @@
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if ($location->isRestaurant())
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-6">
|
||||
<h2 class="text-sm font-semibold text-slate-900">Tables</h2>
|
||||
<p class="mt-1 text-sm text-slate-500">Dine-in tables shown on the Floor screen.</p>
|
||||
|
||||
<form method="POST" action="{{ route('pos.settings.tables.store') }}" class="mt-4 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>
|
||||
<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>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user