54 lines
2.3 KiB
TypeScript
54 lines
2.3 KiB
TypeScript
import { createElement, lazy } from "react";
|
|
import type { PlatformWebModule } from "@govoplan/core-webui";
|
|
import "./styles/tickets.css";
|
|
|
|
|
|
const TicketsPage = lazy(() => import("./features/tickets/TicketsPage"));
|
|
|
|
export const ticketsModule: PlatformWebModule = {
|
|
id: "tickets",
|
|
label: "Tickets",
|
|
version: "0.1.20",
|
|
optionalDependencies: [
|
|
"cases",
|
|
"helpdesk",
|
|
"projects",
|
|
"wiki",
|
|
"files",
|
|
"search"
|
|
],
|
|
routes: [
|
|
{
|
|
path: "/tickets",
|
|
anyOf: ["tickets:ticket:read"],
|
|
order: 22,
|
|
surfaceId: "tickets.route.workspace",
|
|
render: (context) => createElement(TicketsPage, context)
|
|
}
|
|
],
|
|
navItems: [
|
|
{
|
|
to: "/tickets",
|
|
label: "Tickets",
|
|
iconName: "ticket-check",
|
|
anyOf: ["tickets:ticket:read"],
|
|
order: 22,
|
|
surfaceId: "tickets.navigation"
|
|
}
|
|
],
|
|
viewSurfaces: [
|
|
{ id: "tickets.navigation", moduleId: "tickets", kind: "navigation", label: "Tickets navigation", order: 10 },
|
|
{ id: "tickets.route.workspace", moduleId: "tickets", kind: "route", label: "Tickets workspace", order: 20 },
|
|
{ id: "tickets.page.queue", moduleId: "tickets", kind: "section", label: "Ticket queue", parentId: "tickets.route.workspace", order: 30 },
|
|
{ id: "tickets.page.detail", moduleId: "tickets", kind: "section", label: "Ticket details", parentId: "tickets.route.workspace", order: 40 },
|
|
{ id: "tickets.action.report", moduleId: "tickets", kind: "action", label: "Report ticket", parentId: "tickets.page.queue", order: 50 },
|
|
{ id: "tickets.action.resolve", moduleId: "tickets", kind: "action", label: "Resolve ticket", parentId: "tickets.page.detail", order: 60 },
|
|
{ id: "tickets.section.history", moduleId: "tickets", kind: "section", label: "Immutable ticket history", parentId: "tickets.page.detail", order: 70 },
|
|
{ id: "tickets.action.participants", moduleId: "tickets", kind: "action", label: "Manage ticket participants", parentId: "tickets.page.detail", order: 80 },
|
|
{ id: "tickets.action.link", moduleId: "tickets", kind: "action", label: "Add or remove ticket reference", parentId: "tickets.page.detail", order: 90 },
|
|
{ id: "tickets.action.delete", moduleId: "tickets", kind: "action", label: "Delete ticket", parentId: "tickets.page.detail", order: 100 }
|
|
]
|
|
};
|
|
|
|
export default ticketsModule;
|