fix: add ownership-costs to migration order and improve error handling (refs #15)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m41s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 38s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

- 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
This commit is contained in:
Eric Gullickson
2026-01-13 08:15:53 -06:00
parent cb93e3ccc5
commit 395670c3bd
2 changed files with 12 additions and 2 deletions

View File

@@ -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)

View File

@@ -84,9 +84,18 @@ export const OwnershipCostsList: React.FC<OwnershipCostsListProps> = ({
}
if (error) {
// Show a subtle message if the feature isn't set up yet, don't block the page
return (
<div className="text-red-500 dark:text-red-400 text-sm p-4 bg-red-50 dark:bg-red-900/20 rounded-lg">
{error}
<div className="space-y-4">
<div className="flex justify-between items-center">
<h3 className="text-lg font-medium text-gray-900 dark:text-avus">
Recurring Costs
</h3>
</div>
<div className="text-sm text-gray-500 dark:text-titanio p-4 bg-gray-50 dark:bg-scuro rounded-lg border border-gray-200 dark:border-silverstone">
<p>Recurring costs tracking is being set up.</p>
<p className="text-xs mt-1 text-gray-400 dark:text-canna">Run migrations to enable this feature.</p>
</div>
</div>
);
}