forked from Yara724/api
add 4 new fields for expert approval
This commit is contained in:
@@ -52,6 +52,7 @@ import { FactorValidationV2Dto } from "./dto/factor-validation.dto";
|
||||
import { ClaimRequestManagementService } from "src/claim-request-management/claim-request-management.service";
|
||||
import { OuterPartCatalogItemDto } from "src/claim-request-management/dto/select-outer-parts-v2.dto";
|
||||
import { submitExpertReplyValidationPipe } from "./pipes/submit-expert-reply-validation.pipe";
|
||||
import { ApproveFanavaranVehicleReviewDto } from "./dto/fanavaran-vehicle-review.dto";
|
||||
|
||||
class InPersonVisitV2Dto {
|
||||
@ApiPropertyOptional({ example: "Paint damage requires physical inspection" })
|
||||
@@ -181,6 +182,48 @@ export class ExpertClaimV2Controller {
|
||||
);
|
||||
}
|
||||
|
||||
@Get("request/:claimRequestId/fanavaran-vehicle-options")
|
||||
@ApiOperation({
|
||||
summary: "Get compatible Fanavaran vehicle classification options",
|
||||
description:
|
||||
"Returns active vehicle groups and, after vehicleGroupId is supplied, only compatible use types and systems.",
|
||||
})
|
||||
@ApiQuery({ name: "vehicleGroupId", required: false, type: Number })
|
||||
async getFanavaranVehicleOptionsV2(
|
||||
@Param("claimRequestId") claimRequestId: string,
|
||||
@CurrentUser() actor: any,
|
||||
@Query("vehicleGroupId") vehicleGroupId?: string,
|
||||
) {
|
||||
const parsed =
|
||||
vehicleGroupId != null && vehicleGroupId !== ""
|
||||
? Number(vehicleGroupId)
|
||||
: undefined;
|
||||
return this.expertClaimService.getFanavaranVehicleOptionsV2(
|
||||
claimRequestId,
|
||||
actor,
|
||||
parsed,
|
||||
);
|
||||
}
|
||||
|
||||
@Put("request/:claimRequestId/fanavaran-vehicle-review")
|
||||
@ApiOperation({
|
||||
summary: "Validate and approve the vehicle data used for Fanavaran",
|
||||
description:
|
||||
"Validates all four IDs against active Fanavaran lookups and their relationships, stores an audit snapshot, and releases deferred Fanavaran stages.",
|
||||
})
|
||||
@ApiBody({ type: ApproveFanavaranVehicleReviewDto })
|
||||
async approveFanavaranVehicleReviewV2(
|
||||
@Param("claimRequestId") claimRequestId: string,
|
||||
@Body() body: ApproveFanavaranVehicleReviewDto,
|
||||
@CurrentUser() actor: any,
|
||||
) {
|
||||
return this.expertClaimService.approveFanavaranVehicleReviewV2(
|
||||
claimRequestId,
|
||||
body,
|
||||
actor,
|
||||
);
|
||||
}
|
||||
|
||||
@Get("request/:claimRequestId/price-drop")
|
||||
@ApiOperation({
|
||||
summary: "Price-drop context for manual expert entry (V2)",
|
||||
|
||||
Reference in New Issue
Block a user