Contribute Postbox to Quick Access
This commit is contained in:
@@ -28,6 +28,8 @@ from govoplan_core.core.modules import (
|
||||
ModuleManifest,
|
||||
NavItem,
|
||||
PermissionDefinition,
|
||||
ProductAreaContribution,
|
||||
QuickAccessTool,
|
||||
RoleTemplate,
|
||||
)
|
||||
from govoplan_core.core.provider_governance import declared_module_architecture
|
||||
@@ -357,6 +359,39 @@ manifest = ModuleManifest(
|
||||
label="Postbox templates and bindings",
|
||||
order=30,
|
||||
),
|
||||
ViewSurface(
|
||||
id="postbox.quick_access.messages",
|
||||
module_id=MODULE_ID,
|
||||
kind="quick_access",
|
||||
label="Postbox Quick Access",
|
||||
order=35,
|
||||
),
|
||||
),
|
||||
product_areas=(
|
||||
ProductAreaContribution(
|
||||
id="communication",
|
||||
module_id=MODULE_ID,
|
||||
label="i18n:govoplan-core.product_area.communication",
|
||||
icon="mail",
|
||||
description="i18n:govoplan-core.product_area.communication_description",
|
||||
surface_ids=("postbox.nav.postbox", "postbox.route.postbox"),
|
||||
order=40,
|
||||
),
|
||||
),
|
||||
quick_access_tools=(
|
||||
QuickAccessTool(
|
||||
id="postbox.messages",
|
||||
module_id=MODULE_ID,
|
||||
category_id="messages",
|
||||
label="i18n:govoplan-postbox.postbox",
|
||||
description="i18n:govoplan-postbox.quick_access_description",
|
||||
surface_id="postbox.quick_access.messages",
|
||||
icon="inbox",
|
||||
full_page_path="/postbox",
|
||||
required_any=(READ_SCOPE,),
|
||||
order=20,
|
||||
modes=("browse", "author"),
|
||||
),
|
||||
),
|
||||
),
|
||||
route_factory=_router,
|
||||
@@ -393,6 +428,33 @@ manifest = ModuleManifest(
|
||||
CAPABILITY_POSTBOX_ROUTING: _configure,
|
||||
},
|
||||
documentation=(
|
||||
DocumentationTopic(
|
||||
id="postbox.quick-access-and-product-area",
|
||||
title="Postbox in Communication and Messages",
|
||||
summary="Use function-bound Postboxes in Communication and the shared Messages Quick Access drawer.",
|
||||
body=(
|
||||
"Postbox contributes its inbox to Communication. With Quick Access enabled, its owner-rendered unread summary "
|
||||
"appears beside Mail and future chat providers inside Messages while retaining function assignment, classification, "
|
||||
"read-receipt, retention, encryption, and evidence semantics in Postbox."
|
||||
),
|
||||
layer="configured",
|
||||
documentation_types=("user", "admin"),
|
||||
audience=("administrator", "user", "campaign_manager"),
|
||||
related_modules=("quick_access", "views", "mail"),
|
||||
translations={
|
||||
"de": {
|
||||
"title": "Postfach in Kommunikation und Nachrichten",
|
||||
"summary": "Funktionsgebundene Postfächer in Kommunikation und der gemeinsamen Schnellzugriffseinblendung Nachrichten verwenden.",
|
||||
"body": (
|
||||
"Postbox ordnet seinen Eingang Kommunikation zu. Ist der Schnellzugriff aktiviert, erscheint die vom Modul gerenderte "
|
||||
"Zusammenfassung ungelesener Nachrichten neben Mail und künftigen Chat-Anbietern unter Nachrichten. "
|
||||
"Funktionszuordnung, Klassifikation, Lesestatus, Aufbewahrung, Verschlüsselung und Nachweise verbleiben bei Postbox."
|
||||
),
|
||||
}
|
||||
},
|
||||
metadata={"kind": "reference", "help_contexts": ["postbox.quick_access.messages"]},
|
||||
order=33,
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="postbox.search.messages",
|
||||
title="Search authorized Postbox messages",
|
||||
|
||||
@@ -18,6 +18,7 @@ class PostboxInterfaceDocumentationContractTests(unittest.TestCase):
|
||||
"postbox.admin.templates",
|
||||
"postbox.inbox.directory",
|
||||
"postbox.inbox.messages",
|
||||
"postbox.quick_access.messages",
|
||||
"postbox.widget.inbox",
|
||||
},
|
||||
{surface.id for surface in frontend.view_surfaces}, # type: ignore[union-attr]
|
||||
@@ -43,4 +44,3 @@ class PostboxInterfaceDocumentationContractTests(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
@@ -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