feat(manager): UI review pass 3 (fees tabs, products panes, floor editor, permissions search, pricing heads)

- Online orders → Settings: the fee tabs breathe (inset strip); a rule's buttons
  and switch centred together.
- Products: categories and list as panes that scroll on their own, headers and
  footers stay; the list sunken with white rows; the category search is the
  shared SearchInput. Product editor: "Make main" text instead of a star, the
  left tabs share the width.
- Floor editor: no "+" next to a corner; − / fit width / whole plan / +;
  "Edit the floor's shape" → "Save shape" (saves the shape and size at once);
  sizes in grid cells by half cells (steppers; typing snapped every keystroke
  before), resize handles on every unrotated table and thing, half-cell snapping.
- MediaField: the picture's name under the buttons, Remove red on hover.
- Staff permissions: a search box at the top.
- Prep zone name hint fixed. Offers & pricing: title first, then tabs; every tab
  has its head with the New button at the top right.
- Tests: floor cells, e2e (cell steppers, no + near a corner, Save shape,
  permission search, products panes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 17:51:17 +02:00
co-authored by Claude Opus 5.5
parent 181b2f16b0
commit 301502965c
20 changed files with 257 additions and 97 deletions
+17
View File
@@ -73,3 +73,20 @@ test('the floor’s shape: a corner added where the edge was pressed; an area re
assert.equal(coveredAreas([named], []).size, 0)
assert.equal(coveredAreas([named], [{ x: 200, y: 200, width: 80, height: 80 }]).has('a'), true)
})
test('sizes in grid cells (by half cells) follow the grid resolution', async () => {
const { cellOf, resizeCells, toCells } = await import('../src/pages/floor/editorLogic.js')
assert.equal(cellOf(plan), 50)
assert.equal(toCells(100, plan), 2)
assert.equal(toCells(70, plan), 1.5)
assert.equal(toCells(5, plan), 0.5)
const table = { x: 100, y: 100, width: 100, height: 100 }
const r = resizeCells(table, plan, 3, null)
assert.equal(r.width, 150)
assert.equal(r.height, 100)
assert.equal(r.x % 50, 25) // 3 cells: the centre goes into the middle of a cell
assert.equal(resizeCells(table, { ...plan, grid_size: 25 }, 3, 1.5).height, 37.5)
// a resize handle snaps to half cells
const { resizeBox } = await import('@xenia/floorplan/geometry')
assert.equal(resizeBox({ x: 100, y: 100, width: 100, height: 100 }, 'e', 172, 0, { width: 500, height: 500, grid_on: true, grid_size: 50 }).width, 125)
})