Migrate Notifications interface patterns

This commit is contained in:
2026-08-03 15:33:49 +02:00
parent 3b1a87b3e2
commit ad6a31f68b
13 changed files with 825 additions and 104 deletions
+19 -12
View File
@@ -18,10 +18,10 @@ const notificationDashboardWidgets: DashboardWidgetsUiCapability = {
{
id: "notifications.summary",
surfaceId: "notifications.widget.summary",
title: "Notifications",
description: "Unread notifications and delivery state.",
title: "i18n:govoplan-notifications.surface.center",
description: "i18n:govoplan-notifications.widget_description",
moduleId: "notifications",
category: "Communication",
category: "i18n:govoplan-notifications.communication",
order: 60,
defaultSize: "medium",
supportedSizes: ["medium", "wide"],
@@ -33,8 +33,8 @@ const notificationDashboardWidgets: DashboardWidgetsUiCapability = {
configurationFields: [
{
id: "showDeliveryState",
label: "Show delivery state",
description: "Include pending and failed delivery counts.",
label: "i18n:govoplan-notifications.show_delivery_state",
description: "i18n:govoplan-notifications.show_delivery_state_help",
kind: "boolean"
}
],
@@ -59,7 +59,7 @@ const notificationSettingsSections: SettingsSectionsUiCapability = {
{
id: "notifications",
surfaceId: "notifications.settings.preferences",
label: "Notifications",
label: "i18n:govoplan-notifications.surface.center",
group: "ui",
order: 40,
anyOf: notificationRead,
@@ -70,29 +70,36 @@ const notificationSettingsSections: SettingsSectionsUiCapability = {
export const notificationsModule: PlatformWebModule = {
id: "notifications",
label: "Notifications",
label: "i18n:govoplan-notifications.surface.center",
version: "1.0.0",
dependencies: [],
optionalDependencies: ["mail", "tasks", "portal", "workflow", "calendar", "scheduling"],
translations: generatedTranslations,
viewSurfaces: [
{ id: "notifications.page.inbox", moduleId: "notifications", kind: "section", label: "i18n:govoplan-notifications.surface.inbox", parentId: "notifications.route.notifications", order: 20 },
{ id: "notifications.page.detail", moduleId: "notifications", kind: "section", label: "i18n:govoplan-notifications.surface.detail", parentId: "notifications.route.notifications", order: 30 },
{ id: "notifications.page.delivery", moduleId: "notifications", kind: "section", label: "i18n:govoplan-notifications.surface.delivery", parentId: "notifications.page.detail", order: 40 },
{ id: "notifications.action.mark-read", moduleId: "notifications", kind: "action", label: "i18n:govoplan-notifications.surface.mark_read", parentId: "notifications.page.detail", order: 50 },
{ id: "notifications.action.acknowledge", moduleId: "notifications", kind: "action", label: "i18n:govoplan-notifications.surface.acknowledge", parentId: "notifications.page.detail", order: 60 },
{ id: "notifications.action.cancel", moduleId: "notifications", kind: "action", label: "i18n:govoplan-notifications.surface.cancel", parentId: "notifications.page.delivery", order: 70 },
{ id: "notifications.action.dispatch", moduleId: "notifications", kind: "action", label: "i18n:govoplan-notifications.surface.dispatch", parentId: "notifications.page.delivery", order: 80 },
{
id: "notifications.widget.summary",
moduleId: "notifications",
kind: "section",
label: "Notification summary widget",
order: 30
label: "i18n:govoplan-notifications.surface.widget_summary",
order: 90
},
{
id: "notifications.settings.preferences",
moduleId: "notifications",
kind: "section",
label: "Notification preferences",
order: 40
label: "i18n:govoplan-notifications.surface.preferences",
order: 100
}
],
routes: [
{ path: "/notifications", anyOf: notificationRead, order: 59, render: ({ settings, auth }) => createElement(NotificationCenterPage, { settings, auth }) }
{ path: "/notifications", anyOf: notificationRead, order: 59, surfaceId: "notifications.route.notifications", render: ({ settings, auth }) => createElement(NotificationCenterPage, { settings, auth }) }
],
uiCapabilities: {
"settings.sections": notificationSettingsSections,