From c7084994113846e96801601502261eec358045cd Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Wed, 3 Dec 2025 23:01:26 +0100 Subject: [PATCH] feat(admin): add Platform Administration section to sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorganized sidebar navigation: - Added "Platform Administration" section header below Dashboard - Grouped Companies, Vendors, Users, Customers, Marketplace under it - Added new Customers page (empty placeholder for future) - Changed Marketplace icon from shopping-bag to globe - Renamed "Marketplace Import" to "Marketplace" for brevity New files: - app/templates/admin/customers.html - Route: GET /admin/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/routes/admin_pages.py | 25 +++++++++++ app/templates/admin/customers.html | 51 +++++++++++++++++++++ app/templates/admin/partials/sidebar.html | 54 ++++++++++++++++++----- 3 files changed, 120 insertions(+), 10 deletions(-) create mode 100644 app/templates/admin/customers.html diff --git a/app/routes/admin_pages.py b/app/routes/admin_pages.py index 1e67cfb4..986d3d7d 100644 --- a/app/routes/admin_pages.py +++ b/app/routes/admin_pages.py @@ -23,6 +23,7 @@ Routes: - GET /vendor-themes → Vendor themes selection page (auth required) - GET /vendors/{vendor_code}/theme → Vendor theme editor (auth required) - GET /users → User management page (auth required) +- GET /customers → Customer management page (auth required) - GET /imports → Import history page (auth required) - GET /settings → Settings page (auth required) - GET /platform-homepage → Platform homepage manager (auth required) @@ -449,6 +450,30 @@ async def admin_user_edit_page( ) +# ============================================================================ +# CUSTOMER MANAGEMENT ROUTES +# ============================================================================ + + +@router.get("/customers", response_class=HTMLResponse, include_in_schema=False) +async def admin_customers_page( + request: Request, + current_user: User = Depends(get_current_admin_from_cookie_or_header), + db: Session = Depends(get_db), +): + """ + Render customers management page. + Shows list of all platform customers. + """ + return templates.TemplateResponse( + "admin/customers.html", + { + "request": request, + "user": current_user, + }, + ) + + # ============================================================================ # IMPORT MANAGEMENT ROUTES # ============================================================================ diff --git a/app/templates/admin/customers.html b/app/templates/admin/customers.html new file mode 100644 index 00000000..6f27bcc8 --- /dev/null +++ b/app/templates/admin/customers.html @@ -0,0 +1,51 @@ +{# app/templates/admin/customers.html #} +{% extends "admin/base.html" %} + +{% block title %}Customers{% endblock %} + +{% block alpine_data %}adminCustomers(){% endblock %} + +{% block content %} + +
+
+

+ Customers +

+

+ Manage platform customers +

+
+
+ + +
+
+ +

+ Customers Management +

+

+ Customer management features coming soon. +

+

+ This section will allow you to view and manage customers across all vendors. +

+
+
+{% endblock %} + +{% block extra_scripts %} + +{% endblock %} diff --git a/app/templates/admin/partials/sidebar.html b/app/templates/admin/partials/sidebar.html index 07073404..8186a2cc 100644 --- a/app/templates/admin/partials/sidebar.html +++ b/app/templates/admin/partials/sidebar.html @@ -18,8 +18,14 @@ - - - -