feat: add ownership-costs feature capsule (refs #15)
- Create ownership_costs table for recurring vehicle costs - Add backend feature capsule with types, repository, service, routes - Update TCO calculation to use ownership_costs (with fallback to legacy vehicle fields) - Add taxCosts and otherCosts to TCO response - Create frontend ownership-costs feature with form, list, API, hooks - Update TCODisplay to show all cost types This implements a more flexible approach to tracking recurring ownership costs (insurance, registration, tax, other) with explicit date ranges and optional document association. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
22
backend/src/features/ownership-costs/index.ts
Normal file
22
backend/src/features/ownership-costs/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @ai-summary Public API for ownership-costs feature capsule
|
||||
*/
|
||||
|
||||
// Export service for use by other features
|
||||
export { OwnershipCostsService } from './domain/ownership-costs.service';
|
||||
|
||||
// Export types
|
||||
export type {
|
||||
OwnershipCost,
|
||||
CreateOwnershipCostRequest,
|
||||
UpdateOwnershipCostRequest,
|
||||
OwnershipCostResponse,
|
||||
OwnershipCostStats,
|
||||
OwnershipCostType,
|
||||
CostInterval
|
||||
} from './domain/ownership-costs.types';
|
||||
|
||||
export { PAYMENTS_PER_YEAR } from './domain/ownership-costs.types';
|
||||
|
||||
// Internal: Register routes with Fastify app
|
||||
export { ownershipCostsRoutes, registerOwnershipCostsRoutes } from './api/ownership-costs.routes';
|
||||
Reference in New Issue
Block a user