YARA-1218

This commit is contained in:
SepehrYahyaee
2026-08-09 14:08:11 +03:30
parent d4cd8c9343
commit 8e4c794d61
3 changed files with 29 additions and 0 deletions

View File

@@ -89,6 +89,16 @@ export class RunInquiriesV3Dto {
@IsOptional() @IsOptional()
@IsString() @IsString()
insurerLicense?: string; insurerLicense?: string;
@ApiPropertyOptional({
example: "1",
description:
"Driving licence type code from GET /lookups/driving-licence-types. " +
"Optional — used in V4 FileMaker flow.",
})
@IsOptional()
@IsString()
licenseType?: string;
} }
/** /**
@@ -152,4 +162,14 @@ export class RunInquiriesVinV3Dto {
@IsOptional() @IsOptional()
@IsString() @IsString()
insurerLicense?: string; insurerLicense?: string;
@ApiPropertyOptional({
example: "1",
description:
"Driving licence type code from GET /lookups/driving-licence-types. " +
"Optional — used in V4 FileMaker flow.",
})
@IsOptional()
@IsString()
licenseType?: string;
} }

View File

@@ -23,6 +23,8 @@ export class Person {
@Prop() nationalCodeOfDriver?: string; @Prop() nationalCodeOfDriver?: string;
@Prop() insurerLicense?: string; @Prop() insurerLicense?: string;
@Prop() driverLicense?: string; @Prop() driverLicense?: string;
/** Driving licence type code from the Fanavaran lookup (GET /lookups/driving-licence-types). */
@Prop() licenseType?: string;
@Prop({ type: Boolean }) @Prop({ type: Boolean })
driverIsInsurer?: boolean; driverIsInsurer?: boolean;

View File

@@ -8690,6 +8690,8 @@ export class RequestManagementService {
party.person.insurerLicense = partyData.insurerLicense; party.person.insurerLicense = partyData.insurerLicense;
if (partyData.driverLicense) if (partyData.driverLicense)
party.person.driverLicense = partyData.driverLicense; party.person.driverLicense = partyData.driverLicense;
if ((partyData as any).licenseType)
(party.person as any).licenseType = (partyData as any).licenseType;
if (!party.vehicle) party.vehicle = {} as any; if (!party.vehicle) party.vehicle = {} as any;
party.vehicle.plateId = this.plateToPlateIdString(partyData.plate); party.vehicle.plateId = this.plateToPlateIdString(partyData.plate);
@@ -9502,6 +9504,8 @@ export class RequestManagementService {
party.person.insurerLicense = partyData.insurerLicense; party.person.insurerLicense = partyData.insurerLicense;
if (partyData.driverLicense) if (partyData.driverLicense)
party.person.driverLicense = partyData.driverLicense; party.person.driverLicense = partyData.driverLicense;
if ((partyData as any).licenseType)
(party.person as any).licenseType = (partyData as any).licenseType;
if (!party.vehicle) party.vehicle = {} as any; if (!party.vehicle) party.vehicle = {} as any;
party.vehicle.plateId = partyData.vin; // store VIN as vehicle identifier party.vehicle.plateId = partyData.vin; // store VIN as vehicle identifier
@@ -11117,6 +11121,7 @@ export class RequestManagementService {
clientId: p.person?.clientId clientId: p.person?.clientId
? String(p.person.clientId) ? String(p.person.clientId)
: undefined, : undefined,
licenseType: p.person?.licenseType ?? undefined,
}, },
insurance: p.insurance insurance: p.insurance
? { ? {
@@ -11211,6 +11216,7 @@ export class RequestManagementService {
driverIsInsurer: p.person?.driverIsInsurer, driverIsInsurer: p.person?.driverIsInsurer,
userId: p.person?.userId ? String(p.person.userId) : undefined, userId: p.person?.userId ? String(p.person.userId) : undefined,
clientId: p.person?.clientId ? String(p.person.clientId) : undefined, clientId: p.person?.clientId ? String(p.person.clientId) : undefined,
licenseType: p.person?.licenseType ?? undefined,
}, },
insurance: p.insurance ? { insurance: p.insurance ? {
company: p.insurance.company, company: p.insurance.company,
@@ -11317,6 +11323,7 @@ export class RequestManagementService {
driverIsInsurer: p.person?.driverIsInsurer, driverIsInsurer: p.person?.driverIsInsurer,
userId: p.person?.userId ? String(p.person.userId) : undefined, userId: p.person?.userId ? String(p.person.userId) : undefined,
clientId: p.person?.clientId ? String(p.person.clientId) : undefined, clientId: p.person?.clientId ? String(p.person.clientId) : undefined,
licenseType: p.person?.licenseType ?? undefined,
}, },
insurance: p.insurance ? { insurance: p.insurance ? {
company: p.insurance.company, company: p.insurance.company,