Contribute Postbox to Quick Access
This commit is contained in:
@@ -2,6 +2,7 @@ import type { PlatformTranslations } from "@govoplan/core-webui";
|
||||
|
||||
const en = {
|
||||
"i18n:govoplan-postbox.postbox": "Postbox",
|
||||
"i18n:govoplan-postbox.quick_access_description": "Institutional messages addressed to your functions.",
|
||||
"i18n:govoplan-postbox.postboxes": "Postboxes",
|
||||
"i18n:govoplan-postbox.postbox_inbox": "Postbox inbox",
|
||||
"i18n:govoplan-postbox.postbox_inbox_description": "Unread messages across accessible Postboxes.",
|
||||
@@ -235,6 +236,7 @@ const en = {
|
||||
const de = {
|
||||
...en,
|
||||
"i18n:govoplan-postbox.postbox": "Postfach",
|
||||
"i18n:govoplan-postbox.quick_access_description": "Institutionelle Nachrichten an Ihre Funktionen.",
|
||||
"i18n:govoplan-postbox.postboxes": "Postfächer",
|
||||
"i18n:govoplan-postbox.postbox_inbox": "Postfach-Eingang",
|
||||
"i18n:govoplan-postbox.postbox_inbox_description": "Ungelesene Nachrichten aus zugänglichen Postfächern.",
|
||||
|
||||
+23
-2
@@ -3,7 +3,8 @@ import {
|
||||
hasScope,
|
||||
type AdminSectionsUiCapability,
|
||||
type DashboardWidgetsUiCapability,
|
||||
type PlatformWebModule
|
||||
type PlatformWebModule,
|
||||
type QuickAccessToolsUiCapability
|
||||
} from "@govoplan/core-webui";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
import PostboxInboxWidget from "./features/postbox/PostboxInboxWidget";
|
||||
@@ -59,6 +60,18 @@ const postboxDashboardWidgets: DashboardWidgetsUiCapability = {
|
||||
}
|
||||
]
|
||||
};
|
||||
const postboxQuickAccessTools: QuickAccessToolsUiCapability = {
|
||||
tools: [
|
||||
{
|
||||
id: "postbox.messages",
|
||||
render: ({ settings }) => createElement(PostboxInboxWidget, {
|
||||
settings,
|
||||
refreshKey: 0,
|
||||
configuration: { maxItems: 7 }
|
||||
})
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const postboxAdminSections: AdminSectionsUiCapability = {
|
||||
sections: [
|
||||
@@ -152,11 +165,19 @@ export const postboxModule: PlatformWebModule = {
|
||||
kind: "section",
|
||||
label: "i18n:govoplan-postbox.postbox_templates_bindings",
|
||||
order: 30
|
||||
},
|
||||
{
|
||||
id: "postbox.quick_access.messages",
|
||||
moduleId: "postbox",
|
||||
kind: "quick_access",
|
||||
label: "Postbox Quick Access",
|
||||
order: 35
|
||||
}
|
||||
],
|
||||
uiCapabilities: {
|
||||
"admin.sections": postboxAdminSections,
|
||||
"dashboard.widgets": postboxDashboardWidgets
|
||||
"dashboard.widgets": postboxDashboardWidgets,
|
||||
"quickAccess.tools": postboxQuickAccessTools
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user