Fixed FileMaker and FileReviewer access to COMPLETED files

This commit is contained in:
2026-09-01 21:54:04 +03:30
parent ae49031c55
commit cf74d75146
7 changed files with 128 additions and 2 deletions

View File

@@ -163,6 +163,16 @@ export class ClaimDetailV2ResponseDto {
})
fileMakerApprovalActorId?: string;
@ApiPropertyOptional({
description:
"Fanavaran claim reference. Returned only after the local claim reaches COMPLETED and Fanavaran has supplied at least one reference.",
example: { claimNo: 123456, claimId: 987654 },
})
fanavaran?: {
claimNo?: number;
claimId?: number;
};
@ApiPropertyOptional({
description:
"Slice of `claim.evaluation` exposed to the damage expert. " +

View File

@@ -5141,6 +5141,14 @@ export class ExpertClaimService {
fileMakerApprovalActorId: (claim as any).fileMakerApprovalActorId
? String((claim as any).fileMakerApprovalActorId)
: undefined,
fanavaran:
claim.status === ClaimCaseStatus.COMPLETED &&
(claim.claimNo != null || claim.claimId != null)
? {
claimNo: claim.claimNo,
claimId: claim.claimId,
}
: undefined,
evaluation:
(evaluationForApi as
| ClaimDetailV2ResponseDto["evaluation"]

View File

@@ -166,7 +166,7 @@ export class ExpertClaimV2Controller {
@ApiOperation({
summary: "Get claim request detail for damage expert",
description:
"Returns full claim details including captured images, required documents, damage selections, `evaluation.priceDrop` (included whenever saved, regardless of current status), `videoCapture` (from claim-video-capture via media.videoCaptureId), and `blameCase` (linked blameCases document with party video/voice URLs like expert-blame detail). `evaluation.damageExpertReply` / `damageExpertReplyFinal` are always returned once submitted. Allowed when status is WAITING_FOR_DAMAGE_EXPERT (if locked, only the locking expert) or when awaiting factor validation.",
"Returns full claim details including captured images, required documents, damage selections, `evaluation.priceDrop` (included whenever saved, regardless of current status), `videoCapture` (from claim-video-capture via media.videoCaptureId), and `blameCase` (linked blameCases document with party video/voice URLs like expert-blame detail). `evaluation.damageExpertReply` / `damageExpertReplyFinal` are always returned once submitted. Completed claims include Fanavaran `claimNo` / `claimId` when available. Allowed when status is WAITING_FOR_DAMAGE_EXPERT (if locked, only the locking expert) or when awaiting factor validation.",
})
@ApiParam({ name: "claimRequestId" })
async getClaimDetailV2(