@movalib/movalib-commons 1.0.27 → 1.0.29
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 +3 -1
- package/dist/index.js +5 -1
- package/dist/src/helpers/Types.d.ts +7 -0
- package/dist/src/models/Garage.d.ts +15 -0
- package/dist/src/models/Garage.js +17 -0
- package/dist/src/models/Prestation.d.ts +15 -0
- package/dist/src/models/Prestation.js +22 -0
- package/dist/src/models/Schedule.d.ts +6 -0
- package/dist/src/models/Schedule.js +10 -0
- package/index.ts +3 -1
- package/package.json +1 -1
- package/src/helpers/Types.ts +9 -0
- package/src/models/Garage.ts +38 -0
- package/src/models/Prestation.ts +35 -0
- package/src/models/Schedule.ts +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ 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
|
|
12
|
+
export { default as Garage } from './src/models/Garage';
|
|
13
|
+
export { default as Schedule } from './src/models/Schedule';
|
|
14
|
+
export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm, MovaInterval } from './src/helpers/Types';
|
|
13
15
|
export { validateField } from './src/helpers/Tools';
|
|
14
16
|
export { RoleType, MovaAppType } from './src/helpers/Enums';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ 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.MovaAppType = exports.RoleType = exports.validateField = exports.Document = exports.Vehicle = exports.Address = exports.Role = exports.User = exports.MovaCopyright = exports.MovaSignUp = exports.MovaLogin = exports.MovaSnackbar = exports.TestButton = exports.VehiclePlateField = void 0;
|
|
7
|
+
exports.MovaAppType = exports.RoleType = exports.validateField = exports.Schedule = exports.Garage = exports.Document = exports.Vehicle = exports.Address = exports.Role = exports.User = exports.MovaCopyright = exports.MovaSignUp = exports.MovaLogin = exports.MovaSnackbar = exports.TestButton = exports.VehiclePlateField = void 0;
|
|
8
8
|
// Export des composants
|
|
9
9
|
var VehiclePlateField_1 = require("./src/VehiclePlateField");
|
|
10
10
|
Object.defineProperty(exports, "VehiclePlateField", { enumerable: true, get: function () { return __importDefault(VehiclePlateField_1).default; } });
|
|
@@ -29,6 +29,10 @@ var Vehicle_1 = require("./src/models/Vehicle");
|
|
|
29
29
|
Object.defineProperty(exports, "Vehicle", { enumerable: true, get: function () { return __importDefault(Vehicle_1).default; } });
|
|
30
30
|
var Document_1 = require("./src/models/Document");
|
|
31
31
|
Object.defineProperty(exports, "Document", { enumerable: true, get: function () { return __importDefault(Document_1).default; } });
|
|
32
|
+
var Garage_1 = require("./src/models/Garage");
|
|
33
|
+
Object.defineProperty(exports, "Garage", { enumerable: true, get: function () { return __importDefault(Garage_1).default; } });
|
|
34
|
+
var Schedule_1 = require("./src/models/Schedule");
|
|
35
|
+
Object.defineProperty(exports, "Schedule", { enumerable: true, get: function () { return __importDefault(Schedule_1).default; } });
|
|
32
36
|
// Export des méthodes utilitaires
|
|
33
37
|
var Tools_1 = require("./src/helpers/Tools");
|
|
34
38
|
Object.defineProperty(exports, "validateField", { enumerable: true, get: function () { return Tools_1.validateField; } });
|
|
@@ -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,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
|
@@ -14,9 +14,11 @@ export { default as Role } from './src/models/Role';
|
|
|
14
14
|
export { default as Address } from './src/models/Address';
|
|
15
15
|
export { default as Vehicle } from './src/models/Vehicle';
|
|
16
16
|
export { default as Document } from './src/models/Document';
|
|
17
|
+
export { default as Garage } from './src/models/Garage';
|
|
18
|
+
export { default as Schedule } from './src/models/Schedule';
|
|
17
19
|
|
|
18
20
|
// Export des types
|
|
19
|
-
export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm } from './src/helpers/Types';
|
|
21
|
+
export type { MovaFormField, MovaLoginForm, MovaUserSignUpForm, MovaInterval } from './src/helpers/Types';
|
|
20
22
|
|
|
21
23
|
// Export des méthodes utilitaires
|
|
22
24
|
export { validateField } from './src/helpers/Tools';
|
package/package.json
CHANGED
package/src/helpers/Types.ts
CHANGED
|
@@ -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
|
+
}
|