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
+1 -1
View File
@@ -142,7 +142,7 @@ Not ثالث GEN.08: no `DmgCaseId`, `InspectionPlaceId`, `RepairWage` on the ro
| DmgSections[].WasteValue | داغی ردیف | number | **no** | **user** |
| DmgSections[].AccessoryKindId | نوع قطعه کاتالوگ | number | preferred | **user** `partId` · lookup `car-components` |
| DmgSections[].DmgKindId | نوع آسیب بدنه | number | **no** | Current `vehicle-hull-dmg-kind` API row caption تخریب; no numeric fallback |
| DmgSections[].VehicleHullAccessoryId | شناسه لوازم بدنه | number | **no** | Current policy `dmg-accessories` only: exact `AccessoryKindId` or caption match on the same row; **never** invent a factory-bundle Id. Block submit if unresolved |
| DmgSections[].VehicleHullAccessoryId | شناسه لوازم بدنه | number | preferred | Current policy `dmg-accessories`: exact `AccessoryKindId` or caption match; else the «کليه قطعات فابريک» factory-bundle row `Id`. Keep selected car-components `AccessoryKindId` + part `Desc` |
| DmgSections[].DmgSectionCosts[].Caption | عنوان هزینه | string | **no** | **user** label |
| DmgSections[].DmgSectionCosts[].Amount | مبلغ (قطعه+اجرت) | number | **no** | **user** |
| DmgSections[].DmgSectionCosts[].DmgCostKindId | نوع هزینه | number | **no** | Current `vehicle-hull-dmg-cost-kinds` API row caption مجموع لوازم; no numeric fallback |
+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.