Sync GovOPlaN module state
This commit is contained in:
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user