add 4 new fields for expert approval

This commit is contained in:
SepehrYahyaee
2026-09-29 15:34:11 +03:30
parent b7a64596dd
commit 05e3e6a4d3
15 changed files with 1271 additions and 74 deletions
+27 -2
View File
@@ -187,13 +187,15 @@ export class ClaimDetailV2ResponseDto {
fileMakerRejectionCount?: number;
@ApiPropertyOptional({
description: "V5 only. Reason text from the most recent FileMaker rejection.",
description:
"V5 only. Reason text from the most recent FileMaker rejection.",
example: "قیمت نامعقول",
})
fileMakerRejectionReason?: string;
@ApiPropertyOptional({
description: "V5 only. ObjectId of the FileMaker who must approve (or has approved) this claim.",
description:
"V5 only. ObjectId of the FileMaker who must approve (or has approved) this claim.",
example: "6a43a2689faee3d20bf24030",
})
fileMakerApprovalActorId?: string;
@@ -222,6 +224,29 @@ export class ClaimDetailV2ResponseDto {
insuranceCorpId?: number;
};
@ApiPropertyOptional({
description:
"Expert-approved vehicle classification used for Fanavaran submissions.",
})
fanavaranVehicleReview?: {
vehicleGroup: { id: number; caption: string; name?: string };
vehicleUseType: { id: number; caption: string; vehicleGroupId?: number };
vehicleSystem: { id: number; caption: string; vehicleGroupId?: number };
vehicleKind: {
id: number;
caption: string;
vehicleGroupId?: number;
vehicleSystemId?: number;
vehicleSystemCaption?: string;
};
approved: boolean;
approvedAt: Date | string;
approvedByActorId: string;
approvedByActorName?: string;
approvedByRole: string;
version: number;
};
@ApiPropertyOptional({
description:
"Slice of `claim.evaluation` exposed to the damage expert. " +
@@ -0,0 +1,32 @@
import { ApiProperty } from "@nestjs/swagger";
import { Equals, IsInt, Min } from "class-validator";
export class ApproveFanavaranVehicleReviewDto {
@ApiProperty({ example: 1, description: "Fanavaran vehicle-groups Id" })
@IsInt()
@Min(1)
vehicleGroupId: number;
@ApiProperty({ example: 1, description: "Fanavaran vehicle-use-types Id" })
@IsInt()
@Min(1)
vehicleUseTypeId: number;
@ApiProperty({ example: 14, description: "Fanavaran vehicle-systems Id" })
@IsInt()
@Min(1)
vehicleSystemId: number;
@ApiProperty({ example: 7456, description: "Fanavaran vehicle-kinds Id" })
@IsInt()
@Min(1)
vehicleKindId: number;
@ApiProperty({
example: true,
description:
"Explicit consent that the expert reviewed these values and authorizes Fanavaran submission",
})
@Equals(true)
confirmed: true;
}