feat(loyalty): align program view, edit, and analytics pages across all frontends
Some checks failed
Some checks failed
Standardize naming (Program for view/edit, Analytics for stats), create shared read-only program-view partial, fix admin edit field population bug (14 missing fields), add store Program menu item, and rename merchant Overview→Program, Settings→Analytics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -131,11 +131,12 @@ loyalty_module = ModuleDefinition(
|
||||
FrontendType.STORE: [
|
||||
"terminal", # Loyalty terminal
|
||||
"cards", # Customer cards
|
||||
"stats", # Store stats
|
||||
"loyalty-program", # Program config
|
||||
"loyalty-analytics", # Store analytics
|
||||
],
|
||||
FrontendType.MERCHANT: [
|
||||
"loyalty-overview", # Merchant loyalty overview
|
||||
"loyalty-settings", # Merchant loyalty settings
|
||||
"loyalty-program", # Merchant loyalty program
|
||||
"loyalty-analytics", # Merchant loyalty analytics
|
||||
],
|
||||
},
|
||||
# New module-driven menu definitions
|
||||
@@ -188,10 +189,18 @@ loyalty_module = ModuleDefinition(
|
||||
requires_permission="loyalty.view_programs",
|
||||
),
|
||||
MenuItemDefinition(
|
||||
id="stats",
|
||||
label_key="loyalty.menu.statistics",
|
||||
id="loyalty-program",
|
||||
label_key="loyalty.menu.program",
|
||||
icon="cog",
|
||||
route="/store/{store_code}/loyalty/program",
|
||||
order=25,
|
||||
requires_permission="loyalty.view_programs",
|
||||
),
|
||||
MenuItemDefinition(
|
||||
id="loyalty-analytics",
|
||||
label_key="loyalty.menu.analytics",
|
||||
icon="chart-bar",
|
||||
route="/store/{store_code}/loyalty/stats",
|
||||
route="/store/{store_code}/loyalty/analytics",
|
||||
order=30,
|
||||
requires_permission="loyalty.view_programs",
|
||||
),
|
||||
@@ -206,17 +215,17 @@ loyalty_module = ModuleDefinition(
|
||||
order=60,
|
||||
items=[
|
||||
MenuItemDefinition(
|
||||
id="loyalty-overview",
|
||||
label_key="loyalty.menu.overview",
|
||||
id="loyalty-program",
|
||||
label_key="loyalty.menu.program",
|
||||
icon="gift",
|
||||
route="/merchants/loyalty/overview",
|
||||
route="/merchants/loyalty/program",
|
||||
order=10,
|
||||
),
|
||||
MenuItemDefinition(
|
||||
id="loyalty-settings",
|
||||
label_key="loyalty.menu.settings",
|
||||
icon="cog",
|
||||
route="/merchants/loyalty/settings",
|
||||
id="loyalty-analytics",
|
||||
label_key="loyalty.menu.analytics",
|
||||
icon="chart-bar",
|
||||
route="/merchants/loyalty/analytics",
|
||||
order=20,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user