@movalib/movalib-commons 1.58.0 → 1.59.1
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.
|
@@ -59,6 +59,7 @@ export default class Event {
|
|
|
59
59
|
otherReason?: string;
|
|
60
60
|
repairOrderNumber?: number;
|
|
61
61
|
orderComment?: string;
|
|
62
|
+
vehicleReceived?: boolean;
|
|
62
63
|
constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageId: number, color: string, state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[], guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean, resourceId?: number);
|
|
63
64
|
static getPrestationsList(event: Event): string[];
|
|
64
65
|
}
|
|
@@ -3,6 +3,7 @@ import Employee from "../models/Employee";
|
|
|
3
3
|
import Garage from "../models/Garage";
|
|
4
4
|
import { AddCustomerVehicleParams, DeleteCustomerVehicleParams } from "./GarageService.types";
|
|
5
5
|
export default class GarageService {
|
|
6
|
+
static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
6
7
|
static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
|
|
7
8
|
static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
8
9
|
static updateEventEmployee(garageId: string, eventId: string, employeeId: string): Promise<APIResponse<string>>;
|
|
@@ -16,6 +16,13 @@ var Enums_1 = require("../helpers/Enums");
|
|
|
16
16
|
var GarageService = /** @class */ (function () {
|
|
17
17
|
function GarageService() {
|
|
18
18
|
}
|
|
19
|
+
GarageService.toogleEventVehicleReceived = function (garageId, eventId) {
|
|
20
|
+
return (0, ApiHelper_1.request)({
|
|
21
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/vehicle-received"),
|
|
22
|
+
method: Enums_1.APIMethod.PATCH,
|
|
23
|
+
appType: Enums_1.MovaAppType.GARAGE
|
|
24
|
+
});
|
|
25
|
+
};
|
|
19
26
|
GarageService.setOrderedEvent = function (garageId, eventId, req) {
|
|
20
27
|
return (0, ApiHelper_1.request)({
|
|
21
28
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/ordered"),
|
package/package.json
CHANGED
package/src/models/Event.ts
CHANGED
|
@@ -66,6 +66,7 @@ export default class Event {
|
|
|
66
66
|
|
|
67
67
|
repairOrderNumber?: number;
|
|
68
68
|
orderComment?: string;
|
|
69
|
+
vehicleReceived?: boolean;
|
|
69
70
|
|
|
70
71
|
constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,color: string,
|
|
71
72
|
state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
|
|
@@ -6,6 +6,14 @@ import {AddCustomerVehicleParams, DeleteCustomerVehicleParams} from "./GarageSer
|
|
|
6
6
|
|
|
7
7
|
export default class GarageService {
|
|
8
8
|
|
|
9
|
+
static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>> {
|
|
10
|
+
return request({
|
|
11
|
+
url: `${API_BASE_URL}/garage/${garageId}/events/${eventId}/vehicle-received`,
|
|
12
|
+
method: APIMethod.PATCH,
|
|
13
|
+
appType: MovaAppType.GARAGE
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
|
|
10
18
|
return request({
|
|
11
19
|
url: `${API_BASE_URL}/garage/${garageId}/events/${eventId}/ordered`,
|