feat: loyalty feature provider, admin data fixes, storefront mobile menu
- Add LoyaltyFeatureProvider with 11 BINARY/MERCHANT features for billing feature gating, wired into loyalty module definition - Fix subscription-tiers admin page showing 0 features by populating feature_codes from tier relationship in all admin tier endpoints - Fix merchants admin page showing 0 stores and N/A owner by adding store_count and owner_email to MerchantResponse and eager-loading owner - Add "no tiers" warning with link in subscription creation modal when platform has no configured tiers - Add missing mobile menu panel to storefront base template so hamburger toggle actually shows navigation links Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,13 @@ def _get_storefront_router():
|
||||
return storefront_router
|
||||
|
||||
|
||||
def _get_feature_provider():
|
||||
"""Lazy import of feature provider to avoid circular imports."""
|
||||
from app.modules.loyalty.services.loyalty_features import loyalty_feature_provider
|
||||
|
||||
return loyalty_feature_provider
|
||||
|
||||
|
||||
# Loyalty module definition
|
||||
loyalty_module = ModuleDefinition(
|
||||
code="loyalty",
|
||||
@@ -213,6 +220,8 @@ loyalty_module = ModuleDefinition(
|
||||
options={"queue": "scheduled"},
|
||||
),
|
||||
],
|
||||
# Feature provider for billing feature gating
|
||||
feature_provider=_get_feature_provider,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user