feat(terminal): counter POS screen with server-priced cart and shift gate (platform-v2 3.3a)
- Backend /api/pos (pos_counter): session (business day, the cashier's own shift, self-start, who can open the day), menu (sellable products with every kind of choice, no costs; price now from the pricing engine), quote (lines by id → the waiter's selected_options entries with DB prices → resolve_price as orders do; pos.line_invalid). - POS device settings: default order type, start category, receipt printer (new ref sources categories / printers, also in the manager's Devices dialogs). - Terminal apps/pos: shift gate (start shift with drawer cash), categories, search, product grid, price check, options dialog, cart priced by the backend. - Tests: backend test_pos (13), terminal pos.test.mjs, manager refOptions, terminal.mjs +10 POS checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -204,9 +204,11 @@ def test_config_validated_and_effective(client, pair, owner_h): # "done when" 4
|
||||
|
||||
def test_module_catalogue_describes_config(client, owner_h):
|
||||
mods = {m["key"]: m for m in client.get("/api/platform/modules", headers=owner_h).json()["modules"]}
|
||||
assert mods["pos_counter"]["device_app"]["config"] == [{"key": "auto_sign_out_minutes", "type": "int", "default": 0,
|
||||
"choices": [0, 2, 5, 10, 30, 60], "min": None, "max": None,
|
||||
"choices_from": None, "group": None, "after": None}]
|
||||
pos = {f["key"]: f for f in mods["pos_counter"]["device_app"]["config"]}
|
||||
assert pos["auto_sign_out_minutes"] == {"key": "auto_sign_out_minutes", "type": "int", "default": 0,
|
||||
"choices": [0, 2, 5, 10, 30, 60], "min": None, "max": None,
|
||||
"choices_from": None, "group": None, "after": None}
|
||||
assert pos["receipt_printer_id"]["choices_from"] == "printers" and pos["start_category_id"]["choices_from"] == "categories"
|
||||
kds = {f["key"]: f for f in mods["kds"]["device_app"]["config"]}
|
||||
assert kds["prep_zone_id"] == {"key": "prep_zone_id", "type": "ref", "default": None, "choices": [], "min": None,
|
||||
"max": None, "choices_from": "prep_zones", "group": "zone", "after": None}
|
||||
|
||||
Reference in New Issue
Block a user