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:
@@ -50,6 +50,55 @@ async def merchant_stores_page(
|
||||
)
|
||||
|
||||
|
||||
@router.get("/stores/{store_id}", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def merchant_store_detail_page(
|
||||
request: Request,
|
||||
store_id: int,
|
||||
current_user: UserContext = Depends(get_current_merchant_from_cookie_or_header),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""
|
||||
Render the merchant store detail/edit page.
|
||||
|
||||
Shows store details and allows editing merchant-allowed fields.
|
||||
"""
|
||||
context = get_context_for_frontend(
|
||||
FrontendType.MERCHANT,
|
||||
request,
|
||||
db,
|
||||
user=current_user,
|
||||
)
|
||||
context["store_id"] = store_id
|
||||
return templates.TemplateResponse(
|
||||
"tenancy/merchant/store-detail.html",
|
||||
context,
|
||||
)
|
||||
|
||||
|
||||
@router.get("/team", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def merchant_team_page(
|
||||
request: Request,
|
||||
current_user: UserContext = Depends(get_current_merchant_from_cookie_or_header),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""
|
||||
Render the merchant team management page.
|
||||
|
||||
Shows team members across all stores owned by the merchant,
|
||||
with ability to invite and manage per-store teams.
|
||||
"""
|
||||
context = get_context_for_frontend(
|
||||
FrontendType.MERCHANT,
|
||||
request,
|
||||
db,
|
||||
user=current_user,
|
||||
)
|
||||
return templates.TemplateResponse(
|
||||
"tenancy/merchant/team.html",
|
||||
context,
|
||||
)
|
||||
|
||||
|
||||
@router.get("/profile", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def merchant_profile_page(
|
||||
request: Request,
|
||||
|
||||
Reference in New Issue
Block a user