Files
erp-nutzfahrzeuge/.a0/current_status.md
T
Leopoldadmin 74b5e6afb8 feat(T02): vehicle management + mobile.de push + vehicle UI
- Vehicle model: 25+ fields, 5 vehicle types, soft-delete
- Vehicle CRUD: 7 API endpoints with JWT auth, filter/sort/paginate
- mobile.de: push/update/delete listings, field mapping, retry logic
- MobileDeListing model for sync status tracking
- Frontend: VehicleList, VehicleForm, VehicleDetail, MobileDeStatus
- 73 backend tests (82% coverage), 16 frontend tests
2026-07-14 12:03:19 +02:00

32 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Current Status
**Task**: T02 Vehicle Management + mobile.de Push + Vehicle UI
**Status**: COMPLETED
**Date**: 2026-07-14
## Summary
Vehicle CRUD API with pagination/filtering/sorting, mobile.de push integration, and full frontend UI implemented.
## Backend (COMPLETED)
- Vehicle model: UUID PK, all fields per spec (make, model, fin CHECK len=17, year, first_registration, power_kw, power_hp computed, fuel_type, transmission, color, condition, location, availability, price, vehicle_type, lkw_type, machine_type, body_type, operating_hours, operating_hours_unit, mileage_km, description, timestamps, deleted_at soft-delete)
- MobileDeListing model: vehicle_id FK, ad_id, sync_status, synced_at, error_log
- 7 API endpoints: GET /vehicles (list+filter+sort+paginate), POST /vehicles (create), GET /vehicles/:id (detail), PUT /vehicles/:id (update), DELETE /vehicles/:id (soft-delete), POST /vehicles/:id/mobile-de/push (202 async), GET /vehicles/:id/mobile-de/status
- mobile.de service: push_listing, update_listing, delete_listing, get_listing_status, retry_failed_listing (max 3 retries)
- Field mapping: map_fields() converts Vehicle to mobile.de Ad format (vin, firstRegistration YYYY-MM, mileage, price EUR, power, category, bodyType, sellerLocation)
- All endpoints require JWT Bearer auth
- Config: MOBILE_DE_API_KEY, MOBILE_DE_SELLER_ID env vars added
## Frontend (COMPLETED)
- VehicleList: Table with filters (search, type, availability, sort), pagination, error handling
- VehicleForm: Create/edit form with validation (make, model, fin=17 chars, price>0, vehicle_type), conditional fields
- VehicleDetail: All vehicle fields display, delete button, MobileDeStatus embedded
- MobileDeStatus: Sync status badge, push button, ad_id, synced_at, error_log display
- 3 pages: fahrzeuge list, fahrzeuge/neu create, fahrzeuge/[id] detail
## Test Evidence
- Backend: 73/73 pytest passed, 82% total coverage (vehicle_service 99%, mobilede_service 80%, router 60%)
- Frontend: 16/16 vitest passed
- test_report.md updated with full results
- All mobile.de HTTP calls mocked in tests, no real API calls
- Soft-delete verified: deleted_at set, vehicle excluded from list and detail queries