Migrate Postbox interface patterns

This commit is contained in:
2026-08-03 12:26:20 +02:00
parent 8f8d259a76
commit a97eb3bcef
12 changed files with 1209 additions and 152 deletions
+19 -12
View File
@@ -5,6 +5,7 @@ import {
type DashboardWidgetsUiCapability,
type PlatformWebModule
} from "@govoplan/core-webui";
import { generatedTranslations } from "./i18n/generatedTranslations";
import PostboxInboxWidget from "./features/postbox/PostboxInboxWidget";
import "./styles/postbox.css";
@@ -14,16 +15,21 @@ const PostboxAdminPanel = lazy(
() => import("./features/postbox/PostboxAdminPanel")
);
const translations = {
en: generatedTranslations.en,
de: generatedTranslations.de
};
const readScope = ["postbox:postbox:read"];
const postboxDashboardWidgets: DashboardWidgetsUiCapability = {
widgets: [
{
id: "postbox.inbox",
surfaceId: "postbox.widget.inbox",
title: "Postbox inbox",
description: "Unread messages across accessible Postboxes.",
title: "i18n:govoplan-postbox.postbox_inbox",
description: "i18n:govoplan-postbox.postbox_inbox_description",
moduleId: "postbox",
category: "Communication",
category: "i18n:govoplan-postbox.communication",
order: 55,
defaultVisible: false,
defaultSize: "medium",
@@ -36,7 +42,7 @@ const postboxDashboardWidgets: DashboardWidgetsUiCapability = {
configurationFields: [
{
id: "maxItems",
label: "Maximum messages",
label: "i18n:govoplan-postbox.maximum_messages",
kind: "number",
min: 1,
max: 12,
@@ -60,7 +66,7 @@ const postboxAdminSections: AdminSectionsUiCapability = {
id: "postbox",
moduleId: "postbox",
kind: "management",
label: "Postboxes",
label: "i18n:govoplan-postbox.postboxes",
group: "TENANT",
order: 45,
surfaceId: "postbox.admin.templates",
@@ -80,8 +86,8 @@ const postboxAdminSections: AdminSectionsUiCapability = {
export const postboxModule: PlatformWebModule = {
id: "postbox",
label: "Postbox",
version: "0.1.0",
label: "i18n:govoplan-postbox.postbox",
version: "0.1.2",
dependencies: ["identity", "organizations", "idm"],
optionalDependencies: [
"access",
@@ -95,10 +101,11 @@ export const postboxModule: PlatformWebModule = {
"views",
"workflow"
],
translations,
navItems: [
{
to: "/postbox",
label: "Postbox",
label: "i18n:govoplan-postbox.postbox",
iconName: "inbox",
anyOf: readScope,
order: 58
@@ -119,28 +126,28 @@ export const postboxModule: PlatformWebModule = {
id: "postbox.inbox.directory",
moduleId: "postbox",
kind: "section",
label: "Postbox directory",
label: "i18n:govoplan-postbox.postbox_directory",
order: 10
},
{
id: "postbox.inbox.messages",
moduleId: "postbox",
kind: "section",
label: "Postbox messages",
label: "i18n:govoplan-postbox.postbox_messages",
order: 20
},
{
id: "postbox.widget.inbox",
moduleId: "postbox",
kind: "section",
label: "Postbox inbox widget",
label: "i18n:govoplan-postbox.postbox_inbox_widget",
order: 25
},
{
id: "postbox.admin.templates",
moduleId: "postbox",
kind: "section",
label: "Postbox templates and bindings",
label: "i18n:govoplan-postbox.postbox_templates_bindings",
order: 30
}
],