1
0
forked from Yara724/api

YARA-1117 and fixed completed status after in person visit has been called

This commit is contained in:
SepehrYahyaee
2026-07-14 11:51:52 +03:30
parent 4aa6e03afb
commit 168e52a475
6 changed files with 92 additions and 54 deletions

View File

@@ -10533,7 +10533,8 @@ export class ClaimRequestManagementService {
`Claim case with ID ${claimRequestId} not found`,
);
}
await this.assertV3InPersonClaim(claimCase);
const blame = await this.assertV3InPersonClaim(claimCase);
const skipMetalPlate = !!(blame as any).isMadeByFileMaker;
if (!fileDetail) {
throw new BadRequestException("Video file is required.");
@@ -10553,7 +10554,7 @@ export class ClaimRequestManagementService {
);
}
const captureProgress = getClaimCaptureProgress(claimCase);
const captureProgress = getClaimCaptureProgress(claimCase, { skipMetalPlate });
if (!captureProgress.partsComplete) {
throw new BadRequestException(
"Upload photos for all selected damaged parts before the walk-around video.",
@@ -10564,9 +10565,11 @@ export class ClaimRequestManagementService {
"Capture all four car angles before the walk-around video.",
);
}
if (!isClaimCaptureStepComplete(claimCase)) {
if (!isClaimCaptureStepComplete(claimCase, { skipMetalPlate })) {
throw new BadRequestException(
"Upload capture-phase vehicle documents (chassis, engine, metal plate) before the walk-around video.",
skipMetalPlate
? "Upload capture-phase vehicle documents (chassis and engine) before the walk-around video."
: "Upload capture-phase vehicle documents (chassis, engine, metal plate) before the walk-around video.",
);
}