fix: loyalty sidebar menu label and active state highlighting
Some checks failed
Some checks failed
- 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:
@@ -43,7 +43,7 @@ class ModuleConfig(BaseSettings):
|
|||||||
# QR code settings
|
# QR code settings
|
||||||
qr_code_size: int = 300 # pixels
|
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
|
# Export for auto-discovery
|
||||||
|
|||||||
@@ -155,21 +155,21 @@ loyalty_module = ModuleDefinition(
|
|||||||
order=35,
|
order=35,
|
||||||
items=[
|
items=[
|
||||||
MenuItemDefinition(
|
MenuItemDefinition(
|
||||||
id="loyalty",
|
id="terminal",
|
||||||
label_key="loyalty.menu.dashboard",
|
label_key="loyalty.menu.terminal",
|
||||||
icon="gift",
|
icon="gift",
|
||||||
route="/store/{store_code}/loyalty",
|
route="/store/{store_code}/loyalty/terminal",
|
||||||
order=10,
|
order=10,
|
||||||
),
|
),
|
||||||
MenuItemDefinition(
|
MenuItemDefinition(
|
||||||
id="loyalty-cards",
|
id="cards",
|
||||||
label_key="loyalty.menu.customer_cards",
|
label_key="loyalty.menu.customer_cards",
|
||||||
icon="identification",
|
icon="identification",
|
||||||
route="/store/{store_code}/loyalty/cards",
|
route="/store/{store_code}/loyalty/cards",
|
||||||
order=20,
|
order=20,
|
||||||
),
|
),
|
||||||
MenuItemDefinition(
|
MenuItemDefinition(
|
||||||
id="loyalty-stats",
|
id="stats",
|
||||||
label_key="loyalty.menu.statistics",
|
label_key="loyalty.menu.statistics",
|
||||||
icon="chart-bar",
|
icon="chart-bar",
|
||||||
route="/store/{store_code}/loyalty/stats",
|
route="/store/{store_code}/loyalty/stats",
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"programs": "Programme",
|
"programs": "Programme",
|
||||||
"analytics": "Analytik",
|
"analytics": "Analytik",
|
||||||
"dashboard": "Dashboard",
|
"dashboard": "Dashboard",
|
||||||
|
"terminal": "Terminal",
|
||||||
"customer_cards": "Kundenkarten",
|
"customer_cards": "Kundenkarten",
|
||||||
"statistics": "Statistiken"
|
"statistics": "Statistiken"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"programs": "Programs",
|
"programs": "Programs",
|
||||||
"analytics": "Analytics",
|
"analytics": "Analytics",
|
||||||
"dashboard": "Dashboard",
|
"dashboard": "Dashboard",
|
||||||
|
"terminal": "Terminal",
|
||||||
"customer_cards": "Customer Cards",
|
"customer_cards": "Customer Cards",
|
||||||
"statistics": "Statistics"
|
"statistics": "Statistics"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"programs": "Programmes",
|
"programs": "Programmes",
|
||||||
"analytics": "Analytique",
|
"analytics": "Analytique",
|
||||||
"dashboard": "Tableau de bord",
|
"dashboard": "Tableau de bord",
|
||||||
|
"terminal": "Terminal",
|
||||||
"customer_cards": "Cartes clients",
|
"customer_cards": "Cartes clients",
|
||||||
"statistics": "Statistiques"
|
"statistics": "Statistiques"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"programs": "Programmer",
|
"programs": "Programmer",
|
||||||
"analytics": "Analytik",
|
"analytics": "Analytik",
|
||||||
"dashboard": "Dashboard",
|
"dashboard": "Dashboard",
|
||||||
|
"terminal": "Terminal",
|
||||||
"customer_cards": "Clientekaarten",
|
"customer_cards": "Clientekaarten",
|
||||||
"statistics": "Statistiken"
|
"statistics": "Statistiken"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user