forked from Yara724/api
Add TejaratNo notifier review and submission validation
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user