Skip to main content

Signalering Widgets

Issue: #88 Branch: feature/88/signalering-widgets

Overview

The signalering (alerting) feature adds six Nextcloud Dashboard widgets that give caseworkers a real-time overview of cases requiring attention.

Widgets

WidgetIDPurpose
Cases Overviewprocest_cases_overview_widgetList of recent open cases
Deadline Alertsprocest_deadline_alerts_widgetCases approaching their processing deadline
Overdue Casesprocest_overdue_cases_widgetCases that have exceeded their deadline
Stalled Casesprocest_stalled_cases_widgetCases with no recent activity
Task Remindersprocest_task_reminders_widgetUpcoming task deadlines
My Tasksprocest_my_tasks_widgetTasks assigned to the logged-in user

Architecture

All widgets are implemented as PHP classes in lib/Dashboard/ implementing OCP\Dashboard\IWidget. They load Vue components via Util::addScript() and share a single stylesheet (dashboardWidgets).

The Vue components fetch data at runtime from the OpenRegister backend using the Procest Pinia store. No data is stored in the PHP layer; widgets are purely metadata wrappers that bootstrap the frontend component.

Testing

Unit tests are in tests/Unit/Dashboard/SignaleringWidgetsTest.php. They verify:

  • Each widget returns its correct unique ID
  • All widget IDs are unique across the set
  • All widgets return non-empty titles (translated via IL10N)
  • All widgets provide a URL back to the Procest dashboard route
  • Widget display order is consistent (Deadline > Cases)