1
0
forked from Yara724/api

Fixed lock mechanism, and some resendItem types

This commit is contained in:
SepehrYahyaee
2026-04-26 15:58:21 +03:30
parent b5b3b722c6
commit 885678df7d
7 changed files with 188 additions and 193 deletions

View File

@@ -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 =