@movalib/movalib-commons 1.0.78 → 1.0.80

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.
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { default as MovaCopyright } from './src/MovaCopyright';
17
17
  export { default as MovaVehicleTireField } from './src/MovaVehicleTireField';
18
18
  export { default as ConfirmationDialog } from './src/ConfirmationDialog';
19
19
  export { default as GenderSelector } from './src/GenderSelector';
20
+ export { default as Supplier } from './src/models/Supplier';
20
21
  export { default as Product } from './src/models/Product';
21
22
  export { default as Prestation } from './src/models/Prestation';
22
23
  export { default as Operation } from './src/models/Operation';
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.EventType = exports.EventState = exports.DayOfWeek = exports.MovaAppType = exports.RoleType = exports.capitalizeFirstLetter = exports.getLongFormattedDateTime = exports.formatDateByCountryCode = exports.validateEmail = exports.validateText = exports.validatePhoneNumber = exports.isEmpty = exports.formatFrenchVehiclePlate = exports.formatVehicleTire = exports.validateField = exports.deleteCookie = exports.readCookie = exports.VehicleTire = exports.Event = exports.Schedule = exports.Garage = exports.Document = exports.Vehicle = exports.Address = exports.Role = exports.User = exports.Customer = exports.Logger = exports.Operation = exports.Prestation = exports.Product = exports.GenderSelector = exports.ConfirmationDialog = exports.MovaVehicleTireField = exports.MovaCopyright = exports.MovaSignUp = exports.MovaLogin = exports.MovaSnackbar = exports.TestButton = exports.VehiclePlateField = exports.QRCode = exports.MovaDialog = exports.Loader = exports.MovaDigitalPassport = exports.VehicleFullCard = exports.ScheduleFields = exports.AddressFields = exports.UserService = exports.GarageService = exports.AuthenticationService = void 0;
8
- exports.OrderPreference = exports.ProductType = exports.PartsApplicationType = exports.DateFormatTypes = exports.Gender = exports.DocumentState = exports.DigitalPassportIndex = exports.DocumentType = void 0;
7
+ exports.EventState = exports.DayOfWeek = exports.MovaAppType = exports.RoleType = exports.capitalizeFirstLetter = exports.getLongFormattedDateTime = exports.formatDateByCountryCode = exports.validateEmail = exports.validateText = exports.validatePhoneNumber = exports.isEmpty = exports.formatFrenchVehiclePlate = exports.formatVehicleTire = exports.validateField = exports.deleteCookie = exports.readCookie = exports.VehicleTire = exports.Event = exports.Schedule = exports.Garage = exports.Document = exports.Vehicle = exports.Address = exports.Role = exports.User = exports.Customer = exports.Logger = exports.Operation = exports.Prestation = exports.Product = exports.Supplier = exports.GenderSelector = exports.ConfirmationDialog = exports.MovaVehicleTireField = exports.MovaCopyright = exports.MovaSignUp = exports.MovaLogin = exports.MovaSnackbar = exports.TestButton = exports.VehiclePlateField = exports.QRCode = exports.MovaDialog = exports.Loader = exports.MovaDigitalPassport = exports.VehicleFullCard = exports.ScheduleFields = exports.AddressFields = exports.UserService = exports.GarageService = exports.AuthenticationService = void 0;
8
+ exports.OrderPreference = exports.ProductType = exports.PartsApplicationType = exports.DateFormatTypes = exports.Gender = exports.DocumentState = exports.DigitalPassportIndex = exports.DocumentType = exports.EventType = void 0;
9
9
  // Export des services
10
10
  var AuthenticationService_1 = require("./src/services/AuthenticationService");
11
11
  Object.defineProperty(exports, "AuthenticationService", { enumerable: true, get: function () { return __importDefault(AuthenticationService_1).default; } });
@@ -47,6 +47,8 @@ Object.defineProperty(exports, "ConfirmationDialog", { enumerable: true, get: fu
47
47
  var GenderSelector_1 = require("./src/GenderSelector");
48
48
  Object.defineProperty(exports, "GenderSelector", { enumerable: true, get: function () { return __importDefault(GenderSelector_1).default; } });
49
49
  // Export des classes
50
+ var Supplier_1 = require("./src/models/Supplier");
51
+ Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return __importDefault(Supplier_1).default; } });
50
52
  var Product_1 = require("./src/models/Product");
51
53
  Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return __importDefault(Product_1).default; } });
52
54
  var Prestation_1 = require("./src/models/Prestation");
@@ -4,6 +4,7 @@ import Prestation from "./Prestation";
4
4
  import Customer from "./Customer";
5
5
  import Vehicle from "./Vehicle";
6
6
  import Operation from "./Operation";
7
+ import Product from "./Product";
7
8
  export default class Event {
8
9
  id: string;
9
10
  ownerId: number;
@@ -16,6 +17,7 @@ export default class Event {
16
17
  state: EventState;
17
18
  prestations?: Prestation[];
18
19
  operations?: Operation[];
20
+ products?: Product[];
19
21
  /**
20
22
  * Un tableau d'invités, dans notre cas d'usage nous n'aurons qu'un invité de type Client
21
23
  */
@@ -33,22 +35,6 @@ export default class Event {
33
35
  * Eventuel numéro de devis rattaché à l'évent
34
36
  */
35
37
  quoteId?: number;
36
- constructor({ id, notes, ownerId, type, title, garageName, garageId, state, start, end, prestations, operations, guestsId, vehicleId, quoteId }: {
37
- id: string;
38
- notes?: string;
39
- ownerId: number;
40
- type: EventType;
41
- title: string;
42
- garageName: string;
43
- garageId: number;
44
- state: EventState;
45
- start?: Date;
46
- end?: Date;
47
- prestations?: Prestation[];
48
- operations?: Operation[];
49
- guestsId?: string[];
50
- vehicleId?: number;
51
- quoteId?: number;
52
- });
38
+ constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageId: number, state: EventState, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[], guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string);
53
39
  static getPrestationsList(event: Event): string[];
54
40
  }
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Event = /** @class */ (function () {
4
- function Event(_a) {
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, start = _a.start, end = _a.end, prestations = _a.prestations, operations = _a.operations, guestsId = _a.guestsId, vehicleId = _a.vehicleId, quoteId = _a.quoteId;
4
+ function Event(id, ownerId, type, title, garageName, garageId, state, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes) {
6
5
  this.id = id;
7
6
  this.notes = notes;
8
7
  this.ownerId = ownerId;
@@ -15,6 +14,7 @@ var Event = /** @class */ (function () {
15
14
  this.end = end ? new Date(end) : undefined;
16
15
  this.operations = operations;
17
16
  this.prestations = prestations;
17
+ this.products = products;
18
18
  this.guestsId = guestsId;
19
19
  this.vehicleId = vehicleId;
20
20
  this.quoteId = quoteId;
@@ -1,6 +1,7 @@
1
1
  import Address from "./Address";
2
2
  import Schedule from "./Schedule";
3
3
  import Prestation from "./Prestation";
4
+ import Supplier from "./Supplier";
4
5
  export default class Garage {
5
6
  id: string;
6
7
  adminId: string;
@@ -12,5 +13,6 @@ export default class Garage {
12
13
  schedules: Schedule[];
13
14
  contactEmail?: string;
14
15
  logo?: string;
15
- constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, contactEmail?: string, logo?: string);
16
+ suppliers?: Supplier[];
17
+ constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, contactEmail?: string, logo?: string, suppliers?: Supplier[]);
16
18
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Garage = /** @class */ (function () {
4
- function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, contactEmail, logo) {
4
+ function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, contactEmail, logo, suppliers) {
5
5
  this.id = id;
6
6
  this.adminId = adminId;
7
7
  this.name = name;
@@ -12,6 +12,7 @@ var Garage = /** @class */ (function () {
12
12
  this.contactPhone = contactPhone;
13
13
  this.contactEmail = contactEmail;
14
14
  this.logo = logo;
15
+ this.suppliers = suppliers;
15
16
  }
16
17
  return Garage;
17
18
  }());
@@ -0,0 +1,6 @@
1
+ export default class Supplier {
2
+ id: number;
3
+ name: string;
4
+ email: string;
5
+ constructor(id: number, name: string, email: string);
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Supplier = /** @class */ (function () {
4
+ function Supplier(id, name, email) {
5
+ this.id = id;
6
+ this.name = name;
7
+ this.email = email;
8
+ }
9
+ return Supplier;
10
+ }());
11
+ exports.default = Supplier;
package/index.ts CHANGED
@@ -24,6 +24,7 @@ export { default as ConfirmationDialog } from './src/ConfirmationDialog';
24
24
  export { default as GenderSelector } from './src/GenderSelector';
25
25
 
26
26
  // Export des classes
27
+ export { default as Supplier } from './src/models/Supplier';
27
28
  export { default as Product } from './src/models/Product';
28
29
  export { default as Prestation } from './src/models/Prestation';
29
30
  export { default as Operation } from './src/models/Operation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
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",
@@ -4,6 +4,7 @@ import Prestation from "./Prestation";
4
4
  import Customer from "./Customer";
5
5
  import Vehicle from "./Vehicle";
6
6
  import Operation from "./Operation";
7
+ import Product from "./Product";
7
8
 
8
9
  export default class Event {
9
10
 
@@ -19,6 +20,7 @@ export default class Event {
19
20
  state: EventState;
20
21
  prestations?: Prestation[];
21
22
  operations?: Operation[];
23
+ products?: Product[];
22
24
  /**
23
25
  * Un tableau d'invités, dans notre cas d'usage nous n'aurons qu'un invité de type Client
24
26
  */
@@ -37,10 +39,9 @@ export default class Event {
37
39
  */
38
40
  quoteId?: number;
39
41
 
40
- constructor({ id, notes, ownerId, type, title, garageName, garageId, state, start, end, prestations, operations, guestsId, vehicleId, quoteId }
41
- : { id: string; notes?: string; ownerId: number; type : EventType; title: string; garageName: string; garageId: number;
42
- state: EventState; start?: Date; end?: Date, prestations?: Prestation[], operations?: Operation[],
43
- guestsId?: string[], vehicleId?: number, quoteId?: number})
42
+ constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,
43
+ state: EventState, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
44
+ guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string)
44
45
  {
45
46
  this.id = id;
46
47
  this.notes = notes;
@@ -54,6 +55,7 @@ export default class Event {
54
55
  this.end = end ? new Date(end) : undefined;
55
56
  this.operations = operations;
56
57
  this.prestations = prestations;
58
+ this.products = products;
57
59
  this.guestsId = guestsId;
58
60
  this.vehicleId = vehicleId;
59
61
  this.quoteId = quoteId;
@@ -1,6 +1,7 @@
1
1
  import Address from "./Address";
2
2
  import Schedule from "./Schedule";
3
3
  import Prestation from "./Prestation";
4
+ import Supplier from "./Supplier";
4
5
 
5
6
  export default class Garage {
6
7
 
@@ -14,6 +15,7 @@ export default class Garage {
14
15
  schedules: Schedule[];
15
16
  contactEmail?: string;
16
17
  logo?: string;
18
+ suppliers?: Supplier[]; // TODO
17
19
 
18
20
  constructor(
19
21
  id:string,
@@ -25,7 +27,8 @@ export default class Garage {
25
27
  schedules: Schedule[],
26
28
  contactPhone: string,
27
29
  contactEmail?: string,
28
- logo?:string
30
+ logo?:string,
31
+ suppliers?: Supplier[]
29
32
  ) {
30
33
  this.id = id;
31
34
  this.adminId = adminId;
@@ -37,5 +40,6 @@ export default class Garage {
37
40
  this.contactPhone = contactPhone;
38
41
  this.contactEmail = contactEmail;
39
42
  this.logo = logo;
43
+ this.suppliers = suppliers;
40
44
  }
41
45
  }
@@ -0,0 +1,13 @@
1
+ export default class Supplier {
2
+
3
+ // Properties
4
+ id: number;
5
+ name: string;
6
+ email: string;
7
+
8
+ constructor(id:number, name: string, email:string) {
9
+ this.id = id;
10
+ this.name = name;
11
+ this.email = email;
12
+ }
13
+ }