@movalib/movalib-commons 1.0.26 → 1.0.28

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
@@ -9,6 +9,6 @@ export { default as Role } from './src/models/Role';
9
9
  export { default as Address } from './src/models/Address';
10
10
  export { default as Vehicle } from './src/models/Vehicle';
11
11
  export { default as Document } from './src/models/Document';
12
- export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm } from './src/helpers/Types';
12
+ export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm, MovaInterval } from './src/helpers/Types';
13
13
  export { validateField } from './src/helpers/Tools';
14
14
  export { RoleType, MovaAppType } from './src/helpers/Enums';
@@ -126,7 +126,7 @@ var MovaLogin = function (_a) {
126
126
  width: '250px',
127
127
  height: '400px',
128
128
  top: '-20%',
129
- left: '3%',
129
+ left: '0%',
130
130
  opacity: '0.3',
131
131
  zIndex: -8 }, alt: 'Feuille Verte Movalib' }), (0, jsx_runtime_1.jsxs)(material_1.Container, __assign({ component: "main", maxWidth: "xs" }, { children: [(0, jsx_runtime_1.jsx)(material_1.CssBaseline, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ sx: {
132
132
  marginTop: 6,
@@ -138,7 +138,7 @@ var MovaLogin = function (_a) {
138
138
  width: '250px',
139
139
  height: '400px',
140
140
  bottom: '-20%',
141
- right: '3%',
141
+ right: '0%',
142
142
  opacity: '0.3',
143
143
  zIndex: '-10' }, alt: 'Feuille Rose Movalib' })] })));
144
144
  };
@@ -151,7 +151,7 @@ var MovaLogin = function (_a) {
151
151
  width: '250px',
152
152
  height: '400px',
153
153
  top: '-20%',
154
- left: '3%',
154
+ left: '0%',
155
155
  opacity: '0.3',
156
156
  zIndex: -8 }, alt: 'Feuille Verte Movalib' }), (0, jsx_runtime_1.jsxs)(material_1.Container, __assign({ component: "main", maxWidth: "sm" }, { children: [(0, jsx_runtime_1.jsx)(material_1.CssBaseline, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ sx: {
157
157
  marginTop: 6,
@@ -165,7 +165,7 @@ var MovaLogin = function (_a) {
165
165
  width: '250px',
166
166
  height: '400px',
167
167
  bottom: '-20%',
168
- right: '3%',
168
+ right: '0%',
169
169
  opacity: '0.3',
170
170
  zIndex: '-10' }, alt: 'Feuille Rose Movalib' })] })));
171
171
  };
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Type utilisé pour définir un interval sur une objet Schedule
3
+ */
4
+ export type MovaInterval = {
5
+ start: Date | string | null;
6
+ end: Date | string | null;
7
+ };
1
8
  export type MovaUserSignUpForm = {
2
9
  firstname: MovaFormField;
3
10
  lastname: MovaFormField;
@@ -0,0 +1,15 @@
1
+ import Address from "./Address";
2
+ import Schedule from "./Schedule";
3
+ import Prestation from "./Prestation";
4
+ export default class Garage {
5
+ id: string;
6
+ adminId: string;
7
+ name: string;
8
+ address: Address;
9
+ contactPhone: string;
10
+ prestations: Prestation[];
11
+ schedules: Schedule[];
12
+ contactEmail?: string;
13
+ logo?: string;
14
+ constructor(id: string, adminId: string, name: string, address: Address, prestations: Prestation[], schedules: Schedule[], contactPhone: string, contactEmail?: string, logo?: string);
15
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Garage = /** @class */ (function () {
4
+ function Garage(id, adminId, name, address, prestations, schedules, contactPhone, contactEmail, logo) {
5
+ this.id = id;
6
+ this.adminId = adminId;
7
+ this.name = name;
8
+ this.address = address;
9
+ this.prestations = prestations;
10
+ this.schedules = schedules;
11
+ this.contactPhone = contactPhone;
12
+ this.contactEmail = contactEmail;
13
+ this.logo = logo;
14
+ }
15
+ return Garage;
16
+ }());
17
+ exports.default = Garage;
@@ -0,0 +1,15 @@
1
+ export default class Prestation {
2
+ id: number;
3
+ name: string;
4
+ description: string;
5
+ category: string;
6
+ /**
7
+ * Temps d'immobilisation pour ce service (en H)
8
+ */
9
+ downtime: number;
10
+ /**
11
+ * Options éventuelles selon le service (AV / AR / Géométrie, etc..)
12
+ */
13
+ options?: string[];
14
+ constructor(id: number, name: string, description: string, category: string, downtime: number, options?: string[]);
15
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Prestation = /** @class */ (function () {
4
+ /* cost: number; // Le coût de chaque service
5
+ parts: [ // Les pièces nécessaires pour ce service
6
+ {
7
+ id: number,
8
+ name: string,
9
+ cost: number, // Le coût de chaque pièce
10
+ // autres informations sur la pièce...
11
+ }; */
12
+ function Prestation(id, name, description, category, downtime, options) {
13
+ this.id = id;
14
+ this.name = name;
15
+ this.description = description;
16
+ this.category = category;
17
+ this.downtime = downtime;
18
+ this.options = options;
19
+ }
20
+ return Prestation;
21
+ }());
22
+ exports.default = Prestation;
@@ -0,0 +1,6 @@
1
+ import { MovaInterval } from "../helpers/Types";
2
+ export default class Schedule {
3
+ day: number;
4
+ intervals: MovaInterval[];
5
+ constructor(day: number, intervals: MovaInterval[]);
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Schedule = /** @class */ (function () {
4
+ function Schedule(day, intervals) {
5
+ this.day = day;
6
+ this.intervals = intervals;
7
+ }
8
+ return Schedule;
9
+ }());
10
+ exports.default = Schedule;
package/index.ts CHANGED
@@ -16,7 +16,7 @@ export { default as Vehicle } from './src/models/Vehicle';
16
16
  export { default as Document } from './src/models/Document';
17
17
 
18
18
  // Export des types
19
- export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm } from './src/helpers/Types';
19
+ export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm, MovaInterval } from './src/helpers/Types';
20
20
 
21
21
  // Export des méthodes utilitaires
22
22
  export { validateField } from './src/helpers/Tools';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
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",
package/src/MovaLogin.tsx CHANGED
@@ -106,7 +106,7 @@ const MovaLogin: FunctionComponent<MovaLoginProps> = ({ loading, movaAppType, on
106
106
  width: '250px',
107
107
  height: '400px',
108
108
  top: '-20%',
109
- left: '3%',
109
+ left: '0%',
110
110
  opacity: '0.3',
111
111
  zIndex: -8}} alt='Feuille Verte Movalib'></img>
112
112
 
@@ -189,7 +189,7 @@ const MovaLogin: FunctionComponent<MovaLoginProps> = ({ loading, movaAppType, on
189
189
  width: '250px',
190
190
  height: '400px',
191
191
  bottom: '-20%',
192
- right: '3%',
192
+ right: '0%',
193
193
  opacity: '0.3',
194
194
  zIndex: '-10'}} alt='Feuille Rose Movalib'></img>
195
195
  </div>
@@ -137,7 +137,7 @@ const MovaLogin: FunctionComponent<MovaSignUpProps> = ({ loading, movaAppType, o
137
137
  width: '250px',
138
138
  height: '400px',
139
139
  top: '-20%',
140
- left: '3%',
140
+ left: '0%',
141
141
  opacity: '0.3',
142
142
  zIndex: -8}} alt='Feuille Verte Movalib'></img>
143
143
 
@@ -280,7 +280,7 @@ const MovaLogin: FunctionComponent<MovaSignUpProps> = ({ loading, movaAppType, o
280
280
  width: '250px',
281
281
  height: '400px',
282
282
  bottom: '-20%',
283
- right: '3%',
283
+ right: '0%',
284
284
  opacity: '0.3',
285
285
  zIndex: '-10'}} alt='Feuille Rose Movalib'></img>
286
286
  </div>
@@ -1,3 +1,12 @@
1
+
2
+ /**
3
+ * Type utilisé pour définir un interval sur une objet Schedule
4
+ */
5
+ export type MovaInterval = {
6
+ start: Date | string | null,
7
+ end: Date | string | null
8
+ }
9
+
1
10
  export type MovaUserSignUpForm = {
2
11
  firstname: MovaFormField,
3
12
  lastname: MovaFormField,
@@ -0,0 +1,38 @@
1
+ import Address from "./Address";
2
+ import Schedule from "./Schedule";
3
+ import Prestation from "./Prestation";
4
+
5
+ export default class Garage {
6
+
7
+ id:string;
8
+ adminId:string;
9
+ name:string;
10
+ address:Address;
11
+ contactPhone: string;
12
+ prestations: Prestation[];
13
+ schedules: Schedule[];
14
+ contactEmail?: string;
15
+ logo?: string;
16
+
17
+ constructor(
18
+ id:string,
19
+ adminId:string,
20
+ name:string,
21
+ address:Address,
22
+ prestations: Prestation[],
23
+ schedules: Schedule[],
24
+ contactPhone: string,
25
+ contactEmail?: string,
26
+ logo?:string
27
+ ) {
28
+ this.id = id;
29
+ this.adminId = adminId;
30
+ this.name = name;
31
+ this.address = address;
32
+ this.prestations = prestations;
33
+ this.schedules = schedules;
34
+ this.contactPhone = contactPhone;
35
+ this.contactEmail = contactEmail;
36
+ this.logo = logo;
37
+ }
38
+ }
@@ -0,0 +1,35 @@
1
+ export default class Prestation {
2
+
3
+ // Properties
4
+ id: number;
5
+ name: string;
6
+ description: string;
7
+ category: string;
8
+ /**
9
+ * Temps d'immobilisation pour ce service (en H)
10
+ */
11
+ downtime: number;
12
+ /**
13
+ * Options éventuelles selon le service (AV / AR / Géométrie, etc..)
14
+ */
15
+ options?: string[];
16
+
17
+ /* cost: number; // Le coût de chaque service
18
+ parts: [ // Les pièces nécessaires pour ce service
19
+ {
20
+ id: number,
21
+ name: string,
22
+ cost: number, // Le coût de chaque pièce
23
+ // autres informations sur la pièce...
24
+ }; */
25
+
26
+ constructor(id:number, name:string, description: string, category:string,
27
+ downtime:number, options?:string[]) {
28
+ this.id = id;
29
+ this.name = name;
30
+ this.description = description;
31
+ this.category = category;
32
+ this.downtime = downtime;
33
+ this.options = options;
34
+ }
35
+ }
@@ -0,0 +1,13 @@
1
+ import { MovaInterval } from "../helpers/Types";
2
+
3
+ export default class Schedule {
4
+
5
+ // Properties
6
+ day: number;
7
+ intervals: MovaInterval[];
8
+
9
+ constructor(day: number, intervals: MovaInterval[]) {
10
+ this.day = day;
11
+ this.intervals = intervals;
12
+ }
13
+ }