feat(manager): the floor plan editor reworked; Management -> Tables on the page rule; area colours

- Floor editor: one toolbar over the map and the panels (grid on / off, grid resolution Ultra high
  ... Very low, edit the shape, Fit width / Whole plan, undo, save), panels top-aligned and sticky.
- The floor's shape: a '+' on the edge under the pointer, press to add a corner (and drag it);
  resting on a corner shows a bubble to remove it (never below 3).
- Areas: resize handles on the sides and corners, a colour (pastel, see-through; floor_items.color,
  migration 0041), the name repeated in the corner when tables cover it (live maps too).
- Labels can be clicked again after they're placed (transparent fill, not none).
- Management -> Tables: <Page> with the tabs above (?tab=), the list as a container, toolbar
  buttons one height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 15:17:45 +02:00
co-authored by Claude Opus 5.5
parent 476c55abc0
commit 244e93f827
17 changed files with 389 additions and 111 deletions
+13
View File
@@ -90,3 +90,16 @@ def test_the_live_map_shows_each_table_state_to_the_right_people(client, owner_h
assert len(client.get("/api/floor-plans/live", headers=owner_h).json()["tables"]) == 4
# only the tables' managers set plans up
assert client.post("/api/floor-plans", headers=h, json={"name": "x"}).status_code == 403
def test_an_area_keeps_its_colour(client, owner_h, venue):
"""2026-11-20: an area has a colour ("#rrggbb", drawn see-through); other things don't."""
p = plan(client, owner_h, group_id=venue["inside"].id)
r = client.put(f"/api/floor-plans/{p['id']}/layout", headers=owner_h, json={"items": [
{"kind": "area", "x": 300, "y": 300, "width": 300, "height": 200, "text": "Terrace", "color": "#86efac"},
{"kind": "wall", "x": 10, "y": 10, "width": 100, "height": 12, "color": "#86efac"}]})
assert r.status_code == 200, r.text
assert [(i["kind"], i["color"]) for i in r.json()["items"]] == [("area", "#86efac"), ("wall", None)]
bad = client.put(f"/api/floor-plans/{p['id']}/layout", headers=owner_h, json={"items": [
{"kind": "area", "x": 1, "y": 1, "width": 10, "height": 10, "color": "red; drop"}]})
assert bad.status_code == 422