42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { createElement, lazy } from "react";
|
|
import type { PlatformWebModule } from "@govoplan/core-webui";
|
|
import { generatedTranslations } from "./i18n/generatedTranslations";
|
|
import "./styles/forms.css";
|
|
|
|
|
|
const FormsPage = lazy(() => import("./features/forms/FormsPage"));
|
|
|
|
export const formsModule: PlatformWebModule = {
|
|
id: "forms",
|
|
label: "i18n:govoplan-forms.form_definitions",
|
|
version: "0.1.20",
|
|
dependencies: ["access"],
|
|
optionalDependencies: ["forms_runtime", "portal", "workflow_engine", "cases", "policy", "docs"],
|
|
translations: generatedTranslations,
|
|
routes: [
|
|
{
|
|
path: "/forms",
|
|
anyOf: ["forms:definition:read"],
|
|
order: 36,
|
|
surfaceId: "forms.catalogue",
|
|
render: (context) => createElement(FormsPage, context)
|
|
}
|
|
],
|
|
navItems: [
|
|
{
|
|
to: "/forms",
|
|
label: "i18n:govoplan-forms.form_definitions",
|
|
iconName: "list-tree",
|
|
anyOf: ["forms:definition:read"],
|
|
order: 36,
|
|
surfaceId: "forms.navigation"
|
|
}
|
|
],
|
|
viewSurfaces: [
|
|
{ id: "forms.navigation", moduleId: "forms", kind: "navigation", label: "Form definitions navigation", order: 10 },
|
|
{ id: "forms.catalogue", moduleId: "forms", kind: "route", label: "Form definition catalogue", order: 20 }
|
|
]
|
|
};
|
|
|
|
export default formsModule;
|