forked from Yara724/api
Fixed reviewer flow
This commit is contained in:
@@ -3891,7 +3891,7 @@ export class ExpertClaimService {
|
||||
blameIds.length > 0
|
||||
? ((await this.blameRequestDbService.find(
|
||||
{ _id: { $in: blameIds.map((id) => new Types.ObjectId(id)) } },
|
||||
{ lean: true, select: "type parties expert.decision blameStatus" },
|
||||
{ lean: true, select: "type parties expert.decision blameStatus status isMadeByFileMaker" },
|
||||
)) as any[])
|
||||
: [];
|
||||
const blameById = new Map<string, any>(
|
||||
@@ -4027,7 +4027,9 @@ export class ExpertClaimService {
|
||||
createdAt: c.createdAt,
|
||||
awaitingFactorValidation: claimIsAwaitingExpertFactorValidationV2(c),
|
||||
needsFileReviewerCompletion:
|
||||
String(blame?.status ?? "") === "WAITING_FOR_FILE_REVIEWER",
|
||||
String(blame?.status ?? "") === "WAITING_FOR_FILE_REVIEWER" ||
|
||||
(!!blame?.isMadeByFileMaker &&
|
||||
String(blame?.status ?? "") === "WAITING_FOR_EXPERT"),
|
||||
};
|
||||
}) as ClaimListItemV2Dto[];
|
||||
|
||||
@@ -4140,7 +4142,9 @@ export class ExpertClaimService {
|
||||
createdAt: c.createdAt,
|
||||
awaitingFactorValidation: claimIsAwaitingExpertFactorValidationV2(c),
|
||||
needsFileReviewerCompletion:
|
||||
String(blame?.status ?? "") === "WAITING_FOR_FILE_REVIEWER",
|
||||
String(blame?.status ?? "") === "WAITING_FOR_FILE_REVIEWER" ||
|
||||
(!!blame?.isMadeByFileMaker &&
|
||||
String(blame?.status ?? "") === "WAITING_FOR_EXPERT"),
|
||||
assignedToMe: !!assignedToMe,
|
||||
};
|
||||
}) as ClaimListItemV2Dto[];
|
||||
@@ -4212,7 +4216,9 @@ export class ExpertClaimService {
|
||||
createdAt: c.createdAt,
|
||||
awaitingFactorValidation: claimIsAwaitingExpertFactorValidationV2(c),
|
||||
needsFileReviewerCompletion:
|
||||
String(blame?.status ?? "") === "WAITING_FOR_FILE_REVIEWER",
|
||||
String(blame?.status ?? "") === "WAITING_FOR_FILE_REVIEWER" ||
|
||||
(!!blame?.isMadeByFileMaker &&
|
||||
String(blame?.status ?? "") === "WAITING_FOR_EXPERT"),
|
||||
assignedFileReviewerId: blame?.assignedFileReviewerId
|
||||
? String(blame.assignedFileReviewerId)
|
||||
: undefined,
|
||||
|
||||
Reference in New Issue
Block a user