chore: sync GovOPlaN module split state

This commit is contained in:
2026-07-10 12:51:22 +02:00
parent 41528f1947
commit 63ff9a3366
20 changed files with 1151 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
import { createElement, lazy } from "react";
import type { DashboardWidgetsUiCapability, PlatformWebModule } from "@govoplan/core-webui";
import OpsHealthWidget from "./features/ops/OpsHealthWidget";
import { generatedTranslations } from "./i18n/generatedTranslations";
const OpsPage = lazy(() => import("./features/ops/OpsPage"));
const opsReadScopes = ["ops:operations:read", "system:settings:read", "admin:settings:read"];
const translations = {
en: generatedTranslations.en,
de: generatedTranslations.de
};
const dashboardWidgets: DashboardWidgetsUiCapability = {
widgets: [
{
id: "ops.health",
title: "Operations health",
description: "Readiness, worker mode, and current warning count.",
moduleId: "ops",
category: "Operations",
order: 100,
defaultSize: "wide",
anyOf: opsReadScopes,
refreshIntervalMs: 30_000,
render: ({ settings, refreshKey }) => createElement(OpsHealthWidget, { settings, refreshKey })
}
]
};
export const opsModule: PlatformWebModule = {
id: "ops",
label: "i18n:govoplan-ops.ops.907a54c2",
version: "1.0.0",
dependencies: ["access"],
optionalDependencies: ["audit", "docs", "notifications"],
translations,
navItems: [{ to: "/ops", label: "i18n:govoplan-ops.ops.907a54c2", iconName: "activity", anyOf: opsReadScopes, order: 890 }],
routes: [
{ path: "/ops", anyOf: opsReadScopes, order: 890, render: ({ settings }) => createElement(OpsPage, { settings }) }],
uiCapabilities: {
"dashboard.widgets": dashboardWidgets
}
};
export default opsModule;