From bcdbe7664be20453ecb7b8c778afcdabe6c0909f Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Mon, 31 Aug 2026 23:06:09 +0200 Subject: [PATCH] feat(dashboard): give stackiq the KPI tiles it never had Stackiq's dashboard was the one fleet dashboard with no KPI cards at all. Not a rendering fault: the page was type:"custom" rendering a 675-line hand-written view whose entire widget list was an info box and two object-statistics tables. The app's five manifest KPI widgets all sit on detail pages, never on the dashboard. The page is now type:"dashboard" with four declarative "stat" widgets -- Organisaties, Modules, Diensten, Contracten -- counted by OpenRegister through @resolve:voorzieningen_register, the same register/schema pairs every other page in this manifest already uses. The non-KPI content is preserved exactly. The info box and both tables move to src/components/CatalogPanels.vue (template restructured, script untouched) and mount as the "catalog-panels" widget. Worth knowing for the next app: 1. A dashboard widget TYPE resolves against the LIBRARY's widget catalog (registerDashboardWidget / getWidgetTypeEntry), not the app's registry prop and not the page's slots map -- both of those are for page components and slot overrides. An unregistered type renders "Widget not available" and logs nothing, so it looks exactly like a wiring mistake. 2. eslint-suppressions.json is keyed by FILE PATH. Renaming a suppressed file orphans its entries, and --prune-suppressions then deletes them, so every previously-suppressed error surfaces at once. The entry moved to the new path deliberately, minus two suppressions the rename genuinely fixed: vue/multi-word-component-names (Dashboard -> CatalogPanels) and an unused arg (route -> _route, docblock updated). Verified in the browser against the published @conduction/nextcloud-vue (USE_LOCAL_LIB=false): four cards render in the canonical horizontal white card, zero grey, no "Widget not available", the info box and both tables still render. The tiles read 0/0/0/0 and that is CORRECT -- the statistics tables beside them independently report Organization 0, Service 0, Contract 0 in this environment, so the tiles agree with the tables rather than reporting a confident zero on a failed fetch. eslint exits 0, matching the pre-change baseline; webpack compiles. --- eslint-suppressions.json | 18 +- .../CatalogPanels.vue} | 297 +++++++----------- src/customComponents.js | 5 - src/main.js | 18 ++ src/manifest.json | 147 ++++++++- src/registry.js | 6 - 6 files changed, 285 insertions(+), 206 deletions(-) rename src/{views/Dashboard.vue => components/CatalogPanels.vue} (71%) diff --git a/eslint-suppressions.json b/eslint-suppressions.json index 855f5d7d..ebf283eb 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -4,6 +4,11 @@ "count": 2 } }, + "src/components/CatalogPanels.vue": { + "no-console": { + "count": 10 + } + }, "src/components/CollapsibleSection.vue": { "vue/slot-name-casing": { "count": 1 @@ -431,17 +436,6 @@ "count": 2 } }, - "src/views/Dashboard.vue": { - "@typescript-eslint/no-unused-vars": { - "count": 1 - }, - "no-console": { - "count": 10 - }, - "vue/multi-word-component-names": { - "count": 1 - } - }, "src/views/KwetsbaarhedenView.vue": { "@typescript-eslint/no-unused-vars": { "count": 1 @@ -542,4 +536,4 @@ "count": 1 } } -} \ No newline at end of file +} diff --git a/src/views/Dashboard.vue b/src/components/CatalogPanels.vue similarity index 71% rename from src/views/Dashboard.vue rename to src/components/CatalogPanels.vue index 92e98de3..3b8c0095 100644 --- a/src/views/Dashboard.vue +++ b/src/components/CatalogPanels.vue @@ -1,153 +1,128 @@