feat: add unified admin Marketplace Letzshop page
- Add new Marketplace section in admin sidebar with Letzshop sub-item
- Remove old Import and Letzshop Orders items from Product Catalog
- Create unified Letzshop management page with 3 tabs:
- Products tab: Import/Export functionality
- Orders tab: Order management with confirm/reject/tracking
- Settings tab: API credentials and CSV URLs
- Add unified jobs table showing imports, exports, and order syncs
- Implement vendor autocomplete using Tom Select library (CDN + fallback)
- Add /vendors/{vendor_id}/jobs API endpoint for unified job listing
- Move database queries to service layer (LetzshopOrderService)
- Add LetzshopJobItem and LetzshopJobsListResponse schemas
- Include Tom Select CSS/JS assets as local fallback
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -536,18 +536,26 @@ async def admin_marketplace_page(
|
||||
)
|
||||
|
||||
|
||||
@router.get("/letzshop", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def admin_letzshop_page(
|
||||
# ============================================================================
|
||||
# MARKETPLACE INTEGRATION ROUTES
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@router.get(
|
||||
"/marketplace/letzshop", response_class=HTMLResponse, include_in_schema=False
|
||||
)
|
||||
async def admin_marketplace_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.
|
||||
Render unified Letzshop management page.
|
||||
Combines products (import/export), orders, and settings management.
|
||||
Admin can select a vendor and manage their Letzshop integration.
|
||||
"""
|
||||
return templates.TemplateResponse(
|
||||
"admin/letzshop.html",
|
||||
"admin/marketplace-letzshop.html",
|
||||
{
|
||||
"request": request,
|
||||
"user": current_user,
|
||||
|
||||
Reference in New Issue
Block a user