@movalib/movalib-commons 1.55.8 → 1.57.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.
@@ -56,6 +56,8 @@ export default class Event {
56
56
  resourceId?: number;
57
57
  /** Quand l'event contient la prestation "Autres" alors ce champs est obligatoire et précise la prestation */
58
58
  otherReason?: string;
59
+ repairOrderNumber?: number;
60
+ orderComment?: string;
59
61
  constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageId: number, 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);
60
62
  static getPrestationsList(event: Event): string[];
61
63
  }
@@ -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 setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
6
7
  static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
7
8
  static updateEventEmployee(garageId: string, eventId: string, employeeId: string): Promise<APIResponse<string>>;
8
9
  static updateVehicleGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
@@ -16,6 +16,14 @@ var Enums_1 = require("../helpers/Enums");
16
16
  var GarageService = /** @class */ (function () {
17
17
  function GarageService() {
18
18
  }
19
+ GarageService.setOrderedEvent = function (garageId, eventId, req) {
20
+ return (0, ApiHelper_1.request)({
21
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/ordered"),
22
+ method: Enums_1.APIMethod.POST,
23
+ appType: Enums_1.MovaAppType.GARAGE,
24
+ body: JSON.stringify(req)
25
+ });
26
+ };
19
27
  GarageService.deleteEventEmployee = function (garageId, eventId) {
20
28
  return (0, ApiHelper_1.request)({
21
29
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/employees"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.55.8",
3
+ "version": "1.57.0",
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",
@@ -63,6 +63,9 @@ export default class Event {
63
63
  /** Quand l'event contient la prestation "Autres" alors ce champs est obligatoire et précise la prestation */
64
64
  otherReason?: string;
65
65
 
66
+ repairOrderNumber?: number;
67
+ orderComment?: string;
68
+
66
69
  constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,
67
70
  state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
68
71
  guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean, resourceId?: number)
@@ -6,6 +6,15 @@ import {AddCustomerVehicleParams, DeleteCustomerVehicleParams} from "./GarageSer
6
6
 
7
7
  export default class GarageService {
8
8
 
9
+ static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
10
+ return request({
11
+ url: `${API_BASE_URL}/garage/${garageId}/events/${eventId}/ordered`,
12
+ method: APIMethod.POST,
13
+ appType: MovaAppType.GARAGE,
14
+ body: JSON.stringify(req)
15
+ });
16
+ }
17
+
9
18
  static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>> {
10
19
  return request({
11
20
  url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/employees`,