@movalib/movalib-commons 1.4.0 → 1.6.0
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.
|
@@ -21,5 +21,6 @@ export default class Prestation {
|
|
|
21
21
|
* La notion de position (ou d'ordre) peut être utile à l'affichage d'une liste de prestation par exemple
|
|
22
22
|
*/
|
|
23
23
|
position: number;
|
|
24
|
-
|
|
24
|
+
active: boolean;
|
|
25
|
+
constructor(id: number, code: string, name: string, description: string, category: string, downtime: number, appointmentDelay: number, position: number, active: boolean, operations?: Operation[]);
|
|
25
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Prestation = /** @class */ (function () {
|
|
4
|
-
function Prestation(id, code, name, description, category, downtime, appointmentDelay, position, operations) {
|
|
4
|
+
function Prestation(id, code, name, description, category, downtime, appointmentDelay, position, active, operations) {
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.code = code;
|
|
7
7
|
this.name = name;
|
|
@@ -10,6 +10,7 @@ var Prestation = /** @class */ (function () {
|
|
|
10
10
|
this.downtime = downtime;
|
|
11
11
|
this.appointmentDelay = appointmentDelay;
|
|
12
12
|
this.position = position;
|
|
13
|
+
this.active = active;
|
|
13
14
|
this.operations = operations;
|
|
14
15
|
}
|
|
15
16
|
return Prestation;
|
|
@@ -2,6 +2,7 @@ import { APIResponse } from "../helpers/ApiHelper";
|
|
|
2
2
|
import Employee from "../models/Employee";
|
|
3
3
|
import Garage from "../models/Garage";
|
|
4
4
|
export default class GarageService {
|
|
5
|
+
static sendAppointmentVehicleAvailable(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
5
6
|
static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
|
|
6
7
|
static disableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
|
|
7
8
|
static getEmployeeDetails(garageId: string, employeeId: string): Promise<APIResponse<Employee>>;
|
|
@@ -5,6 +5,13 @@ var Enums_1 = require("../helpers/Enums");
|
|
|
5
5
|
var GarageService = /** @class */ (function () {
|
|
6
6
|
function GarageService() {
|
|
7
7
|
}
|
|
8
|
+
GarageService.sendAppointmentVehicleAvailable = function (garageId, eventId) {
|
|
9
|
+
return (0, ApiHelper_1.request)({
|
|
10
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle-available"),
|
|
11
|
+
method: Enums_1.APIMethod.POST,
|
|
12
|
+
appType: Enums_1.MovaAppType.GARAGE
|
|
13
|
+
});
|
|
14
|
+
};
|
|
8
15
|
GarageService.enableGaragePrestation = function (garageId, prestationId) {
|
|
9
16
|
return (0, ApiHelper_1.request)({
|
|
10
17
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId, "/enable"),
|
package/package.json
CHANGED
package/src/models/Prestation.ts
CHANGED
|
@@ -24,9 +24,11 @@ export default class Prestation {
|
|
|
24
24
|
* La notion de position (ou d'ordre) peut être utile à l'affichage d'une liste de prestation par exemple
|
|
25
25
|
*/
|
|
26
26
|
position: number;
|
|
27
|
+
|
|
28
|
+
active:boolean;
|
|
27
29
|
|
|
28
30
|
constructor(id:number, code: string, name:string, description: string, category:string,
|
|
29
|
-
downtime:number, appointmentDelay: number, position: number, operations?: Operation[]) {
|
|
31
|
+
downtime:number, appointmentDelay: number, position: number, active: boolean, operations?: Operation[]) {
|
|
30
32
|
this.id = id;
|
|
31
33
|
this.code = code;
|
|
32
34
|
this.name = name;
|
|
@@ -35,6 +37,7 @@ export default class Prestation {
|
|
|
35
37
|
this.downtime = downtime;
|
|
36
38
|
this.appointmentDelay = appointmentDelay;
|
|
37
39
|
this.position = position;
|
|
40
|
+
this.active = active;
|
|
38
41
|
this.operations = operations;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -5,6 +5,14 @@ import Garage from "../models/Garage";
|
|
|
5
5
|
|
|
6
6
|
export default class GarageService {
|
|
7
7
|
|
|
8
|
+
static sendAppointmentVehicleAvailable(garageId: string, eventId: string): Promise<APIResponse<string>> {
|
|
9
|
+
return request({
|
|
10
|
+
url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/vehicle-available`,
|
|
11
|
+
method: APIMethod.POST,
|
|
12
|
+
appType: MovaAppType.GARAGE
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>> {
|
|
9
17
|
return request({
|
|
10
18
|
url: `${API_BASE_URL}/garage/${garageId}/prestations/${prestationId}/enable`,
|