Contribute Postbox to Quick Access

This commit is contained in:
2026-08-06 19:02:55 +02:00
parent 36530b6dce
commit 60f50f7906
4 changed files with 88 additions and 3 deletions
+2
View File
@@ -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
View File
@@ -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
}
};