Fix damaged vehicle identity across claim panels and price estimates

This commit is contained in:
SepehrYahyaee
2026-10-06 14:20:15 +03:30
parent b11128c638
commit 4564798db1
10 changed files with 375 additions and 199 deletions
+2
View File
@@ -73,6 +73,8 @@ Future frontend integration must keep these estimates visually separate from ent
- Vehicle identity comes from the **damaged party**, including historical third-party claims whose owner still points at the culprit. Approved Fanavaran vehicle classifications take precedence. The module never uses the third-party `FIRST` policy inquiry as a fallback for the damaged `SECOND` vehicle. Unresolved identity stays unknown.
- Each request explicitly scopes the assessment to **one damaged-party vehicle**. Other cars visible in photos, reflections, descriptions or detector hints are excluded from research, pricing and narrative. Ambiguous target photos require expert inspection rather than an estimate for another car. Missing blame records do not authorize using an unverified historical owner's vehicle; a persisted beneficiary's party snapshot or verified owner vehicle can still supply the target.
- Expert claim lists/detail responses and price estimation share vehicle identity resolution. Body classes such as `sedan` are never names or variants, and manufacturing years stay separate from variants. Each inquiry is scoped to its party; no unconditional `FIRST` fallback is used. Conflicting legacy aliases (for example FAW versus Saipa/111SE) retain the primary inquiry name, omit the unverified variant and add an estimation warning until an expert approves consistent system/kind values. The disabled-inquiry fixture now uses coherent FAW aliases with an unknown variant; this does not rewrite existing cases or fabricate missing real vehicle details.
- Claim detail responses expose `vehiclePartyRole` (`FIRST`/`SECOND`) when the damaged party can be resolved. The expert panel uses it to apply approved system/kind corrections to that party only; the other vehicle keeps its own inquiry identity.
- Current market value precedence is request value → expert `fanavaranFieldReview.values.VehicleCurrentValue` → live market research. Insured vehicle value, where known, is labeled historical policy context.
- Current outer parts and other damaged parts are included. Removed-part history and its photos are excluded. Newly added parts without photos remain present with warnings. Car-angle images supplement damage photos.
- At most 40 parts, 12 images, 10 MiB per image and 24 MiB total raw image bytes. Only JPEG/PNG/WebP are supported; missing/unsupported/over-limit images are skipped with warnings. The source content hash is frozen at request time and rechecked during processing; replacement images never receive an old snapshot's result.