mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
Add maintenance intervals configuration to track maintenance by kilometers driven. When a maintenance is marked COMPLETED, automatically calculate and schedule the next maintenance based on interval + current odometer reading. Features: - MaintenanceInterval entity: stores KM/day intervals per vehicle & type - scheduleNextMaintenance(): creates next SCHEDULED item after completion - nextDueKm field: tracks when next maintenance is due (in kilometers) - getDueBoard() queries already support KM-based tracking Maintenance now "marches forward" based on distance driven, not just dates. Each vehicle type can have different intervals (e.g., oil every 10k km, tires 50k km). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>