intermittent commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type { PlatformWebModule, SettingsSectionsUiCapability } from "@govoplan/core-webui";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
import "./styles/notifications.css";
|
||||
|
||||
const NotificationCenterPage = lazy(() => import("./features/notifications/NotificationCenterPage"));
|
||||
const NotificationSettingsPanel = lazy(() => import("./features/notifications/NotificationSettingsPanel"));
|
||||
|
||||
const notificationRead = ["notifications:notification:read"];
|
||||
|
||||
const notificationSettingsSections: SettingsSectionsUiCapability = {
|
||||
sections: [
|
||||
{
|
||||
id: "notifications",
|
||||
label: "Notifications",
|
||||
group: "ui",
|
||||
order: 40,
|
||||
anyOf: notificationRead,
|
||||
render: ({ settings, auth }) => createElement(NotificationSettingsPanel, { settings, auth })
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const notificationsModule: PlatformWebModule = {
|
||||
id: "notifications",
|
||||
label: "Notifications",
|
||||
version: "1.0.0",
|
||||
dependencies: [],
|
||||
optionalDependencies: ["mail", "tasks", "portal", "workflow", "calendar", "scheduling"],
|
||||
translations: generatedTranslations,
|
||||
routes: [
|
||||
{ path: "/notifications", anyOf: notificationRead, order: 59, render: ({ settings, auth }) => createElement(NotificationCenterPage, { settings, auth }) }
|
||||
],
|
||||
uiCapabilities: {
|
||||
"settings.sections": notificationSettingsSections
|
||||
}
|
||||
};
|
||||
|
||||
export default notificationsModule;
|
||||
Reference in New Issue
Block a user