forked from Yara724/api
Fixed type fixes and errors
This commit is contained in:
@@ -1950,7 +1950,7 @@ export class RequestManagementService {
|
||||
(body.driverIsInsurer ? String(body.insurerBirthday) : null);
|
||||
|
||||
if (!party.vehicle) party.vehicle = {} as any;
|
||||
party.vehicle.isNew = body.isNewCar;
|
||||
party.vehicle.isNewCar = body.isNewCar;
|
||||
party.vehicle.plateId =
|
||||
typeof body.plateId === "string"
|
||||
? body.plateId
|
||||
@@ -2382,7 +2382,7 @@ export class RequestManagementService {
|
||||
(body.driverIsInsurer ? String(body.insurerBirthday) : null);
|
||||
|
||||
if (!party.vehicle) party.vehicle = {} as any;
|
||||
party.vehicle.isNew = body.isNewCar;
|
||||
party.vehicle.isNewCar = body.isNewCar;
|
||||
// Derive plateId from the plate parts returned by the VIN inquiry.
|
||||
// Plk2 may be a numeric letter code (e.g. 5 → "د") or already a Persian
|
||||
// letter string — resolvePlk2Letter handles both forms.
|
||||
@@ -6633,7 +6633,7 @@ export class RequestManagementService {
|
||||
name: party.vehicle.name,
|
||||
model: party.vehicle.model,
|
||||
type: party.vehicle.type,
|
||||
isNew: party.vehicle.isNew,
|
||||
isNew: party.vehicle.isNewCar ?? (party.vehicle as any)?._doc?.isNew,
|
||||
}
|
||||
: undefined;
|
||||
const participants = Array.isArray(party.participants)
|
||||
@@ -7134,7 +7134,7 @@ export class RequestManagementService {
|
||||
name: sandHubReport?.MapTypNam || sandHubReport?.CarName,
|
||||
model: sandHubReport?.MapTypNam,
|
||||
type: `${sandHubReport?.UsageField || ""} / ${sandHubReport?.MapUsageName || "-"}`,
|
||||
isNew: firstPartyPlate.isNewCar,
|
||||
isNewCar: firstPartyPlate.isNewCar,
|
||||
registrationState: inquirySubmission.vehicle?.registrationState,
|
||||
previousPlateId: inquirySubmission.vehicle?.previousPlate
|
||||
? this.plateToPlateIdString(inquirySubmission.vehicle.previousPlate)
|
||||
@@ -7429,7 +7429,7 @@ export class RequestManagementService {
|
||||
name: sandHubReport?.MapTypNam || sandHubReport?.CarName,
|
||||
model: sandHubReport?.MapTypNam,
|
||||
type: `${sandHubReport?.UsageField || ""} / ${sandHubReport?.MapUsageName || "-"}`,
|
||||
isNew: plateDto.isNewCar,
|
||||
isNewCar: plateDto.isNewCar,
|
||||
registrationState: inquirySubmission.vehicle?.registrationState,
|
||||
previousPlateId: inquirySubmission.vehicle?.previousPlate
|
||||
? this.plateToPlateIdString(inquirySubmission.vehicle.previousPlate)
|
||||
|
||||
Reference in New Issue
Block a user