Contribute Tasks to product presentation
This commit is contained in:
@@ -22,6 +22,8 @@ from govoplan_core.core.modules import (
|
||||
ModuleManifest,
|
||||
NavItem,
|
||||
PermissionDefinition,
|
||||
ProductAreaContribution,
|
||||
QuickAccessTool,
|
||||
RoleTemplate,
|
||||
)
|
||||
from govoplan_core.core.provider_governance import declared_module_architecture
|
||||
@@ -120,6 +122,33 @@ ROLE_TEMPLATES = (
|
||||
)
|
||||
|
||||
DOCUMENTATION = (
|
||||
DocumentationTopic(
|
||||
id="tasks.quick-access-and-product-area",
|
||||
title="Work in product navigation and Quick Access",
|
||||
summary="Keep assigned work available in the Work area and the optional right-side Quick Access rail.",
|
||||
body=(
|
||||
"Tasks contributes its authorized workspace to the Work product area. When Quick Access is enabled, "
|
||||
"the same provider-owned open-work summary can appear beside the current page. Views may hide or reorder "
|
||||
"the contribution, but neither presentation grants task access or changes completion state."
|
||||
),
|
||||
layer="configured",
|
||||
documentation_types=("user", "admin"),
|
||||
audience=("user", "tenant_admin", "module_admin"),
|
||||
related_modules=("quick_access", "views"),
|
||||
translations={
|
||||
"de": {
|
||||
"title": "Arbeit in Produktnavigation und Schnellzugriff",
|
||||
"summary": "Zugewiesene Arbeit im Produktbereich Arbeit und optional in der rechten Schnellzugriffsleiste verwenden.",
|
||||
"body": (
|
||||
"Tasks ordnet den berechtigten Arbeitsbereich dem Produktbereich Arbeit zu. Ist der Schnellzugriff aktiviert, "
|
||||
"kann dieselbe vom Modul verantwortete Zusammenfassung offener Arbeit neben der aktuellen Seite erscheinen. "
|
||||
"Ansichten dürfen den Beitrag ausblenden oder ordnen, erteilen aber keine Aufgabenberechtigung."
|
||||
),
|
||||
}
|
||||
},
|
||||
metadata={"kind": "reference", "help_contexts": ["tasks.quick_access.work"]},
|
||||
order=9,
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="tasks.work-inbox",
|
||||
title="Unified work inbox",
|
||||
@@ -265,6 +294,39 @@ manifest = ModuleManifest(
|
||||
label="Open work widget",
|
||||
order=60,
|
||||
),
|
||||
ViewSurface(
|
||||
id="tasks.quick_access.work",
|
||||
module_id=MODULE_ID,
|
||||
kind="quick_access",
|
||||
label="Work Quick Access",
|
||||
order=70,
|
||||
),
|
||||
),
|
||||
product_areas=(
|
||||
ProductAreaContribution(
|
||||
id="work",
|
||||
module_id=MODULE_ID,
|
||||
label="i18n:govoplan-core.product_area.work",
|
||||
icon="list-checks",
|
||||
description="i18n:govoplan-core.product_area.work_description",
|
||||
surface_ids=("tasks.route.work",),
|
||||
order=10,
|
||||
),
|
||||
),
|
||||
quick_access_tools=(
|
||||
QuickAccessTool(
|
||||
id="tasks.work",
|
||||
module_id=MODULE_ID,
|
||||
category_id="work",
|
||||
label="i18n:govoplan-tasks.work",
|
||||
description="i18n:govoplan-tasks.quick_access_description",
|
||||
surface_id="tasks.quick_access.work",
|
||||
icon="list-checks",
|
||||
full_page_path="/tasks",
|
||||
required_any=(READ_SCOPE,),
|
||||
order=10,
|
||||
modes=("browse", "resume"),
|
||||
),
|
||||
),
|
||||
),
|
||||
tenant_summary_providers=(_tenant_summary,),
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { PlatformTranslations } from "@govoplan/core-webui";
|
||||
export const generatedTranslations: PlatformTranslations = {
|
||||
de: {
|
||||
"i18n:govoplan-tasks.work": "Arbeit",
|
||||
"i18n:govoplan-tasks.quick_access_description": "Offene und überfällige Arbeit, die Ihre Aufmerksamkeit benötigt.",
|
||||
"i18n:govoplan-tasks.work_inbox": "Arbeitsvorrat",
|
||||
"i18n:govoplan-tasks.work_details": "Arbeitsdetails",
|
||||
"i18n:govoplan-tasks.work_items": "Arbeitsobjekte",
|
||||
@@ -68,6 +69,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
},
|
||||
en: {
|
||||
"i18n:govoplan-tasks.work": "Work",
|
||||
"i18n:govoplan-tasks.quick_access_description": "Open and overdue work requiring your attention.",
|
||||
"i18n:govoplan-tasks.work_inbox": "Work inbox",
|
||||
"i18n:govoplan-tasks.work_details": "Work details",
|
||||
"i18n:govoplan-tasks.work_items": "Work items",
|
||||
|
||||
+18
-3
@@ -1,7 +1,8 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type {
|
||||
DashboardWidgetsUiCapability,
|
||||
PlatformWebModule
|
||||
PlatformWebModule,
|
||||
QuickAccessToolsUiCapability
|
||||
} from "@govoplan/core-webui";
|
||||
import TasksSummaryWidget from "./features/tasks/TasksSummaryWidget";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
@@ -30,6 +31,18 @@ const dashboardWidgets: DashboardWidgetsUiCapability = {
|
||||
]
|
||||
};
|
||||
|
||||
const quickAccessTools: QuickAccessToolsUiCapability = {
|
||||
tools: [
|
||||
{
|
||||
id: "tasks.work",
|
||||
render: ({ settings }) => createElement(TasksSummaryWidget, {
|
||||
settings,
|
||||
refreshKey: 0
|
||||
})
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const tasksModule: PlatformWebModule = {
|
||||
id: "tasks",
|
||||
label: "i18n:govoplan-tasks.work",
|
||||
@@ -61,10 +74,12 @@ export const tasksModule: PlatformWebModule = {
|
||||
{ id: "tasks.page.detail", moduleId: "tasks", kind: "section", label: "i18n:govoplan-tasks.work_details", parentId: "tasks.route.work", order: 30 },
|
||||
{ id: "tasks.action.create", moduleId: "tasks", kind: "action", label: "i18n:govoplan-tasks.create_task", parentId: "tasks.page.inbox", order: 40 },
|
||||
{ id: "tasks.action.advance", moduleId: "tasks", kind: "action", label: "i18n:govoplan-tasks.advance_task", parentId: "tasks.page.detail", order: 50 },
|
||||
{ id: "tasks.widget.open-work", moduleId: "tasks", kind: "section", label: "i18n:govoplan-tasks.widget", order: 60 }
|
||||
{ id: "tasks.widget.open-work", moduleId: "tasks", kind: "section", label: "i18n:govoplan-tasks.widget", order: 60 },
|
||||
{ id: "tasks.quick_access.work", moduleId: "tasks", kind: "quick_access", label: "i18n:govoplan-tasks.work", order: 70 }
|
||||
],
|
||||
uiCapabilities: {
|
||||
"dashboard.widgets": dashboardWidgets
|
||||
"dashboard.widgets": dashboardWidgets,
|
||||
"quickAccess.tools": quickAccessTools
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user