Restaurant mode Phase 2: menu depth — categories, stations, modifiers, courses
Deploy Ladill POS / deploy (push) Successful in 35s

Builds on Phase 1 with the menu structure restaurants need:
- Menu setup page (restaurant mode): categories, kitchen stations, and modifier
  groups with options (price deltas).
- Products gain category, kitchen station, default course, and attached modifier
  groups (managed on the product form).
- Ordering: the ticket groups the catalog by category and, when a product has
  modifier groups, opens a picker (respects min/max select) for options + notes +
  course before adding. Effective price = base + modifier deltas (resolved
  server-side; client prices are never trusted).
- Fire-by-course: send the whole tab or just one course to the kitchen.
- KDS: filter by station; each item shows its station, course, modifiers and notes.

Schema additive (pos_categories, pos_stations, pos_modifier_groups, pos_modifiers,
product↔group pivot, pos_sale_line_modifiers; category/station/course columns on
products and lines). PosRestaurantTest covers modifiers, course and station routing;
suite green (11 passed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
isaacclad
2026-06-24 19:58:57 +00:00
co-authored by Claude Opus 4.8
parent d9e4b6e06e
commit 50b170b0af
21 changed files with 940 additions and 38 deletions
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Http\Controllers\Pos\Concerns\ScopesToAccount;
use App\Models\PosSale;
use App\Models\PosSaleLine;
use App\Models\PosStation;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
@@ -16,7 +17,9 @@ class KitchenController extends Controller
public function index(Request $request): View
{
return view('pos.kitchen.index');
return view('pos.kitchen.index', [
'stations' => PosStation::owned($this->ownerRef($request))->orderBy('name')->get(['id', 'name']),
]);
}
/**
@@ -29,7 +32,7 @@ class KitchenController extends Controller
$sales = PosSale::owned($owner)
->openTickets()
->where('kitchen_status', PosSale::KITCHEN_ACTIVE)
->with(['table', 'lines' => fn ($q) => $q->orderBy('position')])
->with(['table', 'lines' => fn ($q) => $q->orderBy('position')->with('modifiers', 'station')])
->orderBy('kitchen_sent_at')
->get();
@@ -57,6 +60,10 @@ class KitchenController extends Controller
'name' => $l->name,
'quantity' => $l->quantity,
'notes' => $l->notes,
'course' => $l->course,
'station' => $l->station?->name,
'station_id' => $l->station_id,
'modifiers' => $l->modifiers->map(fn ($m) => $m->name)->all(),
'state' => $l->kitchen_state,
])->all(),
];