feat(admin): separate platform CRUD from CMS, add entity selector macro
Some checks failed
Some checks failed
- Move platforms menu from CMS to Platform Admin section with create/edit - Add platform create page, API endpoint, and service method - Remove CMS-specific content from platform list and detail pages - Create shared entity_selector + entity_selected_badge Jinja macros - Create entity-selector.js generalizing store-selector.js for any entity - Add Tom Select merchant filter to stores page with localStorage persistence - Migrate store-products page to use shared macros (remove 53 lines of duped CSS) - Fix broken icons: puzzle→puzzle-piece, building-storefront→store, language→translate, server→cube Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -491,6 +491,24 @@ async def admin_platforms_list(
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/platforms/create", response_class=HTMLResponse, include_in_schema=False
|
||||
)
|
||||
async def admin_platform_create(
|
||||
request: Request,
|
||||
current_user: User = Depends(require_menu_access("platforms", FrontendType.ADMIN)),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""
|
||||
Render platform creation form.
|
||||
Allows creating a new platform with basic settings.
|
||||
"""
|
||||
return templates.TemplateResponse(
|
||||
"tenancy/admin/platform-create.html",
|
||||
get_admin_context(request, db, current_user),
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/platforms/{platform_code}", response_class=HTMLResponse, include_in_schema=False
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user