feat(products): every menu text per language, the editor's language picker, service item dialog

- Alembic 0042: a `translations` column on every choice (groups, quick options,
  extras, ingredients, preference sets and choices; sub-choices and shared
  sub-sets in their JSON); the texts typed so far become the text in their
  language (Greek letters → el, else the venue's); the product's old quick map
  moves onto the quick options. API, catalogue bundle and the cloud's quick
  option names carry them; names are checked before anything is replaced.
- Editor: a language picker beside the close button (Default = the venue's
  language, plus every menu language) drives every name and description, left
  and right; an empty language shows what is used instead as its placeholder.
  The shown name is the venue language's, else any (never mixed).
- Choices: one name field; the shared controls at one height (heart red when on,
  several / compact… chips coloured when on, delete red on hover); "+ Preference"
  at the right end of the tab strip; preference groups made inside a preference.
- Categories: the shared dropdown to add one; the category dialog per language.
- The service item switch is gone: "New service item" opens its own small dialog.
- UI: Dialog headerEnd; a toned toggle keeps its colour while pressed.
- Tests: backend (choice names, migration 0042), access, editor logic, e2e.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 18:21:50 +02:00
co-authored by Claude Opus 5.5
parent 301502965c
commit 15413dea1b
30 changed files with 853 additions and 313 deletions
+3
View File
@@ -58,6 +58,8 @@
.x-btn--tone { color: var(--x-ink-2); }
.x-btn--tone:hover:not(:disabled), .x-btn--tone:focus-visible { color: rgb(var(--x-tone-ink)); }
.x-btn--icon.x-btn--tone { background: var(--x-surface-2); }
/* a toned toggle that is on (a favourite's heart) keeps its colour */
.x-btn--tone[aria-pressed="true"] { color: rgb(var(--x-tone-ink)); }
.x-btn--icon.x-btn--tone:hover:not(:disabled) { background: var(--x-surface-3); }
.x-btn--tone-danger { --x-tone: var(--x-danger-rgb); --x-tone-soft: var(--x-danger-soft-rgb); --x-tone-ink: var(--x-danger-ink-rgb); }
.x-btn--tone-warning { --x-tone: var(--x-warning-rgb); --x-tone-soft: var(--x-warning-soft-rgb); --x-tone-ink: var(--x-warning-ink-rgb); }
@@ -124,6 +126,7 @@
.x-modal__titles { flex: 1; min-width: 0; padding-top: var(--x-space-1-5); }
.x-modal__title { margin: 0; font-size: var(--x-text-title); line-height: var(--x-leading-title); font-weight: var(--x-weight-semibold); }
.x-modal__description { margin: var(--x-space-1) 0 0; font-size: var(--x-text-body); line-height: var(--x-leading-body); color: var(--x-ink-2); }
.x-modal__header-end { flex-shrink: 0; display: flex; align-items: center; gap: var(--x-space-2); }
.x-modal__close { margin: calc(-1 * var(--x-space-1)) calc(-1 * var(--x-space-1)) 0 0; }
.x-modal__toolbar { flex-shrink: 0; padding: var(--x-space-2) var(--x-space-6) var(--x-space-3); border-bottom: var(--x-border-width) solid var(--x-line); }
.x-modal__body {