fix(fanavaran): preserve assessed part ids in hull expertise

Use each saved expert-reply partId as AccessoryKindId and preserve its label. Resolve policy coverage separately so factory-bundle and caption matches cannot overwrite the selected part identity. Add coverage for the six-part expert reply and document the mapping.
This commit is contained in:
2026-11-21 14:45:31 +03:30
parent 7bff702514
commit 61ef4faaf4
5 changed files with 89 additions and 31 deletions
+2 -2
View File
@@ -152,9 +152,9 @@ Not ثالث GEN.08: no `DmgCaseId`, `InspectionPlaceId`, `RepairWage` on the ro
| AccidentPercent | درصد حادثه | number | yes | null |
| TheftCases | موارد سرقت | array | empty `[]` | system |
| DmgSections[].Count | تعداد | number | **no** | **system** `1` |
| DmgSections[].Desc | شرح قطعه | string | **no** | **user** part label |
| DmgSections[].Desc | شرح قطعه | string | **no** | Saved expert-reply part label (`carPartDamage.label_fa`) |
| DmgSections[].WasteValue | داغی ردیف | number | **no** | **user** |
| DmgSections[].AccessoryKindId | نوع قطعه کاتالوگ | number | preferred | **user** `partId` · lookup `car-components` |
| DmgSections[].AccessoryKindId | نوع قطعه کاتالوگ | number | preferred | Saved `evaluation.damageExpertReply.parts[].partId`, passed through directly; policy matching and factory bundles must never replace it |
| DmgSections[].DmgKindId | نوع آسیب بدنه | number | **no** | Current `vehicle-hull-dmg-kind` API row caption تخریب; no numeric fallback |
| 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 |