e017da9d12
Navigation: - Remove Plugins header from sidebar - Merge static items and plugin items into unified sorted list - Group related menu items (Dateien, E-Mail, Kalender, Automation) - German labels for all menu items - Sort by order field, alphabetical fallback for ties Drag-and-Drop Menu: - New backend endpoints: GET/PUT /api/v1/users/me/menu-order - Store menu order in user preferences JSONB field - New SettingsMenuOrder page with @dnd-kit drag-and-drop - New Settings tab: Menu ordering - Sidebar reads saved menu order and sorts accordingly - Reset to default option
66 lines
1.8 KiB
Python
66 lines
1.8 KiB
Python
"""Tasks plugin — manage free tasks/activities linked to contacts."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.plugins.base import BasePlugin
|
|
from app.plugins.manifest import (
|
|
PluginManifest,
|
|
PluginRouteDef,
|
|
FrontendMenuItem,
|
|
FrontendPageRoute,
|
|
CronJobContribution,
|
|
)
|
|
|
|
|
|
class TasksPlugin(BasePlugin):
|
|
"""Tasks plugin for managing activities (calls, notes, visits) linked to contacts."""
|
|
|
|
manifest = PluginManifest(
|
|
name="tasks",
|
|
version="1.0.0",
|
|
display_name="Tasks",
|
|
description="Manage free tasks/activities with status, priority, due dates, and contact links.",
|
|
dependencies=["permissions"],
|
|
routes=[
|
|
PluginRouteDef(
|
|
path="/api/v1/tasks",
|
|
module="app.plugins.builtins.tasks.routes",
|
|
router_attr="router",
|
|
),
|
|
],
|
|
events=[],
|
|
migrations=["0001_initial.sql"],
|
|
permissions=[
|
|
"tasks:read",
|
|
"tasks:write",
|
|
"tasks:delete",
|
|
],
|
|
is_core=True,
|
|
menu_items=[
|
|
FrontendMenuItem(
|
|
label_key="nav.tasks",
|
|
label="Aufgaben",
|
|
path="/tasks",
|
|
icon="CheckSquare",
|
|
order=30,
|
|
),
|
|
],
|
|
page_routes=[
|
|
FrontendPageRoute(
|
|
path="/tasks",
|
|
component="@/pages/Tasks",
|
|
protected=True,
|
|
order=30,
|
|
),
|
|
],
|
|
cron_jobs=[
|
|
CronJobContribution(
|
|
name="tasks_due_reminder",
|
|
cron_expression="0 8 * * *",
|
|
job_type="custom",
|
|
target_name="tasks_due_reminder",
|
|
plugin_name="tasks",
|
|
),
|
|
],
|
|
)
|