forked from Yara724/api
Added case type for all GET APIs
This commit is contained in:
@@ -629,6 +629,7 @@ export class ExpertClaimService {
|
||||
*/
|
||||
private blameFileContextForExpert(blame: any): {
|
||||
blameRequestType?: BlameRequestType;
|
||||
creationMethod?: string;
|
||||
carBodyFirstForm?: { car?: boolean; object?: boolean };
|
||||
blameStatus?: string;
|
||||
} {
|
||||
@@ -636,9 +637,11 @@ export class ExpertClaimService {
|
||||
const blameRequestType = blame.type as BlameRequestType;
|
||||
const out: {
|
||||
blameRequestType?: BlameRequestType;
|
||||
creationMethod?: string;
|
||||
carBodyFirstForm?: { car?: boolean; object?: boolean };
|
||||
blameStatus?: string;
|
||||
} = { blameRequestType };
|
||||
if (blame.creationMethod) out.creationMethod = blame.creationMethod;
|
||||
out.blameStatus = blame.blameStatus;
|
||||
if (blameRequestType !== BlameRequestType.CAR_BODY) return out;
|
||||
|
||||
@@ -4017,7 +4020,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 status isMadeByFileMaker" },
|
||||
{ lean: true, select: "type creationMethod parties expert.decision blameStatus status isMadeByFileMaker" },
|
||||
)) as any[])
|
||||
: [];
|
||||
const blameById = new Map<string, any>(
|
||||
@@ -4117,7 +4120,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 status" },
|
||||
{ lean: true, select: "type creationMethod parties expert.decision blameStatus status" },
|
||||
)) as any[])
|
||||
: [];
|
||||
const blameById = new Map<string, any>(
|
||||
@@ -4212,7 +4215,7 @@ export class ExpertClaimService {
|
||||
{
|
||||
lean: true,
|
||||
select:
|
||||
"_id type parties blameStatus status expert.decision assignedFileReviewerId requiresFileMakerApproval",
|
||||
"_id type creationMethod parties blameStatus status expert.decision assignedFileReviewerId requiresFileMakerApproval",
|
||||
},
|
||||
)) as any[];
|
||||
|
||||
@@ -4303,7 +4306,7 @@ export class ExpertClaimService {
|
||||
|
||||
const makerBlames = (await this.blameRequestDbService.find(
|
||||
{ isMadeByFileMaker: true, initiatedByFieldExpertId: makerOid },
|
||||
{ lean: true, select: "_id type parties blameStatus status expert.decision assignedFileReviewerId requiresFileMakerApproval" },
|
||||
{ lean: true, select: "_id type creationMethod parties blameStatus status expert.decision assignedFileReviewerId requiresFileMakerApproval" },
|
||||
)) as any[];
|
||||
|
||||
if (makerBlames.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user