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
@@ -3,10 +3,13 @@
|
||||
use App\Http\Controllers\Auth\SsoLoginController;
|
||||
use App\Http\Controllers\Pos\AiController;
|
||||
use App\Http\Controllers\Pos\DashboardController;
|
||||
use App\Http\Controllers\Pos\KitchenController;
|
||||
use App\Http\Controllers\Pos\ProductController;
|
||||
use App\Http\Controllers\Pos\RegisterController;
|
||||
use App\Http\Controllers\Pos\SaleController;
|
||||
use App\Http\Controllers\Pos\SettingsController;
|
||||
use App\Http\Controllers\Pos\TableController;
|
||||
use App\Http\Controllers\Pos\TicketController;
|
||||
use App\Http\Controllers\NotificationController;
|
||||
use App\Http\Controllers\WalletBalanceController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
@@ -44,6 +47,20 @@ Route::middleware(['auth', 'platform.session'])->group(function () {
|
||||
Route::get('/sales', [SaleController::class, 'index'])->name('pos.sales.index');
|
||||
Route::get('/sales/{sale}', [SaleController::class, 'show'])->name('pos.sales.show');
|
||||
|
||||
// Restaurant mode — floor, open tickets (tabs), and the kitchen display.
|
||||
Route::get('/floor', [TableController::class, 'index'])->name('pos.floor');
|
||||
Route::post('/tickets', [TicketController::class, 'open'])->name('pos.tickets.open');
|
||||
Route::get('/tickets/{sale}', [TicketController::class, 'show'])->name('pos.tickets.show');
|
||||
Route::post('/tickets/{sale}/lines', [TicketController::class, 'addLine'])->name('pos.tickets.lines.add');
|
||||
Route::patch('/tickets/{sale}/lines/{line}', [TicketController::class, 'updateLine'])->name('pos.tickets.lines.update');
|
||||
Route::delete('/tickets/{sale}/lines/{line}', [TicketController::class, 'removeLine'])->name('pos.tickets.lines.remove');
|
||||
Route::post('/tickets/{sale}/send', [TicketController::class, 'sendToKitchen'])->name('pos.tickets.send');
|
||||
Route::post('/tickets/{sale}/settle', [TicketController::class, 'settle'])->name('pos.tickets.settle');
|
||||
|
||||
Route::get('/kitchen', [KitchenController::class, 'index'])->name('pos.kitchen');
|
||||
Route::get('/kitchen/feed', [KitchenController::class, 'feed'])->name('pos.kitchen.feed');
|
||||
Route::post('/kitchen/lines/{line}/bump', [KitchenController::class, 'bump'])->name('pos.kitchen.bump');
|
||||
|
||||
Route::get('/products', [ProductController::class, 'index'])->name('pos.products.index');
|
||||
Route::get('/products/create', [ProductController::class, 'create'])->name('pos.products.create');
|
||||
Route::post('/products', [ProductController::class, 'store'])->name('pos.products.store');
|
||||
@@ -55,6 +72,8 @@ Route::middleware(['auth', 'platform.session'])->group(function () {
|
||||
Route::put('/settings', [SettingsController::class, 'update'])->name('pos.settings.update');
|
||||
Route::post('/settings/import-crm', [SettingsController::class, 'importCrm'])->name('pos.settings.import-crm');
|
||||
Route::post('/settings/import-merchant', [SettingsController::class, 'importMerchant'])->name('pos.settings.import-merchant');
|
||||
Route::post('/settings/tables', [SettingsController::class, 'storeTable'])->name('pos.settings.tables.store');
|
||||
Route::delete('/settings/tables/{table}', [SettingsController::class, 'destroyTable'])->name('pos.settings.tables.destroy');
|
||||
|
||||
Route::get('/wallet', fn () => redirect()->away(ladill_account_url('/wallet')))->name('pos.wallet');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user