Fix data returning owner on claimDetails

This commit is contained in:
2026-04-30 13:30:58 +03:30
parent a9846095c1
commit 40606fecf1
2 changed files with 10 additions and 2 deletions

View File

@@ -5439,6 +5439,10 @@ export class ClaimRequestManagementService {
const ownerData = claim.owner
? {
userId: claim.owner.userId?.toString(),
clientId: claim.owner.clientId?.toString(),
...(claim.owner.userClientKey
? { userClientKey: claim.owner.userClientKey.toString() }
: {}),
fullName: claim.owner.fullName,
}
: undefined;
@@ -5467,7 +5471,7 @@ export class ClaimRequestManagementService {
nextStep: claim.workflow?.nextStep,
blameRequestId: claim.blameRequestId?.toString(),
blameRequestNo: claim.blameRequestNo,
...(isExpertViewer ? { owner: ownerData } : {}),
...(ownerData ? { owner: ownerData } : {}),
vehicle: claim.vehicle,
selectedParts: claim.damage?.selectedParts,
otherParts: claim.damage?.otherParts,

View File

@@ -43,9 +43,13 @@ export class ClaimDetailsV2ResponseDto {
@ApiPropertyOptional({ description: 'Blame request number' })
blameRequestNo?: string;
@ApiPropertyOptional({ description: 'Owner info' })
@ApiPropertyOptional({
description: 'Claim owner (damaged party): ids for the user and their insurer client scope',
})
owner?: {
userId: string;
clientId?: string;
userClientKey?: string;
fullName?: string;
};