feat: the table map (platform-v2 step 6.8, D-31)

- floor_plans / floor_items (0035), tables' plan_id + width/height/rotation/shape;
  /api/floor-plans (set-up, catalog.tables.manage, floor_plans.changed) and
  /api/floor-plans/live (each table's state, guests, waiters, time; zone rule)
- @xenia/floorplan: the drawing (Floor, Item, TableShape, FloorView) and its geometry
  (grid snap in whole cells, outlines, chairs), tested
- manager: Management -> Tables -> Floor plans (editor: drag, grid, irregular floor,
  walls/bar/labels/areas, background picture), Tables page List / Map
- counter POS: Tables List / Map; waiter: Map mode, the list stays the default
- tests: test_floor_plans.py, floor + geometry unit tests, manager/waiter/terminal e2e

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 17:00:45 +02:00
co-authored by Claude Opus 5.5
parent fd3254aa31
commit f4aae6abbc
47 changed files with 2102 additions and 8 deletions
+19
View File
@@ -98,5 +98,24 @@
"sulphites": "Sulphites",
"lupin": "Lupin",
"molluscs": "Molluscs"
},
"floorMap": {
"none": "No floor plan yet",
"noneHint": "A manager draws the floor plans in Management → Tables → Floor plans.",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out",
"fit": "Fit",
"bar": "Bar",
"notOnMap": "Not on the map:",
"legendGuests": "👤 guests / seats",
"map": "Map",
"list": "List",
"state": {
"free": "Free",
"mine": "Yours",
"open": "Open",
"paid": "Paid",
"reserved": "Booked soon"
}
}
}
+7
View File
@@ -329,5 +329,12 @@
"pricing": {
"bad_limit": "A discount limit must be a number of 0 or more, or empty for no limit.",
"bad_condition": "A condition is incomplete: fill in all its values."
},
"floor_plan": {
"not_found": "Floor plan not found.",
"bad_outline": "The floor's shape needs 3 to 100 corners, all inside the plan.",
"bad_zone": "That zone no longer exists.",
"bad_background": "The background must be a picture from the media library.",
"bad_layout": "The layout has a table twice or a place that is not a number."
}
}
+85
View File
@@ -2097,5 +2097,90 @@
"max_items_per_orderHint": "Discounted items on one order."
}
}
},
"floor": {
"pageTabs": "Tables",
"tabs": {
"list": "Tables and zones",
"floor": "Floor plans"
},
"title": "Floor plans",
"intro": "Draw where the tables stand. A zone can have several floor plans (e.g. ground floor and upstairs). The phones, the counter and the Tables page show them live.",
"none": "No floor plan yet",
"noneHint": "Make one, then put the tables on it.",
"new": "New floor plan",
"create": "Create",
"cancel": "Cancel",
"save": "Save",
"saved": "Floor plan saved.",
"delete": "Delete the floor plan",
"deleted": "Floor plan deleted.",
"deleteTitle": "Delete the floor plan?",
"deleteBody": "\"{{name}}\" will be gone. Its tables stay (off any plan) and so do their orders.",
"unsaved": "Not saved",
"undoAll": "Undo the changes",
"name": "Name",
"namePlaceholder": "e.g. Ground floor",
"zone": "Zone",
"zoneHint": "Its tables are the ones offered first; the waiters of other zones don't see it.",
"noZone": "No zone",
"size": "Size",
"sizeHint": "You can change it later.",
"sizes": {
"small": "Small ({{w}} × {{h}})",
"medium": "Medium ({{w}} × {{h}})",
"large": "Large ({{w}} × {{h}})"
},
"tableCount_one": "{{count}} table",
"tableCount_other": "{{count}} tables",
"grid": "Grid",
"gridSize": "Grid size",
"gridCell": "Cells of {{size}}",
"editShape": "Edit the floor's shape",
"shapeHint": "Drag the corners to give the floor its real shape (an L, a terrace…). Pick a corner to add one after it or remove it.",
"shapeTitle": "The floor's shape",
"cornerCount_one": "{{count}} corner",
"cornerCount_other": "{{count}} corners",
"addCorner": "Add a corner after it",
"removeCorner": "Remove the corner",
"rectangle": "Back to a rectangle",
"canvas": "The floor plan: drag the tables and things; arrow keys move the selected one",
"keysHint": "Arrow keys move what's selected (one grid cell, or 5; with Shift 1), Delete takes it off, Escape lets go.",
"add": "Add",
"newTableShape": "New tables are",
"allPlaced": "Every table is on this plan.",
"zoneTables": "Tables of {{zone}}",
"offPlan": "Tables not on this plan",
"otherTables": "Other zones' tables",
"things": "Things",
"kinds": {
"wall": "Wall",
"bar": "Bar",
"label": "Label",
"area": "Area"
},
"labelText": "Label",
"settings": "The plan",
"width": "Width",
"height": "Height",
"background": "Background picture",
"backgroundOpacity": "How strong: {{value}}%",
"table": "Table {{name}}",
"shape": "Shape",
"shapes": {
"square": "Square",
"round": "Round",
"long": "Long"
},
"seats": "Seats",
"seatsHint": "Shown as chairs, and offered as the number of guests.",
"text": "Text",
"itemWidth": "Width",
"itemHeight": "Depth",
"rotation": "Turned {{deg}}°",
"rotateLeft": "Turn left 15°",
"rotateRight": "Turn right 15°",
"takeOff": "Take it off the plan",
"removeThing": "Remove"
}
}