Fixed type fixes and errors

This commit is contained in:
SepehrYahyaee
2026-09-14 12:49:46 +03:30
parent 1b69da38ff
commit 51166a8d0d
3 changed files with 126 additions and 8 deletions

View File

@@ -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)