onroute-policy-engine 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -404,21 +404,22 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
|
|
|
404
404
|
axleConfiguration.slice(1).forEach((a, i) => {
|
|
405
405
|
const tireSize = a.tireSize;
|
|
406
406
|
const numberOfTires = a.numberOfTires;
|
|
407
|
+
const axleUnitNum = i + 2;
|
|
407
408
|
let maxWeight = 0;
|
|
408
409
|
if (!tireSize) {
|
|
409
410
|
policyCheckResults.push({
|
|
410
411
|
id: policyId,
|
|
411
412
|
result: enum_1.PolicyCheckResultType.Fail,
|
|
412
|
-
message: `Axle unit ${
|
|
413
|
-
axleUnit:
|
|
413
|
+
message: `Axle unit ${axleUnitNum} tire size is invalid`,
|
|
414
|
+
axleUnit: axleUnitNum,
|
|
414
415
|
});
|
|
415
416
|
}
|
|
416
417
|
else if (!numberOfTires) {
|
|
417
418
|
policyCheckResults.push({
|
|
418
419
|
id: policyId,
|
|
419
420
|
result: enum_1.PolicyCheckResultType.Fail,
|
|
420
|
-
message: `Axle unit ${
|
|
421
|
-
axleUnit:
|
|
421
|
+
message: `Axle unit ${axleUnitNum} number of wheels is invalid`,
|
|
422
|
+
axleUnit: axleUnitNum,
|
|
422
423
|
});
|
|
423
424
|
}
|
|
424
425
|
else {
|
|
@@ -435,8 +436,8 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
|
|
|
435
436
|
policyCheckResults.push({
|
|
436
437
|
id: policyId,
|
|
437
438
|
result: enum_1.PolicyCheckResultType.Fail,
|
|
438
|
-
message: `Axle unit ${
|
|
439
|
-
axleUnit:
|
|
439
|
+
message: `Axle unit ${axleUnitNum} weight exceeds maximum of ${maxWeight}kg for ${numberOfTires} ${tireSize}mm tires`,
|
|
440
|
+
axleUnit: axleUnitNum,
|
|
440
441
|
});
|
|
441
442
|
}
|
|
442
443
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "v2.3.
|
|
1
|
+
export declare const version = "v2.3.1";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED