forked from Yara724/api
Merge pull request 'YARA-1165' (#223) from s.yahyaee/yara724-api:main into main
Reviewed-on: Yara724/api#223
This commit is contained in:
@@ -10820,11 +10820,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,
|
||||
@@ -10863,14 +10858,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