Sync GovOPlaN module state

This commit is contained in:
2026-07-10 21:57:27 +02:00
parent 669647a986
commit 1f69e6b5a7
15 changed files with 485 additions and 722 deletions

View File

@@ -1,6 +1,7 @@
import { createElement, lazy } from "react";
import type { AdminSectionsUiCapability, PlatformWebModule } from "@govoplan/core-webui";
import type { AdminSectionsUiCapability, OrganizationFunctionPickerUiCapability, PlatformWebModule } from "@govoplan/core-webui";
import { generatedTranslations } from "./i18n/generatedTranslations";
import { OrganizationFunctionLabel, OrganizationFunctionPicker } from "./features/organizations/OrganizationFunctionPicker";
import "./styles/organizations.css";
const OrganizationsPage = lazy(() => import("./features/organizations/OrganizationsPage"));
@@ -31,12 +32,18 @@ const organizationAdminSections: AdminSectionsUiCapability = {
]
};
const organizationFunctionPicker: OrganizationFunctionPickerUiCapability = {
sourceModule: "organizations",
renderPicker: (context) => createElement(OrganizationFunctionPicker, context),
renderLabel: (context) => createElement(OrganizationFunctionLabel, context)
};
export const organizationsModule: PlatformWebModule = {
id: "organizations",
label: "i18n:govoplan-organizations.organizations.220edf64",
version: "1.0.0",
dependencies: ["access"],
optionalDependencies: ["identity", "admin"],
optionalDependencies: ["admin"],
translations,
navItems: [
{
@@ -56,7 +63,8 @@ export const organizationsModule: PlatformWebModule = {
}
],
uiCapabilities: {
"admin.sections": organizationAdminSections
"admin.sections": organizationAdminSections,
"organizations.functionPicker": organizationFunctionPicker
}
};