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:
+10
-6
@@ -1122,14 +1122,18 @@ try {
|
||||
await page.mouse.up()
|
||||
// an irregular floor: a corner more, pulled in
|
||||
await page.getByTestId('floor-shape-mode').click()
|
||||
await page.getByTestId('floor-corner').nth(1).click()
|
||||
await page.getByTestId('floor-corner-add').click()
|
||||
await page.getByTestId('floor-corner').nth(2).scrollIntoViewIfNeeded()
|
||||
const corner = await page.getByTestId('floor-corner').nth(2).boundingBox()
|
||||
await page.mouse.move(corner.x + corner.width / 2, corner.y + corner.height / 2)
|
||||
// 2026-11-20: a "+" shows on the edge under the pointer; pressing there adds a corner and drags it
|
||||
const c1 = await page.getByTestId('floor-corner').nth(1).boundingBox()
|
||||
const c2 = await page.getByTestId('floor-corner').nth(2).boundingBox()
|
||||
const mid = { x: (c1.x + c1.width / 2 + c2.x + c2.width / 2) / 2, y: (c1.y + c1.height / 2 + c2.y + c2.height / 2) / 2 }
|
||||
await page.mouse.move(mid.x, mid.y - 3)
|
||||
await page.mouse.move(mid.x, mid.y, { steps: 2 })
|
||||
await page.getByTestId('floor-edge-add').waitFor({ timeout: 3000 }).catch(() => {})
|
||||
r.check('floor: a "+" shows on the floor's edge under the pointer', await page.getByTestId('floor-edge-add').count() === 1)
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(corner.x - 120, corner.y + 10, { steps: 6 })
|
||||
await page.mouse.move(mid.x - 120, mid.y + 10, { steps: 6 })
|
||||
await page.mouse.up()
|
||||
r.check('floor: pressing on the edge added a corner (5)', await page.getByTestId('floor-corner').count() === 5)
|
||||
await page.getByTestId('floor-shape-mode').click()
|
||||
await page.screenshot({ path: path.join(OUT, 'manager-floor-editor.png') })
|
||||
await page.getByTestId('floor-save').click()
|
||||
|
||||
@@ -16,14 +16,16 @@ import { killTree, login, startBackend, waitHttp } from './lib/proc.mjs'
|
||||
|
||||
const DIR = path.join(OUT, 'manager-layout')
|
||||
mkdirSync(DIR, { recursive: true })
|
||||
// pages on <Page> (the rest have their own layout: products, tables set-up, stock placeholder)
|
||||
// pages on <Page> (all but the stock placeholder, 2026-11-20)
|
||||
const PAGES = [
|
||||
'dashboard', 'tables', 'tables?view=qr', 'online-orders', 'online-orders?tab=settings', 'crm/contacts', 'crm/customers',
|
||||
'financials/expenses', 'financials/tabs', 'management/media', 'management/signage', 'management/staff', 'management/sessions',
|
||||
'management/approvals', 'management/schedule', 'management/prep-zones', 'management/pricing', 'inventory/throwaways', 'notes',
|
||||
'management/approvals', 'management/schedule', 'management/prep-zones', 'management/pricing', 'management/pricing?tab=channels',
|
||||
'management/products', 'management/tables', 'management/tables?tab=floor', 'inventory/throwaways', 'notes',
|
||||
'reports/today', 'reports/store', 'devices', 'license', 'apps', 'settings?tab=operation',
|
||||
]
|
||||
const SHOTS = ['dashboard', 'tables', 'tables?view=qr', 'online-orders?tab=settings', 'crm/contacts', 'crm/customers', 'financials/expenses']
|
||||
const SHOTS = ['dashboard', 'tables', 'tables?view=qr', 'online-orders?tab=settings', 'crm/contacts', 'crm/customers', 'financials/expenses',
|
||||
'management/products', 'management/tables?tab=floor', 'management/pricing?tab=channels', 'financials/tabs', 'management/staff']
|
||||
const SCREENS = [{ id: '1080p', width: 1920, height: 1080 }, { id: 'ultrawide', width: 3440, height: 1440 }]
|
||||
const MODULES = ['connect_orders', 'connect_menu', 'crm', 'tabs', 'expenses', 'inventory', 'notes', 'chat', 'reservations', 'pricing', 'signage', 'staff_planning']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user