@movalib/movalib-commons 1.0.32 → 1.0.33

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.
@@ -18,4 +18,5 @@ export default class Vehicle {
18
18
  tireWidth: string;
19
19
  documents: Document[];
20
20
  constructor(id: number, ownerId: number, averageMileagePerYear: number, plate: string, brand: string, model: string, version: string, vin: string, currentMileage: number, digitalPassportIndex: string, firstRegistrationDate: Date, ktype: string, tireDiameter: string, tireHeight: string, tireSpeedIndex: string, tireWidth: string, documents: Document[]);
21
+ getVehicleLabel: () => string;
21
22
  }
@@ -12,6 +12,10 @@ Cylindrée : 1984 cm3
12
12
  Puissance : 140 KW (190 HP) */
13
13
  var Vehicle = /** @class */ (function () {
14
14
  function Vehicle(id, ownerId, averageMileagePerYear, plate, brand, model, version, vin, currentMileage, digitalPassportIndex, firstRegistrationDate, ktype, tireDiameter, tireHeight, tireSpeedIndex, tireWidth, documents) {
15
+ var _this = this;
16
+ this.getVehicleLabel = function () {
17
+ return "".concat(_this.brand, " ").concat(_this.model, " ").concat(_this.version);
18
+ };
15
19
  this.id = id;
16
20
  this.ownerId = ownerId;
17
21
  this.averageMileagePerYear = averageMileagePerYear;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -69,4 +69,8 @@ export default class Vehicle {
69
69
  this.tireWidth = tireWidth;
70
70
  this.documents = documents;
71
71
  }
72
+
73
+ getVehicleLabel = () => {
74
+ return `${this.brand} ${this.model} ${this.version}`
75
+ }
72
76
  }