Fix plugin API signatures and dashboard JS for InvenTree compatibility

- Add context parameter to get_ui_panels and get_ui_dashboard_items
- Fix renderDashboardItem signature to (target, data) per InvenTree API
- Export plugin class from __init__.py for discovery
This commit is contained in:
timmyhadwen
2026-02-24 10:35:22 +10:00
committed by Tim Hadwen
parent 1046bc2380
commit b7fc73606e
3 changed files with 13 additions and 4 deletions

View File

@@ -38,10 +38,10 @@ class PrintDemandPlugin(SettingsMixin, UrlsMixin, UserInterfaceMixin, InvenTreeP
re_path(r'^api/demand/', self.api_demand, name='api-demand'),
]
def get_ui_panels(self, request, **kwargs):
def get_ui_panels(self, request, context, **kwargs):
return []
def get_ui_dashboard_items(self, request, **kwargs):
def get_ui_dashboard_items(self, request, context, **kwargs):
return [
{
'key': 'print-demand',