feat: multi-module improvements across merchant, store, i18n, and customer systems
All checks were successful
All checks were successful
- Fix platform-grouped merchant sidebar menu with core items at root level - Add merchant store management (detail page, create store, team page) - Fix store settings 500 error by removing dead stripe/API tab - Move onboarding translations to module-owned locale files - Fix onboarding banner i18n with server-side rendering + context inheritance - Refactor login language selectors to use languageSelector() function (LANG-002) - Move HTTPException handling to global exception handler in merchant routes (API-003) - Add language selector to all login pages and portal headers - Fix customer module: drop order stats from customer model, add to orders module - Fix admin menu config visibility for super admin platform context - Fix storefront auth and layout issues - Add missing i18n translations for onboarding steps (en/fr/de/lb) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,6 @@ avoiding direct database model imports in the API layer.
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
@@ -45,11 +44,6 @@ class CustomerContext(BaseModel):
|
||||
marketing_consent: bool = False
|
||||
preferred_language: str | None = None
|
||||
|
||||
# Stats (for order placement)
|
||||
total_orders: int = 0
|
||||
total_spent: Decimal = Decimal("0.00")
|
||||
last_order_date: datetime | None = None
|
||||
|
||||
# Status
|
||||
is_active: bool = True
|
||||
|
||||
@@ -89,9 +83,6 @@ class CustomerContext(BaseModel):
|
||||
phone=customer.phone,
|
||||
marketing_consent=customer.marketing_consent,
|
||||
preferred_language=customer.preferred_language,
|
||||
total_orders=customer.total_orders or 0,
|
||||
total_spent=customer.total_spent or Decimal("0.00"),
|
||||
last_order_date=customer.last_order_date,
|
||||
is_active=customer.is_active,
|
||||
created_at=customer.created_at,
|
||||
updated_at=customer.updated_at,
|
||||
|
||||
Reference in New Issue
Block a user