1
0
forked from Yara724/api
This commit is contained in:
SepehrYahyaee
2026-04-26 09:16:58 +03:30
parent 9854a58282
commit 6c2d178686
2 changed files with 23 additions and 4 deletions

View File

@@ -352,6 +352,15 @@ export class ExpertBlameService {
const workflow = (doc.workflow ?? {}) as Record<string, unknown>;
const parties = (doc.parties ?? []) as Array<{
role?: string;
vehicle?: {
name?: string;
inquiry?: {
mapped?: {
MapTypNam?: string;
CarName?: string;
};
};
};
statement?: {
admitsGuilt?: boolean;
claimsDamage?: boolean;
@@ -381,8 +390,19 @@ export class ExpertBlameService {
firstParty: statementToFormKey(firstParty?.statement) ?? "",
secondParty: statementToFormKey(secondParty?.statement) ?? "",
},
firstPartyVehicle: doc.parties[0]?.person?.vehicle?.name,
secondPartyVehicle: doc.parties[1]?.person?.vehicle?.name,
partiesVehicles: {
firstPartyVehicle:
firstParty?.vehicle?.name ||
firstParty?.vehicle?.inquiry?.mapped?.MapTypNam ||
firstParty?.vehicle?.inquiry?.mapped?.CarName ||
"",
secondPartyVehicle:
secondParty?.vehicle?.name ||
secondParty?.vehicle?.inquiry?.mapped?.MapTypNam ||
secondParty?.vehicle?.inquiry?.mapped?.CarName ||
"",
}
};
}