feat: Dashboard types and vehicle health data layer (#196) #197
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #196
Summary
Update dashboard types and extend
useDashboardDatahook to fetch document expiry data per vehicle. Add vehicle health computation utility that aggregates maintenance schedule status and document expiry into a per-vehicle health color (green/yellow/red).Files
frontend/src/features/dashboard/types/index.ts-- addVehicleHealth,AttentionItem,VehicleRosterDatatypesfrontend/src/features/dashboard/hooks/useDashboardData.ts-- extend to fetch documents per vehicle, compute healthAcceptance Criteria
VehicleHealth(green/yellow/red),AttentionItem(label, urgency, type),VehicleRosterData(vehicle + health + attention items + odometer)useDashboardDatafetches document expiry data per vehicle (insurance, registration with expirationDate)useVehicleRoster()derived hook returningVehicleRosterData[]