forked from Yara724/api
Fix data returning owner on claimDetails
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user