refactor: remove deprecated menu_registry.py in favor of module-driven menus
- Delete app/config/menu_registry.py (centralized menu definitions) - Update app/config/__init__.py to remove menu_registry exports - Migrate menu_service.py to use menu_discovery_service exclusively - Add helper methods to menu_discovery_service.py: - get_all_menu_item_ids() - get all item IDs for a frontend type - get_menu_item() - get specific menu item by ID - is_super_admin_only_item() - check if item is super-admin only - get_menu_item_module() - get module code for a menu item Menu items are now defined in each module's definition.py file and aggregated by MenuDiscoveryService at runtime, enabling true module-driven architecture. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,8 @@
|
||||
# app/config/__init__.py
|
||||
"""Configuration modules for the application."""
|
||||
|
||||
from .menu_registry import (
|
||||
ADMIN_MENU_REGISTRY,
|
||||
VENDOR_MENU_REGISTRY,
|
||||
AdminMenuItem,
|
||||
VendorMenuItem,
|
||||
get_all_menu_item_ids,
|
||||
)
|
||||
# Note: menu_registry.py has been deprecated in favor of module-driven menus.
|
||||
# Menu items are now defined in each module's definition.py file and aggregated
|
||||
# by MenuDiscoveryService (app/modules/core/services/menu_discovery_service.py).
|
||||
|
||||
__all__ = [
|
||||
"ADMIN_MENU_REGISTRY",
|
||||
"VENDOR_MENU_REGISTRY",
|
||||
"AdminMenuItem",
|
||||
"VendorMenuItem",
|
||||
"get_all_menu_item_ids",
|
||||
]
|
||||
__all__ = []
|
||||
|
||||
Reference in New Issue
Block a user