forked from Yara724/api
Fixed lock mechanism, and some resendItem types
This commit is contained in:
@@ -6446,6 +6446,29 @@ export class RequestManagementService {
|
||||
"workflow.completedSteps": "WAITING_FOR_SIGNATURES",
|
||||
},
|
||||
});
|
||||
|
||||
if (updatedRequest.type === BlameRequestType.THIRD_PARTY) {
|
||||
const guiltyPartyId = updatedRequest.expert?.decision?.guiltyPartyId
|
||||
? String(updatedRequest.expert.decision.guiltyPartyId)
|
||||
: null;
|
||||
if (guiltyPartyId) {
|
||||
const damagedParty = updatedRequest.parties?.find(
|
||||
(p) => p.person?.userId && String(p.person.userId) !== guiltyPartyId,
|
||||
);
|
||||
const phone = damagedParty?.person?.phoneNumber?.trim();
|
||||
if (phone) {
|
||||
const publicId = String(updatedRequest.publicId);
|
||||
const link = this.smsOrchestrationService.buildClaimLink(requestId);
|
||||
await this.smsOrchestrationService.sendThirdPartyDamagedPartyClaimLinkNotice(
|
||||
{
|
||||
receptor: phone,
|
||||
publicId,
|
||||
link,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
finalStatus = CaseStatus.STOPPED;
|
||||
message =
|
||||
|
||||
Reference in New Issue
Block a user