forked from Yara724/api
Rollback uploadDocument step resume
This commit is contained in:
@@ -3263,6 +3263,7 @@ export class ExpertClaimService {
|
||||
) {
|
||||
if (actor.role !== RoleEnum.FIELD_EXPERT) requireActorClientKey(actor);
|
||||
const claim = await this.claimCaseDbService.findById(claimRequestId);
|
||||
const blame = await this.blameRequestDbService.findById(claim.blameRequestId);
|
||||
|
||||
if (!claim) {
|
||||
throw new NotFoundException(
|
||||
@@ -3303,6 +3304,14 @@ export class ExpertClaimService {
|
||||
);
|
||||
}
|
||||
|
||||
if (reply.carPrice && blame.type !== BlameRequestType.CAR_BODY) {
|
||||
throw new ForbiddenException("قیمت روز خودرو فقط در پرونده های بدنه باید بررسی شود")
|
||||
}
|
||||
|
||||
if (blame.type === BlameRequestType.THIRD_PARTY && reply.carPrice) {
|
||||
throw new ForbiddenException("قیمت روز خودرو فقط در پرونده های بدنه باید بررسی شود")
|
||||
}
|
||||
|
||||
const pricingValidationError = getExpertReplyPricingValidationError(
|
||||
reply.parts,
|
||||
{ locale: "fa", enforceAmountBounds: true },
|
||||
@@ -3531,6 +3540,7 @@ export class ExpertClaimService {
|
||||
"evaluation.ownerInsurerApproval": "",
|
||||
"evaluation.ownerPricedPartsApproval": "",
|
||||
},
|
||||
"vehicle.price": reply.carPrice,
|
||||
"workflow.currentStep": currentStep,
|
||||
"workflow.nextStep": nextWorkflowStep,
|
||||
[`evaluation.${replyField}`]: replyPayload,
|
||||
|
||||
Reference in New Issue
Block a user