refactor: migrate templates and static files to self-contained modules
Templates Migration: - Migrate admin templates to modules (tenancy, billing, monitoring, marketplace, etc.) - Migrate vendor templates to modules (tenancy, billing, orders, messaging, etc.) - Migrate storefront templates to modules (catalog, customers, orders, cart, checkout, cms) - Migrate public templates to modules (billing, marketplace, cms) - Keep shared templates in app/templates/ (base.html, errors/, partials/, macros/) - Migrate letzshop partials to marketplace module Static Files Migration: - Migrate admin JS to modules: tenancy (23 files), core (5 files), monitoring (1 file) - Migrate vendor JS to modules: tenancy (4 files), core (2 files) - Migrate shared JS: vendor-selector.js to core, media-picker.js to cms - Migrate storefront JS: storefront-layout.js to core - Keep framework JS in static/ (api-client, utils, money, icons, log-config, lib/) - Update all template references to use module_static paths Naming Consistency: - Rename static/platform/ to static/public/ - Rename app/templates/platform/ to app/templates/public/ - Update all extends and static references Documentation: - Update module-system.md with shared templates documentation - Update frontend-structure.md with new module JS organization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,11 +3,64 @@
|
||||
Tenancy module services.
|
||||
|
||||
Business logic for platform, company, vendor, and admin user management.
|
||||
Currently services remain in app/services/ - this package is a placeholder
|
||||
for future migration.
|
||||
|
||||
Services:
|
||||
- vendor_service: Vendor operations and product catalog
|
||||
- admin_service: Admin user and vendor management
|
||||
- admin_platform_service: Admin-platform assignments
|
||||
- vendor_team_service: Team member management
|
||||
- vendor_domain_service: Custom domain management
|
||||
- company_service: Company CRUD operations
|
||||
- platform_service: Platform operations
|
||||
- team_service: Team operations
|
||||
"""
|
||||
|
||||
# Services will be migrated here from app/services/
|
||||
# For now, import from legacy location if needed:
|
||||
# from app.services.vendor_service import vendor_service
|
||||
# from app.services.company_service import company_service
|
||||
from app.modules.tenancy.services.admin_platform_service import (
|
||||
AdminPlatformService,
|
||||
admin_platform_service,
|
||||
)
|
||||
from app.modules.tenancy.services.admin_service import AdminService, admin_service
|
||||
from app.modules.tenancy.services.company_service import CompanyService, company_service
|
||||
from app.modules.tenancy.services.platform_service import (
|
||||
PlatformService,
|
||||
PlatformStats,
|
||||
platform_service,
|
||||
)
|
||||
from app.modules.tenancy.services.team_service import TeamService, team_service
|
||||
from app.modules.tenancy.services.vendor_domain_service import (
|
||||
VendorDomainService,
|
||||
vendor_domain_service,
|
||||
)
|
||||
from app.modules.tenancy.services.vendor_service import VendorService, vendor_service
|
||||
from app.modules.tenancy.services.vendor_team_service import (
|
||||
VendorTeamService,
|
||||
vendor_team_service,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# Vendor
|
||||
"VendorService",
|
||||
"vendor_service",
|
||||
# Admin
|
||||
"AdminService",
|
||||
"admin_service",
|
||||
# Admin Platform
|
||||
"AdminPlatformService",
|
||||
"admin_platform_service",
|
||||
# Vendor Team
|
||||
"VendorTeamService",
|
||||
"vendor_team_service",
|
||||
# Vendor Domain
|
||||
"VendorDomainService",
|
||||
"vendor_domain_service",
|
||||
# Company
|
||||
"CompanyService",
|
||||
"company_service",
|
||||
# Platform
|
||||
"PlatformService",
|
||||
"PlatformStats",
|
||||
"platform_service",
|
||||
# Team
|
||||
"TeamService",
|
||||
"team_service",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user