feat(manager): every settings tab on v2 (platform-v2 step 6.14a)

- Settings: tabs in the address (?tab=), Fiscal only with the fiscal app, Appearance only with the waiter app
- General: version / update / license / state / uptime, the local network (address by hand or found, the pairing QR),
  what is set up, export / import of the catalogue and the tables (a wrong file refused, two confirmations), support lock
- Sign-in & security: idle lock / sign-out (seconds..hours, warning when sign-out comes first), recovery codes
- Operation: role permissions, waiters' own shifts and takings, card payments, tables and orders, courses (add, rename,
  colour, order), quick notes, table flags (emoji, colour, white/black text, on/off), quick messages, send the QR menu now
- Appearance: the waiter app's table-card colours per state, light and dark, flash, colour picker with opacity, reset
- Fiscal: on/off, driver, folders with a reachability check, clerk / card terminal numbers, receipt end lines, VAT groups
- Development: pretend printing
- dropped: the v1 'automatic store schedule' switches (kept in the browser only, nothing read them) and the second time-zone card
- backend: JSON settings must be JSON (validation.setting_value); fiscal folders are plain paths (were typed json)
- venue colour data in sections/venueColours.js (guard DATA); store/tableColourStore and Settings/tabs deleted
- tests: settings.test.mjs (5), test_settings_json.py, e2e manager.mjs 'settings v2' (12 checks)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 19:41:14 +02:00
co-authored by Claude Opus 5.5
parent bde125bf09
commit f6fcfb7736
27 changed files with 1935 additions and 2819 deletions
@@ -1,117 +0,0 @@
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
// Must stay in sync with waiter_pwa/src/store/tableColourStore.js DEFAULT_COLOURS.
// The PWA uses these as its hardcoded fallback; the manager uses them for "reset to defaults".
export const DEFAULT_COLOURS = {
light: {
free: {
cardBg: '#dde5ef',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#3d5270',
badgeText: '#3d5270',
},
mine: {
cardBg: '#e8610a',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#e8610a',
},
open: {
cardBg: '#FF8F60',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#FF8F60',
},
partially_paid: {
cardBg: '#FFDC67',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#d4a800',
},
paid: {
cardBg: '#81D264',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#81D264',
},
kds_ready: {
cardBg: '#5dc936',
cardBg2: '#FFDC67',
badgeBg: 'rgba(255,255,255,0.57)',
badgeBg2: 'rgba(255,255,255,0.57)',
nameText: '#ffffff',
nameText2: '#ffffff',
badgeText: 'rgba(45,71,36,0.63)',
badgeText2:'rgba(45,71,36,0.63)',
flash: true,
},
},
dark: {
free: {
cardBg: '#243044',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#94b8d4',
badgeText: '#94b8d4',
},
mine: {
cardBg: '#e8610a',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#e8610a',
},
open: {
cardBg: '#FF8F60',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#FF8F60',
},
partially_paid: {
cardBg: '#FFDC67',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#d4a800',
},
paid: {
cardBg: '#81D264',
badgeBg: 'rgba(255,255,255,0.92)',
nameText: '#ffffff',
badgeText: '#81D264',
},
kds_ready: {
cardBg: '#5dc936',
cardBg2: '#FFDC67',
badgeBg: 'rgba(255,255,255,0.57)',
badgeBg2: 'rgba(255,255,255,0.57)',
nameText: '#ffffff',
nameText2: '#ffffff',
badgeText: 'rgba(45,71,36,0.63)',
badgeText2:'rgba(45,71,36,0.63)',
flash: true,
},
},
}
const useTableColourStore = create(persist(
(set) => ({
colours: DEFAULT_COLOURS,
setColour: (mode, status, slot, value) =>
set(s => ({
colours: {
...s.colours,
[mode]: {
...s.colours[mode],
[status]: {
...s.colours[mode][status],
[slot]: value,
},
},
},
})),
resetAll: () => set({ colours: DEFAULT_COLOURS }),
}),
{ name: 'pos-table-colours-v2' }
))
export default useTableColourStore