1
0
forked from Yara724/api

main #1

Merged
s.yahyaee merged 9 commits from Yara724/api:main into main 2026-07-28 12:47:43 +03:30
2 changed files with 20 additions and 15 deletions
Showing only changes of commit 639e6ceebb - Show all commits

View File

@@ -10820,11 +10820,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,
@@ -10863,14 +10858,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',