From cbe1ab09d1dd6adc71ed1e174905f2087f8344bf Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Sun, 19 Oct 2025 16:16:13 +0200 Subject: [PATCH] admin and vendor backends features --- docs/project-roadmap/slice1_doc.md | 14 +- static/admin/dashboard.html | 905 ++++++++------------ static/admin/login.html | 257 ++---- static/admin/vendor-edit.html | 498 +++++++++++ static/admin/vendors.html | 682 ++++++++------- static/css/admin/admin.css | 400 ++++++++- static/css/shared/base.css | 4 + static/css/shared/components.css | 728 ++++++++++++++++ static/css/shared/modals.css | 428 +++++++++ static/css/shared/responsive-utilities.css | 370 ++++++++ static/js/admin/admin-layout-templates.js | 67 ++ static/js/admin/dashboard.js | 204 ++++- static/js/admin/login.js | 87 ++ static/js/admin/vendor-edit.js | 338 ++++++++ static/js/admin/vendors.js | 242 +++++- static/js/shared/alpine-components.js | 581 +++++++++++++ static/js/shared/api-client.js | 37 + static/js/shared/modal-system.js | 209 +++++ static/js/shared/modal-templates.js | 114 +++ static/js/shop/shop-layout-templates.js | 103 +++ static/js/vendor/dashboard.js | 114 ++- static/js/vendor/login.js | 170 ++++ static/js/vendor/vendor-layout-templates.js | 67 ++ static/vendor/dashboard.html | 336 ++++---- static/vendor/login.html | 372 +++----- 25 files changed, 5787 insertions(+), 1540 deletions(-) create mode 100644 static/admin/vendor-edit.html create mode 100644 static/css/shared/components.css create mode 100644 static/css/shared/modals.css create mode 100644 static/css/shared/responsive-utilities.css create mode 100644 static/js/admin/admin-layout-templates.js create mode 100644 static/js/admin/login.js create mode 100644 static/js/admin/vendor-edit.js create mode 100644 static/js/shared/alpine-components.js create mode 100644 static/js/shared/modal-system.js create mode 100644 static/js/shared/modal-templates.js create mode 100644 static/js/shop/shop-layout-templates.js create mode 100644 static/js/vendor/login.js create mode 100644 static/js/vendor/vendor-layout-templates.js diff --git a/docs/project-roadmap/slice1_doc.md b/docs/project-roadmap/slice1_doc.md index b50dc35a..0d5ba0b0 100644 --- a/docs/project-roadmap/slice1_doc.md +++ b/docs/project-roadmap/slice1_doc.md @@ -11,19 +11,19 @@ Establish the multi-tenant foundation with complete vendor isolation and admin c ### User Stories - ✅ As a Super Admin, I can create vendors through the admin interface -- ✅ As a Super Admin, I can manage vendor accounts (verify, activate, deactivate) -- ⏳ As a Vendor Owner, I can log into my vendor-specific admin interface +- [ ] As a Super Admin, I can manage vendor accounts (verify, activate, deactivate) +- ✅ As a Vendor Owner, I can log into my vendor-specific admin interface - ✅ The system correctly isolates vendor contexts (subdomain + path-based) ### Success Criteria -- [ ] Admin can log into admin interface -- [ ] Admin can create new vendors with auto-generated owner accounts -- [ ] System generates secure temporary passwords -- [ ] Vendor owner can log into vendor-specific interface +- ✅ Admin can log into admin interface +- ✅ Admin can create new vendors with auto-generated owner accounts +- ✅ System generates secure temporary passwords +- ✅ Vendor owner can log into vendor-specific interface - [ ] Vendor context detection works in dev (path) and prod (subdomain) modes - [ ] Database properly isolates vendor data - [ ] All API endpoints protected with JWT authentication -- [ ] Frontend integrates seamlessly with backend +- ✅ Frontend integrates seamlessly with backend ## 📋 Backend Implementation diff --git a/static/admin/dashboard.html b/static/admin/dashboard.html index 88694acd..58ce4882 100644 --- a/static/admin/dashboard.html +++ b/static/admin/dashboard.html @@ -4,601 +4,426 @@ Admin Dashboard - Multi-Tenant Ecommerce Platform + + + + + + + + + - - -
-
-

🔐 Admin Dashboard

-
-
- - -
-
+ - -
- - + +
- -
- -
- -
-
-
-
-
Total Vendors
-
-
🏪
-
-
-
-
- - active -
+ +
+ + +
+ +
+ +
+
+
+
Total Vendors
+
🏪
- -
-
-
-
Total Users
-
-
👥
-
-
-
-
- - active -
-
- -
-
-
-
Verified Vendors
-
-
-
-
-
-
- -% verification rate -
-
- -
-
-
-
Import Jobs
-
-
📦
-
-
-
-
- - completed -
+
+
+ active
- -
-
-

Recent Vendors

- +
+
+
Total Users
+
👥
-
-
Loading recent vendors...
+
+
+ active
- -
-
-

Recent Import Jobs

- +
+
+
Verified Vendors
+
-
-
Loading recent imports...
+
+
+ % verification rate +
+
+ +
+
+
Import Jobs
+
📦
+
+
+
+ completed
- -
-
- + + + + + + + + + \ No newline at end of file diff --git a/static/admin/login.html b/static/admin/login.html index fce386f8..a299dda6 100644 --- a/static/admin/login.html +++ b/static/admin/login.html @@ -6,195 +6,90 @@ Admin Login - Multi-Tenant Ecommerce Platform + -