@movalib/movalib-commons 1.0.33 → 1.0.35

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.
@@ -9,6 +9,7 @@ export default class Event {
9
9
  type: EventType;
10
10
  title: string;
11
11
  garageName: string;
12
+ garageId: number;
12
13
  startDate?: Date;
13
14
  endDate?: Date;
14
15
  state: EventState;
@@ -34,13 +35,14 @@ export default class Event {
34
35
  * MVP : pour l'instant les références sont transmises sous cette forme classique
35
36
  */
36
37
  originReferences?: [string, string][];
37
- constructor({ id, notes, ownerId, type, title, garageName, state, startDate, endDate, prestations, guestsId, vehicleId, quoteId, originReferences }: {
38
+ constructor({ id, notes, ownerId, type, title, garageName, garageId, state, startDate, endDate, prestations, guestsId, vehicleId, quoteId, originReferences }: {
38
39
  id: string;
39
40
  notes?: string;
40
41
  ownerId: number;
41
42
  type: EventType;
42
43
  title: string;
43
44
  garageName: string;
45
+ garageId: number;
44
46
  state: EventState;
45
47
  startDate?: Date;
46
48
  endDate?: Date;
@@ -2,13 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Event = /** @class */ (function () {
4
4
  function Event(_a) {
5
- var id = _a.id, notes = _a.notes, ownerId = _a.ownerId, type = _a.type, title = _a.title, garageName = _a.garageName, state = _a.state, startDate = _a.startDate, endDate = _a.endDate, prestations = _a.prestations, guestsId = _a.guestsId, vehicleId = _a.vehicleId, quoteId = _a.quoteId, originReferences = _a.originReferences;
5
+ var id = _a.id, notes = _a.notes, ownerId = _a.ownerId, type = _a.type, title = _a.title, garageName = _a.garageName, garageId = _a.garageId, state = _a.state, startDate = _a.startDate, endDate = _a.endDate, prestations = _a.prestations, guestsId = _a.guestsId, vehicleId = _a.vehicleId, quoteId = _a.quoteId, originReferences = _a.originReferences;
6
6
  this.id = id;
7
7
  this.notes = notes;
8
8
  this.ownerId = ownerId;
9
9
  this.type = type;
10
10
  this.title = title;
11
11
  this.garageName = garageName;
12
+ this.garageId = garageId;
12
13
  this.state = state;
13
14
  this.startDate = startDate ? new Date(startDate) : undefined;
14
15
  this.endDate = endDate ? new Date(endDate) : undefined;
@@ -18,5 +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
+ getVehicleLabel(): string;
22
22
  }
@@ -12,10 +12,6 @@ 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
- };
19
15
  this.id = id;
20
16
  this.ownerId = ownerId;
21
17
  this.averageMileagePerYear = averageMileagePerYear;
@@ -34,6 +30,9 @@ var Vehicle = /** @class */ (function () {
34
30
  this.tireWidth = tireWidth;
35
31
  this.documents = documents;
36
32
  }
33
+ Vehicle.prototype.getVehicleLabel = function () {
34
+ return "".concat(this.brand, " ").concat(this.model, " ").concat(this.version);
35
+ };
37
36
  return Vehicle;
38
37
  }());
39
38
  exports.default = Vehicle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
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",
@@ -12,6 +12,7 @@ export default class Event {
12
12
  type: EventType;
13
13
  title: string;
14
14
  garageName: string;
15
+ garageId: number;
15
16
  startDate?: Date;
16
17
  endDate?: Date;
17
18
  state: EventState;
@@ -39,8 +40,8 @@ export default class Event {
39
40
  */
40
41
  originReferences?: [string, string][];
41
42
 
42
- constructor({ id, notes, ownerId, type, title, garageName, state, startDate, endDate, prestations, guestsId, vehicleId, quoteId, originReferences }
43
- : { id: string; notes?: string; ownerId: number; type : EventType; title: string; garageName: string;
43
+ constructor({ id, notes, ownerId, type, title, garageName, garageId, state, startDate, endDate, prestations, guestsId, vehicleId, quoteId, originReferences }
44
+ : { id: string; notes?: string; ownerId: number; type : EventType; title: string; garageName: string; garageId: number;
44
45
  state: EventState; startDate?: Date; endDate?: Date, prestations?: Prestation[],
45
46
  guestsId?: string[], vehicleId?: number, quoteId?: number, originReferences?: [string, string][]})
46
47
  {
@@ -50,6 +51,7 @@ export default class Event {
50
51
  this.type = type;
51
52
  this.title = title;
52
53
  this.garageName = garageName;
54
+ this.garageId = garageId;
53
55
  this.state = state;
54
56
  this.startDate = startDate ? new Date(startDate) : undefined;
55
57
  this.endDate = endDate ? new Date(endDate) : undefined;
@@ -70,7 +70,7 @@ export default class Vehicle {
70
70
  this.documents = documents;
71
71
  }
72
72
 
73
- getVehicleLabel = () => {
73
+ getVehicleLabel() {
74
74
  return `${this.brand} ${this.model} ${this.version}`
75
75
  }
76
76
  }