forked from Yara724/api
Fix async error
This commit is contained in:
@@ -4353,7 +4353,10 @@ export class ExpertClaimService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** V2 price-drop: claim locked by this expert during damage assessment. */
|
/** V2 price-drop: claim locked by this expert during damage assessment. */
|
||||||
private assertExpertCanEditClaimDuringReviewV2(claim: any, actor: any): void {
|
private async assertExpertCanEditClaimDuringReviewV2(
|
||||||
|
claim: any,
|
||||||
|
actor: any,
|
||||||
|
): Promise<void> {
|
||||||
if (actor.role !== RoleEnum.FIELD_EXPERT) requireActorClientKey(actor);
|
if (actor.role !== RoleEnum.FIELD_EXPERT) requireActorClientKey(actor);
|
||||||
await this.assertExpertActorOnClaim(claim, actor);
|
await this.assertExpertActorOnClaim(claim, actor);
|
||||||
if (claim.status !== ClaimCaseStatus.EXPERT_REVIEWING) {
|
if (claim.status !== ClaimCaseStatus.EXPERT_REVIEWING) {
|
||||||
@@ -4379,7 +4382,7 @@ export class ExpertClaimService {
|
|||||||
if (!claim) {
|
if (!claim) {
|
||||||
throw new NotFoundException("Claim request not found");
|
throw new NotFoundException("Claim request not found");
|
||||||
}
|
}
|
||||||
this.assertExpertCanEditClaimDuringReviewV2(claim, actor);
|
await this.assertExpertCanEditClaimDuringReviewV2(claim, actor);
|
||||||
|
|
||||||
const carType = claim.vehicle?.carType as ClaimVehicleTypeV2 | undefined;
|
const carType = claim.vehicle?.carType as ClaimVehicleTypeV2 | undefined;
|
||||||
const selectedNorm = normalizeDamageSelectedParts(
|
const selectedNorm = normalizeDamageSelectedParts(
|
||||||
@@ -4433,7 +4436,7 @@ export class ExpertClaimService {
|
|||||||
if (!claim) {
|
if (!claim) {
|
||||||
throw new NotFoundException("Claim request not found");
|
throw new NotFoundException("Claim request not found");
|
||||||
}
|
}
|
||||||
this.assertExpertCanEditClaimDuringReviewV2(claim, actor);
|
await this.assertExpertCanEditClaimDuringReviewV2(claim, actor);
|
||||||
|
|
||||||
const vehicleSet: Record<string, string> = {};
|
const vehicleSet: Record<string, string> = {};
|
||||||
if (body.carName != null && String(body.carName).trim()) {
|
if (body.carName != null && String(body.carName).trim()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user