@movalib/movalib-commons 1.1.21 → 1.1.22

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/PV_README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 1. build this movalib commons lib
2
2
 
3
- ### `npm build`
3
+ ### `npm run build`
4
4
 
5
5
  # 2. publish this movalib commons lib (public)
6
6
 
package/devIndex.tsx CHANGED
@@ -71,7 +71,7 @@ const App = () => {
71
71
 
72
72
  const getQRCodeData = ():string => {
73
73
  // On renvoie les données pour le QR Code, l'url change selon l'environnement (variables d'environnement)
74
- return `https://localhost:3001/#/garage/1?redirect=garage`;
74
+ return `https://app.movalib.com/#/garage/2?redirect=garage`;
75
75
  }
76
76
 
77
77
  const handleScheduleChange = (schedule: DaySchedule[]) => {
@@ -133,7 +133,7 @@ const App = () => {
133
133
 
134
134
  <GaragePLV url={getQRCodeData()} />
135
135
 
136
- <QRCode data={getQRCodeData()} showDownload={true} />
136
+ <QRCode data={getQRCodeData()} showDownload={true} size={400} />
137
137
 
138
138
  <div style={{ marginTop: '40px' }} />
139
139
 
package/dist/devIndex.js CHANGED
@@ -97,7 +97,7 @@ var App = function () {
97
97
  };
98
98
  var getQRCodeData = function () {
99
99
  // On renvoie les données pour le QR Code, l'url change selon l'environnement (variables d'environnement)
100
- return "https://localhost:3001/#/garage/1?redirect=garage";
100
+ return "https://app.movalib.com/#/garage/2?redirect=garage";
101
101
  };
102
102
  var handleScheduleChange = function (schedule) {
103
103
  if (schedule) {
@@ -128,7 +128,7 @@ var App = function () {
128
128
  throw new Error('Function not implemented.');
129
129
  } }), (0, jsx_runtime_1.jsx)(MovaSignUp_1.default, { darkMode: false, movaAppType: Enums_1.MovaAppType.INDIVIDUAL, onSubmit: function (form) {
130
130
  alert('Form Submitted !');
131
- } }), (0, jsx_runtime_1.jsx)(GaragePLV_1.default, { url: getQRCodeData() }), (0, jsx_runtime_1.jsx)(QRCode_1.default, { data: getQRCodeData(), showDownload: true }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '40px' } }), (0, jsx_runtime_1.jsx)("div", __assign({ style: Tools_1.flexCenter }, { children: (0, jsx_runtime_1.jsx)(ScheduleFields_1.default, { schedules: garage === null || garage === void 0 ? void 0 : garage.schedules, size: "small", timePickerStep: 30, onChange: handleScheduleChange }) }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, __assign({ style: Tools_1.flexCenter }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, __assign({ onClick: function () { return setOpenAccountValidation(!openAccountValidation); } }, { children: "Validation de compte" })) })), openAccountValidation && (0, jsx_runtime_1.jsx)(AccountValidation_1.default, { movaAppType: Enums_1.MovaAppType.GARAGE, onSubmit: function (success, message) {
131
+ } }), (0, jsx_runtime_1.jsx)(GaragePLV_1.default, { url: getQRCodeData() }), (0, jsx_runtime_1.jsx)(QRCode_1.default, { data: getQRCodeData(), showDownload: true, size: 400 }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '40px' } }), (0, jsx_runtime_1.jsx)("div", __assign({ style: Tools_1.flexCenter }, { children: (0, jsx_runtime_1.jsx)(ScheduleFields_1.default, { schedules: garage === null || garage === void 0 ? void 0 : garage.schedules, size: "small", timePickerStep: 30, onChange: handleScheduleChange }) }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, __assign({ style: Tools_1.flexCenter }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, __assign({ onClick: function () { return setOpenAccountValidation(!openAccountValidation); } }, { children: "Validation de compte" })) })), openAccountValidation && (0, jsx_runtime_1.jsx)(AccountValidation_1.default, { movaAppType: Enums_1.MovaAppType.GARAGE, onSubmit: function (success, message) {
132
132
  throw new Error('Function not implemented.');
133
133
  } })] })) })) }));
134
134
  };
@@ -7,12 +7,14 @@ import Operation from "./Operation";
7
7
  import Product from "./Product";
8
8
  import Supplier from "./Supplier";
9
9
  import Document from "./Document";
10
+ import Address from "./Address";
10
11
  export default class Event {
11
12
  id: string;
12
13
  ownerId: number;
13
14
  type: EventType;
14
15
  title: string;
15
16
  garageName: string;
17
+ garageAddress: Address;
16
18
  garageId: number;
17
19
  start?: Date;
18
20
  end?: Date;
@@ -41,6 +43,6 @@ export default class Event {
41
43
  supplier?: Supplier;
42
44
  quoteAmount?: number;
43
45
  documents?: Document[];
44
- 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);
46
+ constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageAddress: Address, garageId: number, state: EventState, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[], guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string);
45
47
  static getPrestationsList(event: Event): string[];
46
48
  }
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Event = /** @class */ (function () {
4
- function Event(id, ownerId, type, title, garageName, garageId, state, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes) {
4
+ function Event(id, ownerId, type, title, garageName, garageAddress, garageId, state, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes) {
5
5
  this.id = id;
6
6
  this.notes = notes;
7
7
  this.ownerId = ownerId;
8
8
  this.type = type;
9
9
  this.title = title;
10
10
  this.garageName = garageName;
11
+ this.garageAddress = garageAddress;
11
12
  this.garageId = garageId;
12
13
  this.state = state;
13
14
  this.start = start ? new Date(start) : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
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",
@@ -7,6 +7,7 @@ import Operation from "./Operation";
7
7
  import Product from "./Product";
8
8
  import Supplier from "./Supplier";
9
9
  import Document from "./Document";
10
+ import Address from "./Address";
10
11
 
11
12
  export default class Event {
12
13
 
@@ -16,6 +17,7 @@ export default class Event {
16
17
  type: EventType;
17
18
  title: string;
18
19
  garageName: string;
20
+ garageAddress: Address;
19
21
  garageId: number;
20
22
  start?: Date;
21
23
  end?: Date;
@@ -45,7 +47,7 @@ export default class Event {
45
47
  quoteAmount?: number;
46
48
  documents?: Document[];
47
49
 
48
- constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,
50
+ constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageAddress: Address, garageId: number,
49
51
  state: EventState, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
50
52
  guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string)
51
53
  {
@@ -55,6 +57,7 @@ export default class Event {
55
57
  this.type = type;
56
58
  this.title = title;
57
59
  this.garageName = garageName;
60
+ this.garageAddress = garageAddress;
58
61
  this.garageId = garageId;
59
62
  this.state = state;
60
63
  this.start = start ? new Date(start) : undefined;