feat(terminal): kitchen display on paired screens, live without polling (platform-v2 3.2b)
Port of the manager's KdsPage.jsx into terminal/src/apps/kds, split into pure logic (layout packing, age, buckets, rounds, totals, status cycle, settings; unit-tested) and components (card, item, action bars, dialogs, item totals, rails, settings panel). - Settings are the device's config; the settings panel saves them (managers only), zoom changes the size for the session. - Orders reload on live events and every reconnect; polling only while the live connection is down (DeviceProvider exposes liveUp; useLiveEvents helper). - "Tap to start" unlocks sound; venue clock via useFormat; English-first texts. - Undo of an item recomputes the order status at once; undo/redo clear the selection. - Tests: terminal unit +15, terminal.mjs +12 KDS checks (no polling, live order + chime, item/undo/prepare/decline, settings permission, change made elsewhere), backend regression for an item back to pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ export default defineConfig([
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
|
||||
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]', argsIgnorePattern: '^[A-Z_]' }], // components passed as props (Icon)
|
||||
// Loading data in an effect (`useEffect(() => { load() }, [load])`, setState after the
|
||||
// await) is flagged too; it's what the screens do, so a warning, as in the manager.
|
||||
'react-hooks/set-state-in-effect': 'warn',
|
||||
|
||||
Reference in New Issue
Block a user