@movalib/movalib-commons 1.0.82 → 1.0.84

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
@@ -39,4 +39,4 @@ export { readCookie, deleteCookie } from './src/helpers/CookieUtils';
39
39
  export { validateField, formatVehicleTire, formatFrenchVehiclePlate, isEmpty } from './src/helpers/Tools';
40
40
  export { validatePhoneNumber, validateText, validateEmail } from './src/helpers/Validator';
41
41
  export { formatDateByCountryCode, getLongFormattedDateTime, capitalizeFirstLetter } from './src/helpers/DateUtils';
42
- export { RoleType, MovaAppType, DayOfWeek, EventState, EventType, DocumentType, DigitalPassportIndex, DocumentState, Gender, DateFormatTypes, PartsApplicationType, ProductType, OrderPreference } from './src/helpers/Enums';
42
+ export { RoleType, MovaAppType, DayOfWeek, EventState, EventType, DocumentType, DigitalPassportIndex, DocumentState, Gender, DateFormatTypes, PartsApplicationType, ProductType, OrderPreference, OrderState } from './src/helpers/Enums';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
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;
8
+ exports.OrderState = 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; } });
@@ -109,3 +109,4 @@ Object.defineProperty(exports, "DateFormatTypes", { enumerable: true, get: funct
109
109
  Object.defineProperty(exports, "PartsApplicationType", { enumerable: true, get: function () { return Enums_1.PartsApplicationType; } });
110
110
  Object.defineProperty(exports, "ProductType", { enumerable: true, get: function () { return Enums_1.ProductType; } });
111
111
  Object.defineProperty(exports, "OrderPreference", { enumerable: true, get: function () { return Enums_1.OrderPreference; } });
112
+ Object.defineProperty(exports, "OrderState", { enumerable: true, get: function () { return Enums_1.OrderState; } });
@@ -1,3 +1,9 @@
1
+ export declare enum OrderState {
2
+ NEW = "NEW",
3
+ SENT = "SENT",
4
+ DONE = "DONE",
5
+ CANCELLED = "CANCELLED"
6
+ }
1
7
  export declare enum OrderPreference {
2
8
  LOW_RANGE = "LOW_RANGE",
3
9
  MID_RANGE = "MID_RANGE",
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RoleType = exports.MovaAppType = exports.DocumentType = exports.DocumentState = exports.DayOfWeek = exports.EventType = exports.EventState = exports.DigitalPassportIndex = exports.Gender = exports.DateFormatTypes = exports.APIMethod = exports.PartsApplicationType = exports.ProductType = exports.OrderPreference = void 0;
3
+ exports.RoleType = exports.MovaAppType = exports.DocumentType = exports.DocumentState = exports.DayOfWeek = exports.EventType = exports.EventState = exports.DigitalPassportIndex = exports.Gender = exports.DateFormatTypes = exports.APIMethod = exports.PartsApplicationType = exports.ProductType = exports.OrderPreference = exports.OrderState = void 0;
4
+ var OrderState;
5
+ (function (OrderState) {
6
+ OrderState["NEW"] = "NEW";
7
+ OrderState["SENT"] = "SENT";
8
+ OrderState["DONE"] = "DONE";
9
+ OrderState["CANCELLED"] = "CANCELLED";
10
+ })(OrderState = exports.OrderState || (exports.OrderState = {}));
4
11
  var OrderPreference;
5
12
  (function (OrderPreference) {
6
13
  OrderPreference["LOW_RANGE"] = "LOW_RANGE";
@@ -2,6 +2,7 @@ import Address from "./Address";
2
2
  import Schedule from "./Schedule";
3
3
  import Prestation from "./Prestation";
4
4
  import Supplier from "./Supplier";
5
+ import { OrderPreference } from "../helpers/Enums";
5
6
  export default class Garage {
6
7
  id: string;
7
8
  adminId: string;
@@ -14,5 +15,6 @@ export default class Garage {
14
15
  contactEmail?: string;
15
16
  logo?: string;
16
17
  suppliers?: Supplier[];
18
+ orderPreference?: OrderPreference;
17
19
  constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, contactEmail?: string, logo?: string, suppliers?: Supplier[]);
18
20
  }
@@ -1,5 +1,6 @@
1
- import { OrderPreference, ProductType } from "../helpers/Enums";
1
+ import { OrderPreference, OrderState, ProductType } from "../helpers/Enums";
2
2
  import Operation from "./Operation";
3
+ import Supplier from "./Supplier";
3
4
  export default class Product {
4
5
  id: string;
5
6
  name: string;
@@ -7,5 +8,7 @@ export default class Product {
7
8
  orderPreference?: OrderPreference;
8
9
  originReferences?: string[];
9
10
  operation?: Operation;
11
+ orderState?: OrderState;
12
+ supplier?: Supplier;
10
13
  constructor(id: string, code: string, name: string, type: ProductType, orderPreference: OrderPreference, originReferences: string[]);
11
14
  }
package/index.ts CHANGED
@@ -55,5 +55,5 @@ export { formatDateByCountryCode, getLongFormattedDateTime, capitalizeFirstLette
55
55
  // Export des enums
56
56
  export { RoleType, MovaAppType, DayOfWeek, EventState, EventType, DocumentType,
57
57
  DigitalPassportIndex, DocumentState, Gender, DateFormatTypes, PartsApplicationType,
58
- ProductType, OrderPreference } from './src/helpers/Enums';
58
+ ProductType, OrderPreference, OrderState } from './src/helpers/Enums';
59
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.0.82",
3
+ "version": "1.0.84",
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",
@@ -1,10 +1,16 @@
1
+ export enum OrderState {
2
+ NEW = 'NEW',
3
+ SENT = 'SENT',
4
+ DONE = 'DONE',
5
+ CANCELLED = 'CANCELLED'
6
+ }
7
+
1
8
  export enum OrderPreference {
2
9
  LOW_RANGE = 'LOW_RANGE',
3
10
  MID_RANGE = 'MID_RANGE',
4
11
  HIGH_RANGE = 'HIGH_RANGE',
5
12
  }
6
13
 
7
-
8
14
  export enum ProductType {
9
15
  FRONT = 'PART',
10
16
  REAR = 'CONSUMABLE',
@@ -2,6 +2,7 @@ import Address from "./Address";
2
2
  import Schedule from "./Schedule";
3
3
  import Prestation from "./Prestation";
4
4
  import Supplier from "./Supplier";
5
+ import { OrderPreference } from "../helpers/Enums";
5
6
 
6
7
  export default class Garage {
7
8
 
@@ -15,7 +16,8 @@ export default class Garage {
15
16
  schedules: Schedule[];
16
17
  contactEmail?: string;
17
18
  logo?: string;
18
- suppliers?: Supplier[]; // TODO
19
+ suppliers?: Supplier[];
20
+ orderPreference?: OrderPreference;
19
21
 
20
22
  constructor(
21
23
  id:string,
@@ -1,5 +1,6 @@
1
- import { OrderPreference, ProductType } from "../helpers/Enums";
1
+ import { OrderPreference, OrderState, ProductType } from "../helpers/Enums";
2
2
  import Operation from "./Operation";
3
+ import Supplier from "./Supplier";
3
4
 
4
5
  export default class Product {
5
6
 
@@ -11,7 +12,11 @@ export default class Product {
11
12
  originReferences?: string[];
12
13
  // Eventuelle opération associée au produit
13
14
  operation?: Operation;
14
-
15
+ // Eventuel statut commande associé au produit
16
+ orderState?: OrderState;
17
+ // Eventuel fournisseur du produit
18
+ supplier?: Supplier;
19
+
15
20
  constructor(id:string, code: string, name:string, type: ProductType, orderPreference: OrderPreference, originReferences: string[]) {
16
21
  this.id = id;
17
22
  this.name = name;