From 395670c3bddf5ce1432e5f32e677b09a78f35a4d Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Tue, 13 Jan 2026 08:15:53 -0600 Subject: [PATCH] fix: add ownership-costs to migration order and improve error handling (refs #15) - Add 'features/ownership-costs' to MIGRATION_ORDER in run-all.ts - Improve OwnershipCostsList error display to not block the page - Show friendly message when feature needs migration --- backend/src/_system/migrations/run-all.ts | 1 + .../components/OwnershipCostsList.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/src/_system/migrations/run-all.ts b/backend/src/_system/migrations/run-all.ts index a134ee9..2d0fd9e 100644 --- a/backend/src/_system/migrations/run-all.ts +++ b/backend/src/_system/migrations/run-all.ts @@ -28,6 +28,7 @@ const MIGRATION_ORDER = [ 'features/user-profile', // User profile management; independent 'features/terms-agreement', // Terms & Conditions acceptance audit trail 'features/audit-log', // Centralized audit logging; independent + 'features/ownership-costs', // Depends on vehicles and documents; TCO recurring costs ]; // Base directory where migrations are copied inside the image (set by Dockerfile) diff --git a/frontend/src/features/ownership-costs/components/OwnershipCostsList.tsx b/frontend/src/features/ownership-costs/components/OwnershipCostsList.tsx index 74874c4..3b69dfb 100644 --- a/frontend/src/features/ownership-costs/components/OwnershipCostsList.tsx +++ b/frontend/src/features/ownership-costs/components/OwnershipCostsList.tsx @@ -84,9 +84,18 @@ export const OwnershipCostsList: React.FC = ({ } if (error) { + // Show a subtle message if the feature isn't set up yet, don't block the page return ( -
- {error} +
+
+

+ Recurring Costs +

+
+
+

Recurring costs tracking is being set up.

+

Run migrations to enable this feature.

+
); }