1
0
forked from Yara724/api

YARA-1165

This commit is contained in:
SepehrYahyaee
2026-07-27 11:46:03 +03:30
parent c94dd27a96
commit 588a92c4b4
2 changed files with 20 additions and 15 deletions

View File

@@ -10817,11 +10817,6 @@ export class ClaimRequestManagementService {
const shebaNumber = claimCase.money?.sheba; const shebaNumber = claimCase.money?.sheba;
const nationalCode = claimCase.money?.nationalCodeOfInsurer; const nationalCode = claimCase.money?.nationalCodeOfInsurer;
if (!shebaNumber || !nationalCode) {
throw new BadRequestException(
"Bank information is missing on the claim. Complete run-inquiries for both parties first.",
);
}
const updatePayload: any = { const updatePayload: any = {
"damage.otherParts": otherParts.length > 0 ? otherParts : undefined, "damage.otherParts": otherParts.length > 0 ? otherParts : undefined,
@@ -10860,14 +10855,22 @@ export class ClaimRequestManagementService {
claimRequestId: updatedClaim._id.toString(), claimRequestId: updatedClaim._id.toString(),
publicId: updatedClaim.publicId, publicId: updatedClaim.publicId,
otherParts, otherParts,
shebaNumber: String(shebaNumber).replace( ...(shebaNumber
/^(.{4})(.*)(.{4})$/, ? {
"IR$1************$3", shebaNumber: String(shebaNumber).replace(
), /^(.{4})(.*)(.{4})$/,
nationalCodeOfOwner: String(nationalCode).replace( "IR$1************$3",
/^(.{2})(.*)(.{2})$/, ),
"$1******$3", }
), : {}),
...(nationalCode
? {
nationalCodeOfOwner: String(nationalCode).replace(
/^(.{2})(.*)(.{2})$/,
"$1******$3",
),
}
: {}),
currentStep: ClaimWorkflowStep.CAPTURE_PART_DAMAGES, currentStep: ClaimWorkflowStep.CAPTURE_PART_DAMAGES,
nextStep: ClaimWorkflowStep.UPLOAD_REQUIRED_DOCUMENTS, nextStep: ClaimWorkflowStep.UPLOAD_REQUIRED_DOCUMENTS,
message: message:

View File

@@ -106,14 +106,16 @@ export class SelectOtherPartsV2ResponseDto {
@ApiProperty({ @ApiProperty({
description: 'Sheba number (masked for security)', description: 'Sheba number (masked for security)',
example: 'IR12************1234', example: 'IR12************1234',
required: false,
}) })
shebaNumber: string; shebaNumber?: string;
@ApiProperty({ @ApiProperty({
description: 'National code of owner (masked)', description: 'National code of owner (masked)',
example: '12******90', example: '12******90',
required: false,
}) })
nationalCodeOfOwner: string; nationalCodeOfOwner?: string;
@ApiProperty({ @ApiProperty({
description: 'Current workflow step', description: 'Current workflow step',