done vehicle hull accessories

This commit is contained in:
2026-11-12 15:05:16 +03:30
parent cbdf4fd2bc
commit 7ab6b4c03d
8 changed files with 154 additions and 33 deletions
+9 -2
View File
@@ -155,7 +155,7 @@ The returned attachment Id is saved as fileId; it is not FileTypeId.
| Request field | Lookup/source | Current handling |
|---|---|---|
| DmgSections[].AccessoryKindId | car-components | Selected part ID, live checked |
| DmgSections[].VehicleHullAccessoryId | Current hull policy dmg-accessories | Exact `AccessoryKindId` (or caption) match on one policy row; Id+kind must stay coherent; no factory-bundle guess; block submit if missing |
| DmgSections[].VehicleHullAccessoryId | Current hull policy dmg-accessories | Exact `AccessoryKindId` (or caption) match on one policy row. If missing, use the policy «کليه قطعات فابريک» row `Id` (factory bundle) while keeping the selected car-components `AccessoryKindId` and part `Desc` |
| DmgSections[].DmgKindId | vehicle-hull-dmg-kind | Response row caption تخریب; live checked, no numeric fallback |
| DmgSections[].DmgSectionCosts[].DmgCostKindId | vehicle-hull-dmg-cost-kinds | Response row caption مجموع لوازم; live checked, no numeric fallback |
| ColorId | Policy vehicle GET ColorId | Inquiry-derived; not independently checked against a colour lookup |
@@ -173,7 +173,14 @@ Upstream source:
Use the row's Id for VehicleHullAccessoryId and that same row's AccessoryKindId.
Fanavaran rule `CarDamageBdAsibdideSectionLookupFilterRule` rejects pairing a
local car-components part id with an unrelated policy accessory Id (including
factory-bundle rows). If the policy list has no matching row, refuse submit.
factory-bundle rows).
`car-components` is the full part catalogue (frontend picker). Policy
`dmg-accessories` is only what that hull policy registered — often a single
«کليه قطعات فابريک» OEM/factory coverage line (AccessoryKindId e.g. 112), not
every tyre/cap/electrical part. Unlisted parts map to that factory row's `Id`
as `VehicleHullAccessoryId`, keep the selected car-components `AccessoryKindId`,
and keep `Desc` from the car-components Caption when available.
Hull has no damage-case POST. DmgCaseId, InspectionPlaceId and DropAmountStatus
are not hull expertise fields. AccidentPercent is a percentage, not a lookup ID.