feat: implement immutable form definitions
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type { PlatformWebModule } from "@govoplan/core-webui";
|
||||
import "./styles/forms.css";
|
||||
|
||||
|
||||
const FormsPage = lazy(() => import("./features/forms/FormsPage"));
|
||||
|
||||
export const formsModule: PlatformWebModule = {
|
||||
id: "forms",
|
||||
label: "Form definitions",
|
||||
version: "0.1.14",
|
||||
dependencies: ["access"],
|
||||
optionalDependencies: ["forms_runtime", "portal", "workflow_engine", "cases", "policy"],
|
||||
routes: [
|
||||
{
|
||||
path: "/forms",
|
||||
anyOf: ["forms:definition:read"],
|
||||
order: 36,
|
||||
surfaceId: "forms.catalogue",
|
||||
render: (context) => createElement(FormsPage, context)
|
||||
}
|
||||
],
|
||||
navItems: [
|
||||
{
|
||||
to: "/forms",
|
||||
label: "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;
|
||||
Reference in New Issue
Block a user