@movalib/movalib-commons 1.59.30 → 1.59.32

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.
@@ -46,10 +46,12 @@ export default class Event {
46
46
  documents?: Document[];
47
47
  customerReminders?: number;
48
48
  vehicleAvailableNotified?: boolean;
49
+ vehicleAvailableNotificationTime?: Date;
49
50
  editable?: boolean;
50
51
  vehicleDepositDate?: Date;
51
52
  vehicleDepositDateRequest?: Date;
52
53
  color?: string;
54
+ interventionEndTime?: Date;
53
55
  /** Propriété calculée pas toujours présent, pour savoir si les produits de cet event on été commandé au grossistes */
54
56
  hasProductOrdered?: boolean;
55
57
  /** Eventuels opérateurs associés à l'event */
@@ -63,6 +65,6 @@ export default class Event {
63
65
  garageVehicleId?: number;
64
66
  garageVehicleRequest?: boolean;
65
67
  origin?: string;
66
- 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, garageVehicleId?: number, garageVehicleRequest?: boolean);
68
+ 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, garageVehicleId?: number, garageVehicleRequest?: boolean, vehicleAvailableNotificationTime?: Date, interventionEndTime?: Date);
67
69
  static getPrestationsList(event: Event): string[];
68
70
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Event = /** @class */ (function () {
4
- function Event(id, ownerId, type, title, garageName, garageId, color, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified, editable, resourceId, garageVehicleId, garageVehicleRequest) {
4
+ function Event(id, ownerId, type, title, garageName, garageId, color, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified, editable, resourceId, garageVehicleId, garageVehicleRequest, vehicleAvailableNotificationTime, interventionEndTime) {
5
5
  this.id = id;
6
6
  this.notes = notes;
7
7
  this.ownerId = ownerId;
@@ -25,6 +25,8 @@ var Event = /** @class */ (function () {
25
25
  this.color = color;
26
26
  this.garageVehicleId = garageVehicleId;
27
27
  this.garageVehicleRequest = garageVehicleRequest;
28
+ this.vehicleAvailableNotificationTime = vehicleAvailableNotificationTime ? new Date(vehicleAvailableNotificationTime) : undefined;
29
+ this.interventionEndTime = interventionEndTime ? new Date(interventionEndTime) : undefined;
28
30
  }
29
31
  Event.getPrestationsList = function (event) {
30
32
  if (event && event.prestations) {
@@ -54,5 +54,6 @@ export default class Garage {
54
54
  paymentAuthorizationMinDowntime?: number;
55
55
  timezone: string;
56
56
  customStyle?: string;
57
- constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], dayPeriodFastServiceExcluded: boolean, loanerVehicleFastServiceExcluded: boolean, fastServiceThreshold: number, timezone: string, vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number);
57
+ mailCustomization?: boolean;
58
+ constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], dayPeriodFastServiceExcluded: boolean, loanerVehicleFastServiceExcluded: boolean, fastServiceThreshold: number, timezone: string, vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, customStyle?: string, subscription?: Subscription, partialWorkforce?: number, mailCustomization?: boolean);
58
59
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Garage = /** @class */ (function () {
4
- function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce) {
4
+ function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, prestationCategories, dayPeriodFastServiceExcluded, loanerVehicleFastServiceExcluded, fastServiceThreshold, timezone, vehicles, contactEmail, logo, suppliers, documents, subscriptions, loanerVehicleActive, loanerVehicleRequestActive, customStyle, subscription, partialWorkforce, mailCustomization) {
5
5
  this.id = id;
6
6
  this.adminId = adminId;
7
7
  this.name = name;
@@ -26,6 +26,7 @@ var Garage = /** @class */ (function () {
26
26
  this.fastServiceThreshold = fastServiceThreshold;
27
27
  this.customStyle = customStyle;
28
28
  this.timezone = timezone;
29
+ this.mailCustomization = mailCustomization;
29
30
  }
30
31
  return Garage;
31
32
  }());
@@ -23,6 +23,7 @@ export default class GarageService {
23
23
  garageId: string;
24
24
  }): Promise<APIResponse<Garage>>;
25
25
  static uploadLogo(garageId: string, formData: FormData): Promise<APIResponse<string>>;
26
+ static sendInterventionEnd(garageId: string, eventId: string): Promise<APIResponse<string>>;
26
27
  static sendAppointmentVehicleAvailable(garageId: string, eventId: string): Promise<APIResponse<string>>;
27
28
  static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
28
29
  static disableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
@@ -137,6 +137,13 @@ var GarageService = /** @class */ (function () {
137
137
  body: formData,
138
138
  });
139
139
  };
140
+ GarageService.sendInterventionEnd = function (garageId, eventId) {
141
+ return (0, ApiHelper_1.request)({
142
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/intervention-end"),
143
+ method: Enums_1.APIMethod.POST,
144
+ appType: Enums_1.MovaAppType.GARAGE,
145
+ });
146
+ };
140
147
  GarageService.sendAppointmentVehicleAvailable = function (garageId, eventId) {
141
148
  return (0, ApiHelper_1.request)({
142
149
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle-available"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.59.30",
3
+ "version": "1.59.32",
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",
@@ -23,6 +23,7 @@ import { AttachFile } from '@mui/icons-material';
23
23
  import { LinkedDocumentDialog } from '../LinkedDocumentDialog';
24
24
  import User from '../../models/User';
25
25
  import CatPlateBg from '../../assets/images/car_plate_bg.png';
26
+ import { DatePicker } from '@mui/x-date-pickers';
26
27
 
27
28
  interface VehicleFullCardProps {
28
29
  currentUser: User,
@@ -46,7 +47,9 @@ const initialUserFormState = {
46
47
  tireWidth: { value: '', isValid: true },
47
48
  tireHeight: { value: '', isValid: true },
48
49
  tireDiameter: { value: '', isValid: true },
49
- tireSpeedIndex: { value: '', isValid: true }
50
+ tireSpeedIndex: { value: '', isValid: true },
51
+ lastInspectionDate: { value: null, isValid: true },
52
+ lastMaintenanceDate: { value: null, isValid: true }
50
53
  }
51
54
 
52
55
  const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError, onUploadDocument, onDeleteDocument, appType, editMode = false, focused = false, onUpdate, onDelete, currentUpload, currentUser }) => {
@@ -80,7 +83,8 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
80
83
  }, [vehicle]);
81
84
 
82
85
  const initForm = () => {
83
- if (vehicle) {
86
+ if (vehicle)
87
+ {
84
88
 
85
89
  setForm(prevForm => (
86
90
  { ...prevForm, ['currentMileage']: { ...prevForm['currentMileage'], value: vehicle.currentMileage } }));
@@ -94,6 +98,10 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
94
98
  { ...prevForm, ['tireDiameter']: { ...prevForm['tireDiameter'], value: vehicle.tireDiameter } }));
95
99
  setForm(prevForm => (
96
100
  { ...prevForm, ['tireSpeedIndex']: { ...prevForm['tireSpeedIndex'], value: vehicle.tireSpeedIndex } }));
101
+ setForm(prevForm => (
102
+ { ...prevForm, ['lastInspectionDate']: { ...prevForm['lastInspectionDate'], value: vehicle.lastInspectionDate ? new Date(vehicle.lastInspectionDate) : null } }));
103
+ setForm(prevForm => (
104
+ { ...prevForm, ['lastMaintenanceDate']: { ...prevForm['lastMaintenanceDate'], value: vehicle.lastMaintenanceDate ? new Date(vehicle.lastMaintenanceDate) : null } }));
97
105
 
98
106
  if (isVehicleTireSizeDefined(vehicle))
99
107
  {
@@ -107,10 +115,12 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
107
115
 
108
116
  const toggleShowLinkedDocument = (docType: DocumentType | null) => {
109
117
  setShowLinkedDocument(!isShowLinkedDocument);
110
- if (docType && invoiceInputRef.current) {
118
+ if (docType && invoiceInputRef.current)
119
+ {
111
120
  docTypeCurrent.current = docType;
112
121
  invoiceInputRef.current.click();
113
- } else {
122
+ } else
123
+ {
114
124
  docTypeCurrent.current = undefined;
115
125
  }
116
126
  }
@@ -142,18 +152,21 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
142
152
  }
143
153
 
144
154
  const handleChange = (fieldName: string, fieldValue: string): void => {
155
+ console.log(fieldName, fieldValue);
145
156
  const newField: MovaFormField = { [fieldName]: { value: fieldValue, isValid: true } };
146
157
 
147
158
  setForm({ ...form, ...newField });
148
159
  }
149
160
 
150
161
  const uploadVehicleDocument = (document: File, documentType: DocumentType) => {
151
- if (document.size > 10000000) {
162
+ if (document.size > 10000000)
163
+ {
152
164
  setSizeLimit(true);
153
165
  return;
154
166
  }
155
167
 
156
- if (vehicle && document && documentType) {
168
+ if (vehicle && document && documentType)
169
+ {
157
170
 
158
171
  // Utilisation d'un formData pour permettre le trasnfert de fichier vers l'API
159
172
  let formData = new FormData();
@@ -175,7 +188,8 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
175
188
  const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>, docType: DocumentType) => {
176
189
  event.preventDefault();
177
190
 
178
- if (event && event.target.files && event.target.files.length > 0 && docType) {
191
+ if (event && event.target.files && event.target.files.length > 0 && docType)
192
+ {
179
193
  uploadVehicleDocument(event.target.files[0], docType);
180
194
  }
181
195
 
@@ -192,6 +206,7 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
192
206
  { ...prevForm, ['tireSize']: { ...prevForm['tireSize'], value: vehicleTire, isValid: isValid } }));
193
207
  }
194
208
 
209
+
195
210
  const handleOnClickDeleteVehicle = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
196
211
  e.preventDefault();
197
212
  setOpenConfirmVehicleDelete(true);
@@ -205,7 +220,8 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
205
220
 
206
221
  const handleOnClickValidate = () => {
207
222
 
208
- if (validateForm()) {
223
+ if (validateForm())
224
+ {
209
225
 
210
226
  Logger.info(form.tireSize.value);
211
227
 
@@ -215,7 +231,9 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
215
231
  tireWidth: form.tireSize.isValid && form.tireSize.value ? (form.tireSize.value as VehicleTire).width : undefined,
216
232
  tireHeight: form.tireSize.isValid && form.tireSize.value ? (form.tireSize.value as VehicleTire).height : undefined,
217
233
  tireDiameter: form.tireSize.isValid && form.tireSize.value ? (form.tireSize.value as VehicleTire).diameter : undefined,
218
- tireSpeedIndex: form.tireSize.isValid && form.tireSize.value ? (form.tireSize.value as VehicleTire).speedIndex : undefined
234
+ tireSpeedIndex: form.tireSize.isValid && form.tireSize.value ? (form.tireSize.value as VehicleTire).speedIndex : undefined,
235
+ lastInspectionDate: form.lastInspectionDate.value,
236
+ lastMaintenanceDate: form.lastMaintenanceDate.value,
219
237
  }
220
238
  Logger.info(query)
221
239
 
@@ -245,7 +263,8 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
245
263
  const handleConfirmDocumentDelete = () => {
246
264
  setOpenConfirmDocumentDelete(false);
247
265
 
248
- if (vehicle && documentToDelete) {
266
+ if (vehicle && documentToDelete)
267
+ {
249
268
 
250
269
  // Appel du callback correspondant
251
270
  if (onDeleteDocument)
@@ -256,7 +275,8 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
256
275
  const handleConfirmVehicleDelete = () => {
257
276
  setOpenConfirmVehicleDelete(false);
258
277
 
259
- if (vehicle && onDelete) {
278
+ if (vehicle && onDelete)
279
+ {
260
280
 
261
281
  // Appel du callback correspondant
262
282
  onDelete();
@@ -280,12 +300,12 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
280
300
  </Typography>
281
301
  <Grid container justifyContent="space-between">
282
302
 
283
- <Grid container sx={{ mb: 1, alignItems: 'center', justifyContent: 'center' }}>
284
- <Grid item xs={6} sx={{ position: 'relative', minWidth: '234px'}}>
303
+ <Grid container sx={{ mb: 1, alignItems: 'center', justifyContent: 'center' }}>
304
+ <Grid item xs={6} sx={{ position: 'relative', minWidth: '234px' }}>
285
305
  <img
286
306
  src={CatPlateBg}
287
307
  alt="Plaque d'immatriculation"
288
- style={{ height: '50px', position: 'relative', }}
308
+ style={{ height: '50px', position: 'relative', }}
289
309
  />
290
310
  <Typography
291
311
  variant='h6'
@@ -395,6 +415,64 @@ const VehicleFullCard: FC<VehicleFullCardProps> = ({ vehicle, fullwidth, onError
395
415
  />
396
416
  </Grid>}
397
417
 
418
+ {!localEditMode && <Grid container textAlign='justify' sx={{ pt: 2 }}>
419
+ <Grid item xs={8} >
420
+ <Typography variant="body1" color="text.secondary">
421
+ Dernier contrôle technique :
422
+ </Typography>
423
+ </Grid>
424
+ <Grid item xs={4} sx={{ textAlign: 'right' }}>
425
+ <Typography variant="body1" color="text.secondary">
426
+ <b>{formatDateByTimezone(vehicle.lastInspectionDate, 'Europe/Paris', DateFormatTypes.SHORT_FORMAT_DATE) !== '' ? formatDateByTimezone(vehicle.lastInspectionDate, 'Europe/Paris', DateFormatTypes.SHORT_FORMAT_DATE) : '-'}</b>
427
+ </Typography>
428
+ </Grid>
429
+ </Grid>}
430
+
431
+ {localEditMode && <Grid item xs={12}>
432
+ <FormControl fullWidth sx={{marginTop: 2}}>
433
+ <DatePicker
434
+ label={"Dernier contrôle technique"}
435
+ name={'lastInspectionDate'}
436
+ value={form.lastInspectionDate.value}
437
+ format='dd/MM/yyyy'
438
+ formatDensity='dense'
439
+ views={['day']}
440
+ displayWeekNumber
441
+ onChange={(e)=>handleChange('lastInspectionDate',e)}
442
+ />
443
+ </FormControl>
444
+ </Grid>}
445
+
446
+ {!localEditMode && <Grid container textAlign='justify' sx={{ pt: 2 }}>
447
+ <Grid item xs={8} >
448
+ <Typography variant="body1" color="text.secondary">
449
+ Dernier entretien :
450
+ </Typography>
451
+ </Grid>
452
+ <Grid item xs={4} sx={{ textAlign: 'right' }}>
453
+ <Typography variant="body1" color="text.secondary">
454
+ <b>{formatDateByTimezone(vehicle.lastMaintenanceDate, 'Europe/Paris', DateFormatTypes.SHORT_FORMAT_DATE) !== '' ? formatDateByTimezone(vehicle.lastMaintenanceDate, 'Europe/Paris', DateFormatTypes.SHORT_FORMAT_DATE) : '-'}</b>
455
+ </Typography>
456
+ </Grid>
457
+ </Grid>}
458
+
459
+ {localEditMode && <Grid item xs={12}>
460
+ <FormControl fullWidth sx={{marginTop: 2}}>
461
+ <DatePicker
462
+ label={"Dernier entretient"}
463
+ name={'lastMaintenanceDate'}
464
+ value={form.lastMaintenanceDate.value}
465
+ format='dd/MM/yyyy'
466
+ formatDensity='dense'
467
+ views={['day']}
468
+ displayWeekNumber
469
+ onChange={(e)=>handleChange('lastMaintenanceDate',e)}
470
+ />
471
+ </FormControl>
472
+ </Grid>}
473
+
474
+
475
+
398
476
  </Grid>
399
477
 
400
478
  {!localEditMode && <>
@@ -15,7 +15,9 @@ export type MovaVehicleForm = {
15
15
  tireWidth: MovaFormField,
16
16
  tireHeight: MovaFormField,
17
17
  tireDiameter: MovaFormField,
18
- tireSpeedIndex: MovaFormField
18
+ tireSpeedIndex: MovaFormField,
19
+ lastInspectionDate: MovaFormField,
20
+ lastMaintenanceDate: MovaFormField,
19
21
  }
20
22
 
21
23
  /**
@@ -49,11 +49,12 @@ export default class Event {
49
49
  documents?: Document[];
50
50
  customerReminders?: number;
51
51
  vehicleAvailableNotified?: boolean;
52
+ vehicleAvailableNotificationTime?:Date
52
53
  editable?: boolean;
53
54
  vehicleDepositDate?: Date;
54
55
  vehicleDepositDateRequest?: Date;
55
56
  color?: string;
56
-
57
+ interventionEndTime?: Date;
57
58
  /** Propriété calculée pas toujours présent, pour savoir si les produits de cet event on été commandé au grossistes */
58
59
  hasProductOrdered?: boolean;
59
60
 
@@ -74,7 +75,7 @@ export default class Event {
74
75
  constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,color: string,
75
76
  state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
76
77
  guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean,
77
- resourceId?: number, garageVehicleId?: number, garageVehicleRequest?: boolean)
78
+ resourceId?: number, garageVehicleId?: number, garageVehicleRequest?: boolean, vehicleAvailableNotificationTime?: Date, interventionEndTime?: Date)
78
79
  {
79
80
  this.id = id;
80
81
  this.notes = notes;
@@ -99,6 +100,8 @@ export default class Event {
99
100
  this.color = color;
100
101
  this.garageVehicleId = garageVehicleId;
101
102
  this.garageVehicleRequest = garageVehicleRequest;
103
+ this.vehicleAvailableNotificationTime = vehicleAvailableNotificationTime ? new Date(vehicleAvailableNotificationTime) : undefined;
104
+ this.interventionEndTime = interventionEndTime ? new Date(interventionEndTime) : undefined;
102
105
  }
103
106
 
104
107
  static getPrestationsList(event: Event) : string[] {
@@ -55,6 +55,7 @@ export default class Garage {
55
55
  paymentAuthorizationMinDowntime?: number;
56
56
  timezone: string;
57
57
  customStyle?: string;
58
+ mailCustomization?: boolean;
58
59
 
59
60
  constructor(
60
61
  id:string,
@@ -81,6 +82,7 @@ export default class Garage {
81
82
  customStyle?: string,
82
83
  subscription?: Subscription,
83
84
  partialWorkforce?: number,
85
+ mailCustomization?: boolean,
84
86
  ) {
85
87
  this.id = id;
86
88
  this.adminId = adminId;
@@ -106,5 +108,6 @@ export default class Garage {
106
108
  this.fastServiceThreshold = fastServiceThreshold;
107
109
  this.customStyle = customStyle;
108
110
  this.timezone = timezone;
111
+ this.mailCustomization = mailCustomization;
109
112
  }
110
113
  }
@@ -34,6 +34,8 @@ export default class Vehicle {
34
34
  tireWidth: string;
35
35
  documents : Document[];
36
36
  tireSize: VehicleTire;
37
+ lastInspectionDate: Date;
38
+ lastMaintenanceDate: Date;
37
39
 
38
40
  constructor(
39
41
  id: number,
@@ -53,7 +55,9 @@ export default class Vehicle {
53
55
  tireSpeedIndex: string,
54
56
  tireWidth: string,
55
57
  documents: Document[],
56
- tireSize: VehicleTire
58
+ tireSize: VehicleTire,
59
+ lastInspectionDate: Date,
60
+ lastMaintenanceDate: Date
57
61
  ) {
58
62
  this.id = id;
59
63
  this.ownerId = ownerId;
@@ -73,6 +77,8 @@ export default class Vehicle {
73
77
  this.tireWidth = tireWidth;
74
78
  this.documents = documents;
75
79
  this.tireSize = tireSize;
80
+ this.lastInspectionDate = lastInspectionDate;
81
+ this.lastMaintenanceDate = lastMaintenanceDate;
76
82
  }
77
83
 
78
84
  getVehicleLabel() {
@@ -171,6 +171,17 @@ export default class GarageService {
171
171
  });
172
172
  }
173
173
 
174
+ static sendInterventionEnd(
175
+ garageId: string,
176
+ eventId: string,
177
+ ): Promise<APIResponse<string>> {
178
+ return request({
179
+ url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/intervention-end`,
180
+ method: APIMethod.POST,
181
+ appType: MovaAppType.GARAGE,
182
+ });
183
+ }
184
+
174
185
  static sendAppointmentVehicleAvailable(
175
186
  garageId: string,
176
187
  eventId: string,
@@ -15,6 +15,8 @@ export type AddCustomerVehicleParams = {
15
15
  tireHeight?: string;
16
16
  tireDiameter?: string;
17
17
  tireSpeedIndex?: string;
18
+ lastMaintenanceDate?: string;
19
+ lastInspectionDate?: string;
18
20
  }
19
21
 
20
22