From 0e27c9029a053293cab069df91795c9b4dbd23ad Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Thu, 25 Dec 2025 00:18:05 +0100 Subject: [PATCH] feat: add /admin/letzshop/products/{id} route for product details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add new route that mirrors the letzshop orders pattern - Update product links in letzshop-products-tab.html to use new route 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/routes/admin_pages.py | 25 +++++++++++++++++++ .../admin/partials/letzshop-products-tab.html | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/app/routes/admin_pages.py b/app/routes/admin_pages.py index bd9db3f9..187a4985 100644 --- a/app/routes/admin_pages.py +++ b/app/routes/admin_pages.py @@ -710,6 +710,31 @@ async def admin_letzshop_order_detail_page( ) +@router.get( + "/letzshop/products/{product_id}", + response_class=HTMLResponse, + include_in_schema=False, +) +async def admin_letzshop_product_detail_page( + request: Request, + product_id: int = Path(..., description="Marketplace Product ID"), + current_user: User = Depends(get_current_admin_from_cookie_or_header), + db: Session = Depends(get_db), +): + """ + Render Letzshop product detail page. + Shows full product information from the marketplace. + """ + return templates.TemplateResponse( + "admin/marketplace-product-detail.html", + { + "request": request, + "user": current_user, + "product_id": product_id, + }, + ) + + # ============================================================================ # PRODUCT CATALOG ROUTES # ============================================================================ diff --git a/app/templates/admin/partials/letzshop-products-tab.html b/app/templates/admin/partials/letzshop-products-tab.html index ba72e9ef..09aee346 100644 --- a/app/templates/admin/partials/letzshop-products-tab.html +++ b/app/templates/admin/partials/letzshop-products-tab.html @@ -181,7 +181,7 @@
- +

@@ -229,7 +229,7 @@