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:
@@ -90,6 +90,7 @@ class MerchantResponse(BaseModel):
|
||||
|
||||
# Owner information
|
||||
owner_user_id: int
|
||||
owner_email: str | None = Field(None, description="Owner's email address")
|
||||
|
||||
# Contact Information
|
||||
contact_email: str
|
||||
@@ -108,6 +109,9 @@ class MerchantResponse(BaseModel):
|
||||
created_at: str
|
||||
updated_at: str
|
||||
|
||||
# Store statistics
|
||||
store_count: int = Field(0, description="Number of stores under this merchant")
|
||||
|
||||
|
||||
class MerchantDetailResponse(MerchantResponse):
|
||||
"""
|
||||
@@ -117,11 +121,9 @@ class MerchantDetailResponse(MerchantResponse):
|
||||
"""
|
||||
|
||||
# Owner details (from related User)
|
||||
owner_email: str | None = Field(None, description="Owner's email address")
|
||||
owner_username: str | None = Field(None, description="Owner's username")
|
||||
|
||||
# Store statistics
|
||||
store_count: int = Field(0, description="Number of stores under this merchant")
|
||||
active_store_count: int = Field(
|
||||
0, description="Number of active stores under this merchant"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user