fix: loyalty sidebar menu label and active state highlighting
Some checks failed
CI / ruff (push) Successful in 10s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has started running

- Rename menu item IDs to match URL last segments (terminal, cards,
  stats) so the sidebar active state comparison works correctly
- Change "Dashboard" label to "Terminal" for the loyalty terminal page
- Point menu route directly to /loyalty/terminal (skip redirect)
- Add "terminal" translation key in all locale files (en, de, fr, lb)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 22:04:16 +01:00
parent 81cf84ed28
commit 12c1c3c511
6 changed files with 10 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ class ModuleConfig(BaseSettings):
# QR code settings
qr_code_size: int = 300 # pixels
model_config = {"env_prefix": "LOYALTY_", "env_file": ".env", "extra": "ignore"}
model_config = {"env_prefix": "LOYALTY_"}
# Export for auto-discovery

View File

@@ -155,21 +155,21 @@ loyalty_module = ModuleDefinition(
order=35,
items=[
MenuItemDefinition(
id="loyalty",
label_key="loyalty.menu.dashboard",
id="terminal",
label_key="loyalty.menu.terminal",
icon="gift",
route="/store/{store_code}/loyalty",
route="/store/{store_code}/loyalty/terminal",
order=10,
),
MenuItemDefinition(
id="loyalty-cards",
id="cards",
label_key="loyalty.menu.customer_cards",
icon="identification",
route="/store/{store_code}/loyalty/cards",
order=20,
),
MenuItemDefinition(
id="loyalty-stats",
id="stats",
label_key="loyalty.menu.statistics",
icon="chart-bar",
route="/store/{store_code}/loyalty/stats",

View File

@@ -75,6 +75,7 @@
"programs": "Programme",
"analytics": "Analytik",
"dashboard": "Dashboard",
"terminal": "Terminal",
"customer_cards": "Kundenkarten",
"statistics": "Statistiken"
}

View File

@@ -75,6 +75,7 @@
"programs": "Programs",
"analytics": "Analytics",
"dashboard": "Dashboard",
"terminal": "Terminal",
"customer_cards": "Customer Cards",
"statistics": "Statistics"
}

View File

@@ -75,6 +75,7 @@
"programs": "Programmes",
"analytics": "Analytique",
"dashboard": "Tableau de bord",
"terminal": "Terminal",
"customer_cards": "Cartes clients",
"statistics": "Statistiques"
}

View File

@@ -75,6 +75,7 @@
"programs": "Programmer",
"analytics": "Analytik",
"dashboard": "Dashboard",
"terminal": "Terminal",
"customer_cards": "Clientekaarten",
"statistics": "Statistiken"
}