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

@@ -117,8 +117,7 @@ export class AllRequestDtoV2 {
type: string; type: string;
blameStatus: string; blameStatus: string;
partiesInitialForms: { firstParty: string; secondParty: string }; partiesInitialForms: { firstParty: string; secondParty: string };
firstPartyVehicle: string; partiesVehicles: { firstPartyVehicle: string; secondPartyVehicle: string };
secondPartyVehicle?: string;
} }
export class AllRequestDtoRsV2 { export class AllRequestDtoRsV2 {

View File

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