feat(M4): System-Rueckbau — Dashboard-Inhalte als MiniApps, Core = reiner Host (#362)
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
- system_miniapps.py: audit_activity (audit:read, settings max_items) + system_metrics (settings:read) als Core-Apps in Registry - base.py-Fix: native Manifest-MiniApps reichen component durch (M1-Luecke) - contacts-Manifest: contacts_stats (ContactsStatsWidget, contacts:read, show_companies/show_persons) - Seed-Fix: nur renderbare Apps (component) landen im Dashboard-Layout - Frontend: ContactsStatsWidget, AuditActivityWidget, SystemMetricsWidget; MiniAppHost-Registry +3 - Dashboard.tsx = reiner Host (26 Z.); Page-Tests auf Pure-Host umgeschrieben - Tests: M4 7/7 (TDD rot->gruen), Backend-Regression 46/46, Vitest 22/22, tsc clean, build OK
This commit is contained in:
@@ -116,6 +116,7 @@ class BasePlugin(ABC):
|
||||
col_span=getattr(m, "col_span", 1),
|
||||
row_span=getattr(m, "row_span", 1),
|
||||
hosts=getattr(m, "hosts", None),
|
||||
component=getattr(m, "component", ""),
|
||||
order=getattr(m, "order", 100),
|
||||
)
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ from app.plugins.manifest import (
|
||||
FrontendDashboardWidget,
|
||||
FrontendMenuItem,
|
||||
FrontendPageRoute,
|
||||
MiniAppContribution,
|
||||
PluginManifest,
|
||||
PluginRouteDef,
|
||||
)
|
||||
@@ -60,6 +61,26 @@ class ContactsPlugin(BasePlugin):
|
||||
],
|
||||
events=[],
|
||||
migrations=[],
|
||||
miniapps=[
|
||||
MiniAppContribution(
|
||||
app_id="contacts_stats",
|
||||
name="Kontakt-Zähler",
|
||||
icon="Building2",
|
||||
description="Firmen- und Kontakt-Zähler (persönliche StatCards).",
|
||||
permission="contacts:read",
|
||||
settings_schema={
|
||||
"fields": [
|
||||
{"name": "show_companies", "label": "Firmen anzeigen", "type": "boolean", "default": True},
|
||||
{"name": "show_persons", "label": "Personen anzeigen", "type": "boolean", "default": True},
|
||||
]
|
||||
},
|
||||
col_span=2,
|
||||
row_span=1,
|
||||
hosts=["chat", "dashboard", "window"],
|
||||
component="@/components/dashboard/ContactsStatsWidget",
|
||||
order=5,
|
||||
),
|
||||
],
|
||||
dashboard_widgets=[
|
||||
FrontendDashboardWidget(
|
||||
id="recent_contacts",
|
||||
|
||||
Reference in New Issue
Block a user