feat: add complete company management UI

- Create companies list page with stats (total, verified, active, vendor count)
- Add company creation form with owner account generation
- Implement companies.js with full CRUD operations (list, create, edit, delete)
- Add Companies menu item to admin sidebar (desktop + mobile)
- Create company admin page routes (/admin/companies, /admin/companies/create)
- Register companies API router in admin __init__.py

Features:
- List all companies with pagination
- Create company with automatic owner user creation
- Display temporary password for new owner accounts
- Edit company information
- Delete company (only if no vendors)
- Toggle active/verified status
- Show vendor count per company

UI Components:
- Stats cards (total companies, verified, active, total vendors)
- Company table with status badges
- Create form with validation
- Success/error messaging
- Responsive design with dark mode support
This commit is contained in:
2025-12-01 21:50:20 +01:00
parent 4ca738dc7f
commit 801510ecc6
6 changed files with 1045 additions and 13 deletions

View File

@@ -28,8 +28,10 @@ from . import (
audit,
auth,
code_quality,
companies,
content_pages,
dashboard,
logs,
marketplace,
monitoring,
notifications,
@@ -53,9 +55,12 @@ router.include_router(auth.router, tags=["admin-auth"])
# ============================================================================
# Vendor Management
# Company & Vendor Management
# ============================================================================
# Include company management endpoints
router.include_router(companies.router, tags=["admin-companies"])
# Include vendor management endpoints
router.include_router(vendors.router, tags=["admin-vendors"])
@@ -111,6 +116,9 @@ router.include_router(settings.router, tags=["admin-settings"])
# Include notifications and alerts endpoints
router.include_router(notifications.router, tags=["admin-notifications"])
# Include log management endpoints
router.include_router(logs.router, tags=["admin-logs"])
# ============================================================================
# Code Quality & Architecture