Matt
adf4e2ba78
fix(reports): split PDF widget catalogue out of the DB-touching service
...
export-dashboard-pdf-button.tsx imported PDF_DASHBOARD_WIDGETS +
PdfDashboardWidgetId from dashboard-report-data.service.ts. JS modules
evaluate their imports eagerly, so the button transitively pulled in
that file's top-level `import { getKpis } from './dashboard.service'`,
which pulled in `@/lib/db`, which pulls in `postgres`, which crashed
the client bundle with:
Module not found: Can't resolve 'fs'
./node_modules/.../postgres/src/index.js [Client Component Browser]
Split the pure data + types into the new file
src/lib/services/dashboard-report-widgets.ts and re-export from the
original service for backwards compatibility. The button now imports
from the pure file; the server-only route (reports/generate) keeps
using the resolver as before.
tsc clean, dashboard loads.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 13:03:44 +02:00
..
2026-05-14 14:53:58 +02:00
2026-05-13 12:27:08 +02:00
2026-05-04 22:57:01 +02:00
2026-05-14 14:56:58 +02:00
2026-05-06 14:57:24 +02:00
2026-05-20 15:56:11 +02:00
2026-05-07 20:58:34 +02:00
2026-05-18 13:28:50 +02:00
2026-05-07 21:02:12 +02:00
2026-05-14 15:47:49 +02:00
2026-05-05 04:07:03 +02:00
2026-05-12 21:13:10 +02:00
2026-05-12 21:32:19 +02:00
2026-05-15 01:18:13 +02:00
2026-05-12 18:29:03 +02:00
2026-05-14 23:55:22 +02:00
2026-05-21 18:11:17 +02:00
2026-05-14 03:38:16 +02:00
2026-05-06 14:58:47 +02:00
2026-05-15 01:18:13 +02:00
2026-05-15 01:18:13 +02:00
2026-05-18 18:22:36 +02:00
2026-05-05 20:48:13 +02:00
2026-05-14 15:19:38 +02:00
2026-05-18 16:18:03 +02:00
2026-05-13 12:27:08 +02:00
2026-05-13 12:27:08 +02:00
2026-05-18 13:28:50 +02:00
2026-05-12 18:16:18 +02:00
2026-05-14 03:39:21 +02:00
2026-05-18 13:28:50 +02:00
2026-05-22 13:03:44 +02:00
2026-05-22 13:03:44 +02:00
2026-05-21 23:32:21 +02:00
2026-05-18 14:57:55 +02:00
2026-05-21 23:52:57 +02:00
2026-05-20 15:54:10 +02:00
2026-05-13 13:47:33 +02:00
2026-05-18 13:28:50 +02:00
2026-05-05 21:19:39 +02:00
2026-05-13 14:03:27 +02:00
2026-05-21 23:43:55 +02:00
2026-05-10 16:53:51 +02:00
2026-05-05 21:19:39 +02:00
2026-05-20 15:56:11 +02:00
2026-05-18 13:28:50 +02:00
2026-05-12 21:11:23 +02:00
2026-05-18 18:22:36 +02:00
2026-05-21 17:41:02 +02:00
2026-05-18 13:28:50 +02:00
2026-05-12 18:35:56 +02:00
2026-05-04 22:57:01 +02:00
2026-05-14 15:24:38 +02:00
2026-05-05 20:18:05 +02:00
2026-05-07 20:59:28 +02:00
2026-05-04 22:57:01 +02:00
2026-05-18 13:28:50 +02:00
2026-05-18 17:09:19 +02:00
2026-05-18 18:22:36 +02:00
2026-05-06 14:57:24 +02:00
2026-05-13 12:07:57 +02:00
2026-05-04 22:57:01 +02:00
2026-05-12 21:34:39 +02:00
2026-05-13 13:02:38 +02:00
2026-05-21 19:34:19 +02:00
2026-05-14 15:42:21 +02:00
2026-05-21 20:18:40 +02:00
2026-05-05 20:48:13 +02:00
2026-05-13 11:50:07 +02:00
2026-05-14 22:39:16 +02:00
2026-05-13 12:58:58 +02:00
2026-05-13 13:02:38 +02:00
2026-05-21 18:35:52 +02:00
2026-05-14 03:39:21 +02:00
2026-05-05 20:41:23 +02:00
2026-05-21 23:52:57 +02:00
2026-05-18 13:28:50 +02:00
2026-05-21 20:42:55 +02:00
2026-05-12 20:51:49 +02:00
2026-05-12 16:52:35 +02:00
2026-05-18 13:28:50 +02:00
2026-05-18 13:28:50 +02:00
2026-05-13 13:02:38 +02:00
2026-05-13 12:27:08 +02:00
2026-05-05 20:18:05 +02:00
2026-05-18 13:28:50 +02:00
2026-05-22 12:28:34 +02:00
2026-05-18 13:28:50 +02:00
2026-05-18 13:28:50 +02:00
2026-05-13 12:15:46 +02:00
2026-05-09 04:16:42 +02:00
2026-05-18 18:22:36 +02:00
2026-05-21 17:47:38 +02:00
2026-05-07 20:58:34 +02:00
2026-05-04 22:57:01 +02:00
2026-05-13 12:07:57 +02:00
2026-05-18 16:18:03 +02:00
2026-05-18 18:22:36 +02:00
2026-05-18 18:22:36 +02:00
2026-05-21 20:46:52 +02:00
2026-05-13 12:07:57 +02:00
2026-04-28 19:00:57 +02:00
2026-05-08 02:20:27 +02:00
2026-05-21 22:57:19 +02:00
2026-04-29 01:58:42 +02:00
2026-05-18 13:28:50 +02:00
2026-05-11 13:01:47 +02:00
2026-05-21 22:40:48 +02:00
2026-05-21 19:45:50 +02:00
2026-05-18 13:28:50 +02:00
2026-05-13 12:58:58 +02:00
2026-05-22 12:51:39 +02:00
2026-05-07 21:02:12 +02:00
2026-04-29 01:58:42 +02:00
2026-05-20 15:53:41 +02:00
2026-05-20 15:53:41 +02:00
2026-05-13 12:54:29 +02:00
2026-05-13 13:02:38 +02:00
2026-05-05 04:20:38 +02:00
2026-05-18 13:28:50 +02:00
2026-05-21 18:06:41 +02:00