feat(trade-in): TI-3 frontend /trade-in page + 5 components + hooks #317

Merged
lekss361 merged 1 commit from feat/ti-3-frontend into main 2026-05-17 16:58:54 +00:00

1 commit

Author SHA1 Message Date
lekss361
7fa93f825c feat(trade-in): TI-3 frontend /trade-in page + 5 components + hooks
- types/trade-in.ts: TradeInEstimateInput, AggregatedEstimate, AnalogLot
- lib/trade-in-api.ts: useEstimateMutation (POST) + useEstimate (GET)
- EstimateForm: controlled form with validation, required fields, optional fields
- EstimateResult: hero price card, PriceRangeBar, 4 sections (cover/listings/deals/trade-in placeholder)
- AnalogsTable: sortable table with photo fallback, safeUrl XSS guard
- PriceRangeBar: horizontal scale with median marker
- EstimateProgress: inline spinner
- page.tsx: 2-col sticky layout, mobile-responsive, URL persistence via ?id=

Backend uses mock data (realistic EKB prices). PDF button disabled (coming TI-2).
Depends on TI-1 (PR #316).
Closes #314 (TI-3 sub-task).
2026-05-17 19:54:11 +03:00