feat: loyalty feature provider, admin data fixes, storefront mobile menu
Some checks failed
CI / ruff (push) Successful in 9s
CI / pytest (push) Failing after 37m24s
CI / validate (push) Failing after 22s
CI / dependency-scanning (push) Successful in 31s
CI / docs (push) Has been skipped
CI / deploy (push) Has been skipped

- 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:
2026-02-18 18:59:24 +01:00
parent 2c710ad416
commit a8b29750a5
10 changed files with 350 additions and 13 deletions

View File

@@ -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"
)