Planned and executed phase001

This commit is contained in:
2026-09-13 21:46:57 -06:00
parent ff0a306668
commit 9793cd08bc
22 changed files with 695 additions and 20 deletions
+25
View File
@@ -0,0 +1,25 @@
# Phase 004: Fuel And Maintenance Event Entry
## Goal
Allow users to record fuel and maintenance events from the vehicle detail page.
## Work
- Add nested routes under vehicles for fuel entries and maintenance entries.
- Add create forms on `vehicles#show`.
- Save each fuel submission as a new `FuelEntry`.
- Save each maintenance submission as a new `MaintenanceEntry`.
- Update `Vehicle.current_odometer` when a fuel entry is created if the submitted odometer is newer.
- Track `updated_by_user_id` on each event.
- Add request specs and model specs for event creation.
## Deliverables
- Fuel entry creation flow.
- Maintenance entry creation flow.
- Odometer update behavior.
- Event history display on vehicle show page.
## Acceptance Criteria
- Fuel submissions create records and update vehicle odometer.
- Maintenance submissions create records.
- Invalid submissions re-render or redirect with validation errors.
- Every event records the submitting user.