kui-crm_actions 0.0.150 → 0.0.152

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/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as kui_crm from 'kui-crm';
2
- import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, CityParams, RoomTypes, RenovationParams, RoomParams, HouseTypes, WallMaterials, OverlapTypes, GasTypes, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, ContractLinkModel, ImageBodyRequest, FileBodyRequest, RoomType, ApartmentMetroParams, ApartmentMainInfoModelFields, HouseInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields, FillingTypes, FillingListItemModel, FillingInfoFormFields as FillingInfoFormFields$1, FillingTagsAutocompleteFields, ApartmentFillingVariants, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentWithHouseInfoModelFields, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, BasicMeterFieldsSettings, InputByTypeProps, BasicMeterFeaturesFormFields, InspectionFeedbackParams, GeolocationParams } from 'kui-crm';
2
+ import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes, CityParams, ApartmentMetroStationsParams, RoomTypes, RenovationParams, RoomParams, HouseTypes, WallMaterials, OverlapTypes, GasTypes, ImageStore, ApartmentDescriptionParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, ContractLinkModel, ImageBodyRequest, FileBodyRequest, RoomType, ApartmentMetroParams, ApartmentMainInfoModelFields, HouseInfoModelFields, PostInspectionFillingListModel, TransferInspectionTypes as TransferInspectionTypes$1, ApartmentDetailInfoModelFields, FillingTypes, FillingListItemModel, FillingInfoFormFields as FillingInfoFormFields$1, FillingTagsAutocompleteFields, ApartmentFillingVariants, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentWithHouseInfoModelFields, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, BasicMeterFieldsSettings, InputByTypeProps, BasicMeterFeaturesFormFields, InspectionFeedbackParams, GeolocationParams } from 'kui-crm';
3
3
  import { DateTime } from 'luxon';
4
4
  import { Loader, MultistepForm, PhoneParams as PhoneParams$1 } from 'kui-utils';
5
5
  import * as yup from 'yup';
6
- import { UseFormReturn } from 'react-hook-form';
7
6
  import { InputWithAddressFields } from 'kui-complex/dist/InputWithAddressAutocomplete';
7
+ import { UseFormReturn } from 'react-hook-form';
8
8
  import { ReactElement } from 'react';
9
9
 
10
10
  declare const getPartialMeterInfoSchema: (valuesFields: InputParams<any>[]) => yup.ObjectSchema<{
@@ -99,78 +99,6 @@ type InspectionImageFieldsSettings = {
99
99
  [key: string]: any
100
100
  }
101
101
 
102
- type InspectionFillingCardProps = {
103
- className?: string
104
- form: UseFormReturn<any>
105
- index: number
106
- filling: FillingCheckParams
107
- warningLabel: string
108
- disabled?: boolean
109
- }
110
-
111
- type InspectionFillingItemFields = {
112
- id: number
113
- check?: boolean | null
114
- }
115
-
116
- type InspectionFillingListFields = {
117
- fillingList: InspectionFillingItemFields[]
118
- }
119
-
120
- declare const InspectionFillingCard: (props: InspectionFillingCardProps) => JSX.Element;
121
-
122
- type TransferInspectionTypes =
123
- | "maroom_tenant"
124
- | "tenant_maroom"
125
- | "maroom_landlord"
126
- | "tenant_landlord"
127
-
128
- type RegularInspectionFormFields = CommonInspectionFormFields &
129
- InspectionPartialMetersStepFields &
130
- InspectionRoomsImagesFields &
131
- InspectionFillingListFields
132
-
133
- type TransferInspectionFormFields = {
134
- transferType: TransferInspectionTypes
135
- } & CommonInspectionFormFields &
136
- InspectionPartialMetersStepFields &
137
- InspectionRoomsImagesFields &
138
- InspectionFillingListFields
139
-
140
- type MeterValue = string | number | null
141
-
142
- type MeterValuesFields = {
143
- resource: ResourceTypes
144
- type?: MeterTypes
145
- value?: MeterValue
146
- T1?: MeterValue
147
- T2?: MeterValue
148
- T3?: MeterValue
149
- initialValue?: MeterValue
150
- initialValueT1?: MeterValue
151
- initialValueT2?: MeterValue
152
- initialValueT3?: MeterValue
153
- }
154
-
155
- type RoomImagesParams = {
156
- type: InspectionRoomPhotoTypes
157
- comment?: string
158
- images: ImageStore[]
159
- roomNumber?: number
160
- }
161
-
162
- type ApartmentDescriptionWithMetro = ApartmentDescriptionParams &
163
- ApartmentMetroStationsParams
164
-
165
- type FillingCheckParams = {
166
- id: number
167
- name: string
168
- tagName: string
169
- serialNumber?: string
170
- numberOfSubjects?: number | string | null
171
- wasMissing?: boolean
172
- }
173
-
174
102
  type BasicApartmentInfoStepFields = {
175
103
  apartment: InputWithAddressFields
176
104
  apartmentNumber: number | string | null
@@ -243,6 +171,78 @@ type InitialInspectionInfoFields = BasicApartmentInfoStepFields &
243
171
  DetailApartmentInfoStepFields &
244
172
  HouseInfoStepFields
245
173
 
174
+ type InspectionFillingCardProps = {
175
+ className?: string
176
+ form: UseFormReturn<any>
177
+ index: number
178
+ filling: FillingCheckParams
179
+ warningLabel: string
180
+ disabled?: boolean
181
+ }
182
+
183
+ type InspectionFillingItemFields = {
184
+ id: number
185
+ check?: boolean | null
186
+ }
187
+
188
+ type InspectionFillingListFields = {
189
+ fillingList: InspectionFillingItemFields[]
190
+ }
191
+
192
+ declare const InspectionFillingCard: (props: InspectionFillingCardProps) => JSX.Element;
193
+
194
+ type TransferInspectionTypes =
195
+ | "maroom_tenant"
196
+ | "tenant_maroom"
197
+ | "maroom_landlord"
198
+ | "tenant_landlord"
199
+
200
+ type RegularInspectionFormFields = CommonInspectionFormFields &
201
+ InspectionPartialMetersStepFields &
202
+ InspectionRoomsImagesFields &
203
+ InspectionFillingListFields
204
+
205
+ type TransferInspectionFormFields = {
206
+ transferType: TransferInspectionTypes
207
+ } & CommonInspectionFormFields &
208
+ InspectionPartialMetersStepFields &
209
+ InspectionRoomsImagesFields &
210
+ InspectionFillingListFields
211
+
212
+ type MeterValue = string | number | null
213
+
214
+ type MeterValuesFields = {
215
+ resource: ResourceTypes
216
+ type?: MeterTypes
217
+ value?: MeterValue
218
+ T1?: MeterValue
219
+ T2?: MeterValue
220
+ T3?: MeterValue
221
+ initialValue?: MeterValue
222
+ initialValueT1?: MeterValue
223
+ initialValueT2?: MeterValue
224
+ initialValueT3?: MeterValue
225
+ }
226
+
227
+ type RoomImagesParams = {
228
+ type: InspectionRoomPhotoTypes
229
+ comment?: string
230
+ images: ImageStore[]
231
+ roomNumber?: number
232
+ }
233
+
234
+ type ApartmentDescriptionWithMetro = ApartmentDescriptionParams &
235
+ ApartmentMetroStationsParams
236
+
237
+ type FillingCheckParams = {
238
+ id: number
239
+ name: string
240
+ tagName: string
241
+ serialNumber?: string
242
+ numberOfSubjects?: number | string | null
243
+ wasMissing?: boolean
244
+ }
245
+
246
246
  type HouseServicesInfoStepFields = {
247
247
  hasBarrier: boolean | null
248
248
  barrierPhone: PhoneParams | null
@@ -384,7 +384,7 @@ declare type RegularlyInspectionFieldsBody = {
384
384
  meters: PartialMeterModel[];
385
385
  } & PostInspectionFillingListModel;
386
386
  declare type TransferInspectionFieldsBody = {
387
- transfer_type: TransferInspectionTypes;
387
+ transfer_type: TransferInspectionTypes$1;
388
388
  meters: PartialMeterModel[];
389
389
  contract_document?: FileBodyRequest | null;
390
390
  } & PostInspectionFillingListModel;
@@ -426,7 +426,7 @@ declare type InspectionTypesResponse = {
426
426
  inspection_types: InspectionTypes[];
427
427
  };
428
428
  declare type TransferTypesResponse = {
429
- transfer_inspection_types: TransferInspectionTypes[];
429
+ transfer_inspection_types: TransferInspectionTypes$1[];
430
430
  };
431
431
 
432
432
  declare class FillingListStore {
@@ -502,8 +502,9 @@ type InventoryInspectionPostFormFields = {
502
502
  } & Omit<InventoryInspectionFormFields, "fillingList">
503
503
 
504
504
  declare const inspectionsRequests: {
505
- getInspectionTypes(apartmentId: number): Promise<(Error | undefined)[] | (InspectionTypes[] | null)[]>;
506
- getTransferTypes(apartmentId: number): Promise<(Error | undefined)[] | (TransferInspectionTypes[] | null)[]>;
505
+ createInspectionHandler(apartmentId: number, loader: Loader, callback: () => Promise<any>): Promise<number | null | undefined>;
506
+ getInspectionTypes(apartmentId: number): Promise<[Error | null, InspectionTypes[] | undefined]>;
507
+ getTransferTypes(apartmentId: number): Promise<[Error | null, TransferInspectionTypes$1[] | undefined]>;
507
508
  createInspection(apartmentId: number, body: any, loader: Loader): Promise<number | undefined>;
508
509
  createInitialInspection(data: InitialInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
509
510
  createRegularInspection(data: RegularInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
@@ -513,6 +514,7 @@ declare const inspectionsRequests: {
513
514
  purpose: kui_crm.InspectionRoomPhotoTypes;
514
515
  comment: string;
515
516
  photos: kui_crm.ImageBodyRequest[];
517
+ room_order_number: number | undefined;
516
518
  }[];
517
519
  };
518
520
 
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as yup from 'yup';
2
- import { NumberField, requests, uploadNewFile, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, defaultRequiredMessage, HouseTypesValues, WallMaterialsValues, SlabsTypesValues, GasTypesValues, BooleanValues, positiveNumberSchema, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, ParkingTypesValues, fieldWithConditionSchema, BigCheckbox, getApartmentPaymentFields, phoneWithConditionSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, getMeterValuesFieldsSchema, basicFieldsOfNewResourceMeter, meterUnitLabel, FormWrapper, MeterTypeRadioGroup, InputByType, Tooltip, ApartmentsAgent, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
2
+ import { NumberField, KUISettings, requests, uploadNewFile, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, defaultRequiredMessage, HouseTypesValues, WallMaterialsValues, SlabsTypesValues, GasTypesValues, BooleanValues, positiveNumberSchema, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, ParkingTypesValues, fieldWithConditionSchema, BigCheckbox, getApartmentPaymentFields, phoneWithConditionSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, getMeterValuesFieldsSchema, basicFieldsOfNewResourceMeter, meterUnitLabel, FormWrapper, MeterTypeRadioGroup, InputByType, Tooltip, ApartmentsAgent, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
3
3
  import _ from 'lodash';
4
4
  import { clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises, getPhoneParamsFromString, addToArrayByCondition, Loader, clearIndexStores, addToIndexDBWithQueue, initIndexDB, readFromIndexDB, addIndexDBStore } from 'kui-utils';
5
5
  import to from 'await-to-js';
@@ -252,14 +252,14 @@ var inspectionsRequestBody = {
252
252
  getPartialInspectionMeters: function (meters) {
253
253
  var _this = this;
254
254
  return {
255
- meters: meters.map(function (meter, index) { return ({
255
+ meters: (meters === null || meters === void 0 ? void 0 : meters.map(function (meter, index) { return ({
256
256
  id: meter.id,
257
257
  resource_type: meter.resource,
258
258
  meter_type: meter.type,
259
259
  passport_number: meter.number,
260
260
  photos: _this.getFilesParams(meter.images),
261
261
  values: clearNotValidFields(_this.getInspectionMeterValues(meter)),
262
- }); }),
262
+ }); })) || [],
263
263
  };
264
264
  },
265
265
  getPostBodyInventoryInspection: function (inspection, roomsImages, fillingFiles, metersFiles, contractFile) {
@@ -347,13 +347,42 @@ var inspectionsRequestBody = {
347
347
  });
348
348
  },
349
349
  getFilesParams: function (files) {
350
- return files
351
- .map(function (file) { return file.uploadedData; })
352
- .filter(function (data) { return data; });
350
+ return ((files === null || files === void 0 ? void 0 : files.map(function (file) { return file.uploadedData; }).filter(function (data) { return data; })) || []);
353
351
  },
354
352
  };
355
353
 
356
354
  var inspectionsRequests = {
355
+ createInspectionHandler: function (apartmentId, loader, callback) {
356
+ return __awaiter(this, void 0, void 0, function () {
357
+ var body, e_1, Sentry;
358
+ return __generator(this, function (_a) {
359
+ switch (_a.label) {
360
+ case 0:
361
+ if (!apartmentId) return [3 /*break*/, 5];
362
+ loader.startLoading("inspection creation");
363
+ body = void 0;
364
+ _a.label = 1;
365
+ case 1:
366
+ _a.trys.push([1, 3, , 4]);
367
+ return [4 /*yield*/, callback()];
368
+ case 2:
369
+ body = _a.sent();
370
+ return [3 /*break*/, 4];
371
+ case 3:
372
+ e_1 = _a.sent();
373
+ Sentry = KUISettings.getSettings().Sentry;
374
+ Sentry.captureException(e_1);
375
+ loader.setError("inspection creation body", e_1);
376
+ return [3 /*break*/, 4];
377
+ case 4:
378
+ if (body)
379
+ return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
380
+ return [2 /*return*/, null];
381
+ case 5: return [2 /*return*/, null];
382
+ }
383
+ });
384
+ });
385
+ },
357
386
  getInspectionTypes: function (apartmentId) {
358
387
  return __awaiter(this, void 0, void 0, function () {
359
388
  var _a, err, res;
@@ -401,83 +430,92 @@ var inspectionsRequests = {
401
430
  },
402
431
  createInitialInspection: function (data, apartmentId, loader) {
403
432
  return __awaiter(this, void 0, void 0, function () {
404
- var roomsImages, body;
433
+ var _this = this;
405
434
  return __generator(this, function (_a) {
406
- if (apartmentId) {
407
- loader.startLoading("inspection creation");
408
- roomsImages = this.getRoomParams(data.roomsImages);
409
- body = inspectionsRequestBody.getPostBodyInitialInspection(data, roomsImages);
410
- return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
411
- }
412
- return [2 /*return*/, null];
435
+ return [2 /*return*/, this.createInspectionHandler(apartmentId, loader, function () { return __awaiter(_this, void 0, void 0, function () {
436
+ var roomsImages;
437
+ return __generator(this, function (_a) {
438
+ roomsImages = this.getRoomParams(data.roomsImages);
439
+ return [2 /*return*/, inspectionsRequestBody.getPostBodyInitialInspection(data, roomsImages)];
440
+ });
441
+ }); })];
413
442
  });
414
443
  });
415
444
  },
416
445
  createRegularInspection: function (data, apartmentId, loader) {
417
446
  return __awaiter(this, void 0, void 0, function () {
418
- var roomsImages, body;
447
+ var _this = this;
419
448
  return __generator(this, function (_a) {
420
- if (apartmentId) {
421
- loader.startLoading("inspection creation");
422
- roomsImages = this.getRoomParams(data.roomsImages);
423
- body = inspectionsRequestBody.getPostBodyRegularInspection(data, roomsImages);
424
- return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
425
- }
426
- return [2 /*return*/, null];
449
+ return [2 /*return*/, this.createInspectionHandler(apartmentId, loader, function () { return __awaiter(_this, void 0, void 0, function () {
450
+ var roomsImages;
451
+ return __generator(this, function (_a) {
452
+ roomsImages = this.getRoomParams(data.roomsImages);
453
+ return [2 /*return*/, inspectionsRequestBody.getPostBodyRegularInspection(data, roomsImages)];
454
+ });
455
+ }); })];
427
456
  });
428
457
  });
429
458
  },
430
459
  createTransferInspection: function (data, apartmentId, loader) {
431
460
  return __awaiter(this, void 0, void 0, function () {
432
- var roomsImages, file, body;
461
+ var _this = this;
433
462
  return __generator(this, function (_a) {
434
- switch (_a.label) {
435
- case 0:
436
- if (!apartmentId) return [3 /*break*/, 2];
437
- loader.startLoading("inspection creation");
438
- roomsImages = this.getRoomParams(data.roomsImages);
439
- return [4 /*yield*/, uploadNewFile(loader, data.contractFile)];
440
- case 1:
441
- file = _a.sent();
442
- body = inspectionsRequestBody.getPostBodyTransferInspection(data, roomsImages, file);
443
- return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
444
- case 2: return [2 /*return*/, null];
445
- }
463
+ return [2 /*return*/, this.createInspectionHandler(apartmentId, loader, function () { return __awaiter(_this, void 0, void 0, function () {
464
+ var roomsImages, file;
465
+ return __generator(this, function (_a) {
466
+ switch (_a.label) {
467
+ case 0:
468
+ roomsImages = this.getRoomParams(data.roomsImages);
469
+ return [4 /*yield*/, uploadNewFile(loader, data.contractFile)];
470
+ case 1:
471
+ file = _a.sent();
472
+ return [2 /*return*/, inspectionsRequestBody.getPostBodyTransferInspection(data, roomsImages, file)];
473
+ }
474
+ });
475
+ }); })];
446
476
  });
447
477
  });
448
478
  },
449
479
  createInventoryInspection: function (data, apartmentId, loader) {
450
- var _a;
451
480
  return __awaiter(this, void 0, void 0, function () {
452
- var fillingFiles, metersFiles, files, roomsImages, body;
453
- return __generator(this, function (_b) {
454
- switch (_b.label) {
455
- case 0:
456
- if (!apartmentId) return [3 /*break*/, 2];
457
- loader.startLoading("inspection creation");
458
- fillingFiles = data.fillingList.map(function (filling) { return filling.instruction; });
459
- metersFiles = ((_a = data.meters) === null || _a === void 0 ? void 0 : _a.map(function (meter) { return meter.passportFile; })) || [];
460
- return [4 /*yield*/, callPromises([
461
- uploadFiles(loader, fillingFiles),
462
- uploadFiles(loader, metersFiles),
463
- uploadNewFile(loader, data.contractFile),
464
- ])];
465
- case 1:
466
- files = _b.sent();
467
- roomsImages = this.getRoomParams(data.roomsImages);
468
- body = inspectionsRequestBody.getPostBodyInventoryInspection(data, roomsImages, files[0], files[1], files[2]);
469
- return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
470
- case 2: return [2 /*return*/, null];
471
- }
481
+ var _this = this;
482
+ return __generator(this, function (_a) {
483
+ return [2 /*return*/, this.createInspectionHandler(apartmentId, loader, function () { return __awaiter(_this, void 0, void 0, function () {
484
+ var fillingFiles, metersFiles, files, roomsImages;
485
+ var _a;
486
+ return __generator(this, function (_b) {
487
+ switch (_b.label) {
488
+ case 0:
489
+ fillingFiles = data.fillingList.map(function (filling) { return filling.instruction; });
490
+ metersFiles = ((_a = data.meters) === null || _a === void 0 ? void 0 : _a.map(function (meter) { return meter.passportFile; })) || [];
491
+ return [4 /*yield*/, callPromises([
492
+ uploadFiles(loader, fillingFiles),
493
+ uploadFiles(loader, metersFiles),
494
+ uploadNewFile(loader, data.contractFile),
495
+ ])];
496
+ case 1:
497
+ files = _b.sent();
498
+ roomsImages = this.getRoomParams(data.roomsImages);
499
+ return [2 /*return*/, inspectionsRequestBody.getPostBodyInventoryInspection(data, roomsImages, files[0], files[1], files[2])];
500
+ }
501
+ });
502
+ }); })];
472
503
  });
473
504
  });
474
505
  },
475
506
  getRoomParams: function (rooms) {
476
- return rooms.map(function (room) { return ({
477
- purpose: room.type,
478
- comment: room.comment,
479
- photos: inspectionsRequestBody.getFilesParams(room.files),
480
- }); });
507
+ var roomIndex = -1;
508
+ return ((rooms === null || rooms === void 0 ? void 0 : rooms.map(function (room) {
509
+ var withOrderNumber = room.type === "room" || room.type === "bedroom";
510
+ if (withOrderNumber)
511
+ roomIndex += 1;
512
+ return {
513
+ purpose: room === null || room === void 0 ? void 0 : room.type,
514
+ comment: room === null || room === void 0 ? void 0 : room.comment,
515
+ photos: inspectionsRequestBody.getFilesParams(room.files),
516
+ room_order_number: withOrderNumber ? roomIndex : undefined,
517
+ };
518
+ })) || []);
481
519
  },
482
520
  };
483
521