Implement governed voting module
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type { PlatformWebModule } from "@govoplan/core-webui";
|
||||
import "./styles/voting.css";
|
||||
|
||||
|
||||
const VotingPage = lazy(() => import("./features/voting/VotingPage"));
|
||||
|
||||
export const votingModule: PlatformWebModule = {
|
||||
id: "voting",
|
||||
label: "Voting",
|
||||
version: "0.1.14",
|
||||
dependencies: ["access"],
|
||||
optionalDependencies: ["committee", "decisions", "encryption", "forms", "identity_trust", "policy", "reporting", "workflow_engine"],
|
||||
routes: [
|
||||
{
|
||||
path: "/voting",
|
||||
anyOf: ["voting:ballot:read"],
|
||||
order: 39,
|
||||
surfaceId: "voting.catalogue",
|
||||
render: (context) => createElement(VotingPage, context)
|
||||
}
|
||||
],
|
||||
navItems: [
|
||||
{
|
||||
to: "/voting",
|
||||
label: "Voting",
|
||||
iconName: "vote",
|
||||
anyOf: ["voting:ballot:read"],
|
||||
order: 39,
|
||||
surfaceId: "voting.navigation"
|
||||
}
|
||||
],
|
||||
viewSurfaces: [
|
||||
{ id: "voting.navigation", moduleId: "voting", kind: "navigation", label: "Voting navigation", order: 10 },
|
||||
{ id: "voting.catalogue", moduleId: "voting", kind: "route", label: "Voting ballot catalogue", order: 20 },
|
||||
{ id: "voting.ballot", moduleId: "voting", kind: "section", label: "Voting ballot workspace", parentId: "voting.catalogue", order: 30 }
|
||||
]
|
||||
};
|
||||
|
||||
export default votingModule;
|
||||
Reference in New Issue
Block a user