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
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:
@@ -28,6 +28,7 @@ const MIGRATION_ORDER = [
|
|||||||
'features/user-profile', // User profile management; independent
|
'features/user-profile', // User profile management; independent
|
||||||
'features/terms-agreement', // Terms & Conditions acceptance audit trail
|
'features/terms-agreement', // Terms & Conditions acceptance audit trail
|
||||||
'features/audit-log', // Centralized audit logging; independent
|
'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)
|
// Base directory where migrations are copied inside the image (set by Dockerfile)
|
||||||
|
|||||||
@@ -84,9 +84,18 @@ export const OwnershipCostsList: React.FC<OwnershipCostsListProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
// Show a subtle message if the feature isn't set up yet, don't block the page
|
||||||
return (
|
return (
|
||||||
<div className="text-red-500 dark:text-red-400 text-sm p-4 bg-red-50 dark:bg-red-900/20 rounded-lg">
|
<div className="space-y-4">
|
||||||
{error}
|
<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>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user