Add TejaratNo notifier review and submission validation

This commit is contained in:
SepehrYahyaee
2026-10-10 12:51:11 +03:30
parent a410655faa
commit 8f568f379c
14 changed files with 588 additions and 34 deletions
+13
View File
@@ -1,5 +1,8 @@
"use strict";
import { hasReviewedTejaratNotifier } from "src/fanavaran/tejarat-notifier";
import { resolveFanavaranClientKey } from "src/core/config/fanavaran-client.config";
import {
BadRequestException,
ConflictException,
@@ -4104,6 +4107,16 @@ export class ExpertClaimService {
actor,
)
: undefined;
if (
!hasReviewedTejaratNotifier(
fields?.review.values ?? claim.fanavaranFieldReview?.values,
resolveFanavaranClientKey(),
)
) {
throw new BadRequestException(
"نوع و نسبت اعلام‌کننده را پیش از تایید و ارسال پرونده انتخاب کنید.",
);
}
const [groupsRaw, useTypesRaw, systemsRaw, vehicleKind] = await Promise.all(
[
this.lookupsService.getClientRemoteLookup("vehicle-groups"),