fix(claims): reuse saved Sheba across claim workflow steps

This commit is contained in:
SepehrYahyaee
2026-11-21 16:36:34 +03:30
parent be364d94fe
commit 90f290154c
10 changed files with 412 additions and 54 deletions
@@ -1,5 +1,5 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsArray, IsEnum, IsNotEmpty, IsOptional, IsString, Matches, Length, ArrayMaxSize } from 'class-validator';
import { IsArray, IsEnum, IsOptional, IsString, Matches, Length, ArrayMaxSize } from 'class-validator';
/**
* Enum for valid other (non-body) car parts that can be damaged
@@ -40,13 +40,13 @@ export class SelectOtherPartsV2Dto {
})
otherParts?: OtherCarPart[];
@ApiProperty({
description: 'Sheba number (IBAN). Accepted: IR + 24 digits OR only 24 digits',
@ApiPropertyOptional({
description: 'Sheba number (IBAN). Required only if not already saved on this claim. Accepted: IR + 24 digits OR only 24 digits',
example: 'IR123456789012345678901234',
})
@IsNotEmpty({ message: 'sheba is required' })
@IsOptional()
@IsString({ message: 'sheba must be a string' })
sheba: string;
sheba?: string;
@ApiPropertyOptional({
description: 'Legacy alias of sheba for backward compatibility',