feat: implement dynamic sidebar with server-side menu translation
- Add server-side translation for menu labels using user's preferred_language - Replace hardcoded sidebar template with dynamic rendering from menu API - Remove hardcoded section/page mappings in favor of menu discovery - Fix locale file structure (move menu keys to top level to avoid double-nesting) - Sidebar now fully driven by /admin/menu-config/render/admin API endpoint Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,9 +52,6 @@ function adminPlatformMenuConfig(platformCode) {
|
||||
},
|
||||
|
||||
async init() {
|
||||
// Load i18n translations
|
||||
await I18n.loadModule('tenancy');
|
||||
|
||||
// Guard against duplicate initialization
|
||||
if (window._platformMenuConfigInitialized) {
|
||||
menuConfigLog.warn('Already initialized, skipping');
|
||||
@@ -66,6 +63,8 @@ function adminPlatformMenuConfig(platformCode) {
|
||||
menuConfigLog.info('Platform code:', this.platformCode);
|
||||
|
||||
try {
|
||||
// Load tenancy translations for confirmations
|
||||
await I18n.loadModule('tenancy');
|
||||
await this.loadPlatform();
|
||||
await this.loadPlatformMenuConfig();
|
||||
menuConfigLog.info('=== PLATFORM MENU CONFIG PAGE INITIALIZED ===');
|
||||
|
||||
Reference in New Issue
Block a user