fixed branch being mandatory

This commit is contained in:
SepehrYahyaee
2026-09-12 10:18:17 +03:30
parent 55da8188a9
commit ebe45646c1
7 changed files with 209 additions and 1 deletions

View File

@@ -116,6 +116,7 @@ import {
} from "src/helpers/tenant-scope";
import { resolveLinkedUserIdStrings } from "src/helpers/user-access-resolver";
import { normalizePlateText } from "src/utils/plate-normalizer/plate-normalizer.service";
import { fanavaranClaimReferences } from "src/claim-request-management/fanavaran-claim-references";
/**
* Formats a compact Jalali date (number or string like 13780624) as YYYY/MM/DD.
@@ -11530,10 +11531,15 @@ export class RequestManagementService {
parties: (plain.parties ?? []).map((p: any) => ({
role: p.role,
person: {
fullName: p.person?.fullName,
phoneNumber: p.person?.phoneNumber,
nationalCodeOfInsurer: p.person?.nationalCodeOfInsurer,
nationalCodeOfDriver: p.person?.nationalCodeOfDriver,
driverIsInsurer: p.person?.driverIsInsurer,
insurerBirthday: p.person?.insurerBirthday,
driverBirthday: p.person?.driverBirthday,
insurerLicense: p.person?.insurerLicense,
driverLicense: p.person?.driverLicense,
userId: p.person?.userId ? String(p.person.userId) : undefined,
clientId: p.person?.clientId ? String(p.person.clientId) : undefined,
licenseType: p.person?.licenseType ?? undefined,
@@ -11547,6 +11553,7 @@ export class RequestManagementService {
} : undefined,
vehicle: p.vehicle ? {
plateId: p.vehicle.plateId,
vin: p.vehicle.vin,
name: p.vehicle.name,
type: p.vehicle.type,
} : undefined,
@@ -11557,6 +11564,8 @@ export class RequestManagementService {
...(claimPlain ? {
claimStatus: claimPlain.status,
claimWorkflow: claimPlain.workflow,
money: claimPlain.money ?? null,
fanavaran: fanavaranClaimReferences(claimPlain),
fileMakerRejectionCount: claimPlain.fileMakerRejectionCount ?? 0,
fileMakerRejectionReason: claimPlain.fileMakerRejectionReason ?? null,
evaluation: claimPlain.evaluation
@@ -11682,10 +11691,15 @@ export class RequestManagementService {
parties: (plain.parties ?? []).map((p: any) => ({
role: p.role,
person: {
fullName: p.person?.fullName,
phoneNumber: p.person?.phoneNumber,
nationalCodeOfInsurer: p.person?.nationalCodeOfInsurer,
nationalCodeOfDriver: p.person?.nationalCodeOfDriver,
driverIsInsurer: p.person?.driverIsInsurer,
insurerBirthday: p.person?.insurerBirthday,
driverBirthday: p.person?.driverBirthday,
insurerLicense: p.person?.insurerLicense,
driverLicense: p.person?.driverLicense,
userId: p.person?.userId ? String(p.person.userId) : undefined,
clientId: p.person?.clientId ? String(p.person.clientId) : undefined,
licenseType: p.person?.licenseType ?? undefined,
@@ -11699,6 +11713,7 @@ export class RequestManagementService {
} : undefined,
vehicle: p.vehicle ? {
plateId: p.vehicle.plateId,
vin: p.vehicle.vin,
name: p.vehicle.name,
type: p.vehicle.type,
} : undefined,
@@ -11719,6 +11734,8 @@ export class RequestManagementService {
...(claimPlain ? {
claimStatus: claimPlain.status,
claimWorkflow: claimPlain.workflow,
money: claimPlain.money ?? null,
fanavaran: fanavaranClaimReferences(claimPlain),
fileMakerRejectionCount: claimPlain.fileMakerRejectionCount ?? 0,
fileMakerRejectionReason: claimPlain.fileMakerRejectionReason ?? null,
evaluation: claimPlain.evaluation