forked from Yara724/api
YARA-1165
This commit is contained in:
@@ -10817,11 +10817,6 @@ export class ClaimRequestManagementService {
|
||||
|
||||
const shebaNumber = claimCase.money?.sheba;
|
||||
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 = {
|
||||
"damage.otherParts": otherParts.length > 0 ? otherParts : undefined,
|
||||
@@ -10860,14 +10855,22 @@ export class ClaimRequestManagementService {
|
||||
claimRequestId: updatedClaim._id.toString(),
|
||||
publicId: updatedClaim.publicId,
|
||||
otherParts,
|
||||
shebaNumber: String(shebaNumber).replace(
|
||||
/^(.{4})(.*)(.{4})$/,
|
||||
"IR$1************$3",
|
||||
),
|
||||
nationalCodeOfOwner: String(nationalCode).replace(
|
||||
/^(.{2})(.*)(.{2})$/,
|
||||
"$1******$3",
|
||||
),
|
||||
...(shebaNumber
|
||||
? {
|
||||
shebaNumber: String(shebaNumber).replace(
|
||||
/^(.{4})(.*)(.{4})$/,
|
||||
"IR$1************$3",
|
||||
),
|
||||
}
|
||||
: {}),
|
||||
...(nationalCode
|
||||
? {
|
||||
nationalCodeOfOwner: String(nationalCode).replace(
|
||||
/^(.{2})(.*)(.{2})$/,
|
||||
"$1******$3",
|
||||
),
|
||||
}
|
||||
: {}),
|
||||
currentStep: ClaimWorkflowStep.CAPTURE_PART_DAMAGES,
|
||||
nextStep: ClaimWorkflowStep.UPLOAD_REQUIRED_DOCUMENTS,
|
||||
message:
|
||||
|
||||
@@ -106,14 +106,16 @@ export class SelectOtherPartsV2ResponseDto {
|
||||
@ApiProperty({
|
||||
description: 'Sheba number (masked for security)',
|
||||
example: 'IR12************1234',
|
||||
required: false,
|
||||
})
|
||||
shebaNumber: string;
|
||||
shebaNumber?: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'National code of owner (masked)',
|
||||
example: '12******90',
|
||||
required: false,
|
||||
})
|
||||
nationalCodeOfOwner: string;
|
||||
nationalCodeOfOwner?: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Current workflow step',
|
||||
|
||||
Reference in New Issue
Block a user