feat: add platform detail/edit admin UI and service enhancements
- Add platform detail and edit admin pages with templates and JS - Add ContentPageService methods: list_all_platform_pages, list_all_vendor_defaults - Deprecate /admin/platform-homepage route (redirects to /admin/platforms) - Add migration to fix content_page nullable columns - Refine platform and vendor context middleware - Add platform context middleware unit tests - Update platforms.js with improved functionality - Add section-based homepage plan documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,12 @@ const platformsLog = window.LogConfig.createLogger('PLATFORMS');
|
||||
|
||||
function platformsManager() {
|
||||
return {
|
||||
// Inherit base layout functionality from init-alpine.js
|
||||
...data(),
|
||||
|
||||
// Page identification
|
||||
currentPage: "platforms",
|
||||
|
||||
// State
|
||||
platforms: [],
|
||||
loading: true,
|
||||
@@ -15,12 +21,22 @@ function platformsManager() {
|
||||
|
||||
// Lifecycle
|
||||
async init() {
|
||||
platformsLog.info('=== PLATFORMS PAGE INITIALIZING ===');
|
||||
|
||||
// Duplicate initialization guard
|
||||
if (window._adminPlatformsInitialized) return;
|
||||
if (window._adminPlatformsInitialized) {
|
||||
platformsLog.warn('Platforms page already initialized, skipping...');
|
||||
return;
|
||||
}
|
||||
window._adminPlatformsInitialized = true;
|
||||
|
||||
this.currentPage = "platforms";
|
||||
await this.loadPlatforms();
|
||||
try {
|
||||
await this.loadPlatforms();
|
||||
platformsLog.info('=== PLATFORMS PAGE INITIALIZATION COMPLETE ===');
|
||||
} catch (error) {
|
||||
window.LogConfig.logError(error, 'Platforms Init');
|
||||
this.error = 'Failed to initialize page';
|
||||
}
|
||||
},
|
||||
|
||||
// API Methods
|
||||
|
||||
Reference in New Issue
Block a user