feat: the venue's identity in every app: its colour as the accent of the waiters' phones and every terminal screen, customer display looks on the identity, the signage logo widget falls back to the venue's logo

Settings -> Venue -> accent "The venue's identity" (venue.theme = identity): bootstrap
carries the identity's first colour and logos; @xenia/ui applyVenueTheme makes the
accent tokens (light and dark, readable foregrounds) from it. A display look's
"Colours and logo" can be the venue's identity. Plan 6R.20, F-117.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 15:30:14 +02:00
co-authored by Claude Opus 5.5
parent 0bd32d9171
commit 1b111c0e27
20 changed files with 229 additions and 28 deletions
+10
View File
@@ -8,3 +8,13 @@ def test_venue_theme_reaches_bootstrap(client, make_user, login):
assert client.get("/api/platform/bootstrap").json()["venue"]["theme"] == "blue"
r = client.put("/api/settings/venue.theme", headers=owner, json={"value": "neon"})
assert r.status_code in (400, 422)
def test_the_identity_as_the_staff_apps_colour(client, make_user, login):
"""6R.20: venue.theme "identity" = the first colour of the venue's identity; bootstrap carries it and the logos."""
owner = login(make_user(role="owner"))
assert client.get("/api/platform/bootstrap").json()["venue"]["identity"]["colour"] is None
client.put("/api/identity", headers=owner, json={"colours": [{"name": "Main", "colour": "#1E3A8A"}], "slogan": "Since 1987"})
assert client.put("/api/settings/venue.theme", headers=owner, json={"value": "identity"}).status_code == 200
v = client.get("/api/platform/bootstrap").json()["venue"]
assert v["theme"] == "identity" and v["identity"]["colour"] == "#1e3a8a" and v["identity"]["slogan"] == "Since 1987" and v["identity"]["logo"] is None