feat: add Letzshop frontend for admin and vendor portals

Add complete frontend UI for Letzshop marketplace integration:

Admin portal (/admin/letzshop):
- Vendor overview with Letzshop status cards
- Vendor table with configuration state and sync info
- Configuration modal for API credentials
- Connection testing and manual sync triggers
- Orders modal for viewing vendor orders

Vendor portal (/vendor/{code}/letzshop):
- Orders tab with import, confirm, reject actions
- Settings tab for API credentials management
- Tracking modal for shipment updates
- Order details modal with line items
- Stats display for order status counts

Also includes:
- Routes for both admin and vendor Letzshop pages
- Sidebar navigation updates for both portals
- Alpine.js data functions for reactive UI state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-13 12:40:29 +01:00
parent 448f01f82b
commit 5bcbd14391
8 changed files with 1800 additions and 0 deletions

View File

@@ -538,6 +538,25 @@ async def admin_marketplace_page(
)
@router.get("/letzshop", response_class=HTMLResponse, include_in_schema=False)
async def admin_letzshop_page(
request: Request,
current_user: User = Depends(get_current_admin_from_cookie_or_header),
db: Session = Depends(get_db),
):
"""
Render Letzshop management page.
Admin overview of Letzshop integration for all vendors.
"""
return templates.TemplateResponse(
"admin/letzshop.html",
{
"request": request,
"user": current_user,
},
)
# ============================================================================
# PRODUCT CATALOG ROUTES
# ============================================================================

View File

@@ -273,6 +273,33 @@ async def vendor_marketplace_page(
)
# ============================================================================
# LETZSHOP INTEGRATION
# ============================================================================
@router.get(
"/{vendor_code}/letzshop", response_class=HTMLResponse, include_in_schema=False
)
async def vendor_letzshop_page(
request: Request,
vendor_code: str = Path(..., description="Vendor code"),
current_user: User = Depends(get_current_vendor_from_cookie_or_header),
):
"""
Render Letzshop integration page.
JavaScript loads orders, credentials status, and handles fulfillment operations.
"""
return templates.TemplateResponse(
"vendor/letzshop.html",
{
"request": request,
"user": current_user,
"vendor_code": vendor_code,
},
)
# ============================================================================
# TEAM MANAGEMENT
# ============================================================================