kui-crm_actions 0.0.146 → 0.0.149
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/cjs/index.js +21 -3
- package/cjs/index.js.map +1 -1
- package/index.d.ts +95 -133
- package/index.js +21 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
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
|
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';
|
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 { InputWithAddressFields } from 'kui-complex/dist/InputWithAddressAutocomplete';
|
7
6
|
import { UseFormReturn } from 'react-hook-form';
|
7
|
+
import { InputWithAddressFields } from 'kui-complex/dist/InputWithAddressAutocomplete';
|
8
8
|
import { ReactElement } from 'react';
|
9
9
|
|
10
10
|
declare const getPartialMeterInfoSchema: (valuesFields: InputParams<any>[]) => yup.ObjectSchema<{
|
@@ -92,85 +92,13 @@ type InspectionRoomsFields = {
|
|
92
92
|
bedroomsNumber: number | null
|
93
93
|
restroomsNumber: number | null
|
94
94
|
combinedBathroomsNumber: number | null
|
95
|
-
parkingType?: ParkingTypes
|
95
|
+
parkingType?: ParkingTypes | null
|
96
96
|
}
|
97
97
|
|
98
98
|
type InspectionImageFieldsSettings = {
|
99
99
|
[key: string]: any
|
100
100
|
}
|
101
101
|
|
102
|
-
type BasicApartmentInfoStepFields = {
|
103
|
-
apartment: InputWithAddressFields
|
104
|
-
apartmentNumber: number | string | null
|
105
|
-
city: CityParams | null
|
106
|
-
zipCode?: string
|
107
|
-
} & ApartmentMetroStationsParams
|
108
|
-
|
109
|
-
type SecurityApartmentInfoStepFields = {
|
110
|
-
typeOfObject: RoomTypes | null
|
111
|
-
entrance: string
|
112
|
-
hasIntercom: boolean | null
|
113
|
-
intercomCode: string
|
114
|
-
hasGate: boolean | null
|
115
|
-
gateCode: string
|
116
|
-
parkingType: ParkingTypes$1 | null
|
117
|
-
parkingNumber: string
|
118
|
-
}
|
119
|
-
|
120
|
-
type RoomsApartmentInfoStepFields = {
|
121
|
-
floor: number | null
|
122
|
-
floorCount: number | null
|
123
|
-
roomsNumber: number | null
|
124
|
-
bedroomsNumber: number | null
|
125
|
-
bathroomsNumber: number | null
|
126
|
-
restroomsNumber: number | null
|
127
|
-
combinedBathroomsNumber: number | null
|
128
|
-
}
|
129
|
-
|
130
|
-
type DetailApartmentInfoStepFields = {
|
131
|
-
area: number | string | null
|
132
|
-
livingArea: number | string | null
|
133
|
-
kitchenArea: number | string | null
|
134
|
-
ceilingHeight: number | string | null
|
135
|
-
numberOfWindows: number | null
|
136
|
-
renovation: RenovationParams | null
|
137
|
-
rooms: RoomParams[]
|
138
|
-
}
|
139
|
-
|
140
|
-
type HouseInfoStepFields = {
|
141
|
-
typeOfHouse: HouseTypes$1 | null
|
142
|
-
buildingYear: number | null
|
143
|
-
wallMaterial: WallMaterials$1 | null
|
144
|
-
overlapType: OverlapTypes$1 | null
|
145
|
-
passengerElevatorsCount: number | null
|
146
|
-
serviceElevatorsCount: number | null
|
147
|
-
gasLeads: GasTypes$1 | null
|
148
|
-
withHotWater: boolean | null
|
149
|
-
houseNumber: string
|
150
|
-
}
|
151
|
-
|
152
|
-
type AvailableResourcesParams = {
|
153
|
-
water: boolean
|
154
|
-
electricity: boolean
|
155
|
-
gas: boolean
|
156
|
-
heating: boolean
|
157
|
-
}
|
158
|
-
|
159
|
-
type AvailableResourcesStepFields = {
|
160
|
-
availableResources: AvailableResourcesParams
|
161
|
-
}
|
162
|
-
|
163
|
-
type InitialInspectionFormFields = CommonInspectionFormFields &
|
164
|
-
InitialInspectionInfoFields &
|
165
|
-
InspectionRoomsImagesFields
|
166
|
-
|
167
|
-
type InitialInspectionInfoFields = BasicApartmentInfoStepFields &
|
168
|
-
AvailableResourcesStepFields &
|
169
|
-
SecurityApartmentInfoStepFields &
|
170
|
-
RoomsApartmentInfoStepFields &
|
171
|
-
DetailApartmentInfoStepFields &
|
172
|
-
HouseInfoStepFields
|
173
|
-
|
174
102
|
type InspectionFillingCardProps = {
|
175
103
|
className?: string
|
176
104
|
form: UseFormReturn<any>
|
@@ -195,6 +123,7 @@ type TransferInspectionTypes =
|
|
195
123
|
| "maroom_tenant"
|
196
124
|
| "tenant_maroom"
|
197
125
|
| "maroom_landlord"
|
126
|
+
| "tenant_landlord"
|
198
127
|
|
199
128
|
type RegularInspectionFormFields = CommonInspectionFormFields &
|
200
129
|
InspectionPartialMetersStepFields &
|
@@ -242,6 +171,78 @@ type FillingCheckParams = {
|
|
242
171
|
wasMissing?: boolean
|
243
172
|
}
|
244
173
|
|
174
|
+
type BasicApartmentInfoStepFields = {
|
175
|
+
apartment: InputWithAddressFields
|
176
|
+
apartmentNumber: number | string | null
|
177
|
+
city: CityParams | null
|
178
|
+
zipCode?: string
|
179
|
+
} & ApartmentMetroStationsParams
|
180
|
+
|
181
|
+
type SecurityApartmentInfoStepFields = {
|
182
|
+
typeOfObject: RoomTypes | null
|
183
|
+
entrance: string
|
184
|
+
hasIntercom: boolean | null
|
185
|
+
intercomCode: string
|
186
|
+
hasGate: boolean | null
|
187
|
+
gateCode: string
|
188
|
+
parkingType: ParkingTypes | null
|
189
|
+
parkingNumber: string
|
190
|
+
}
|
191
|
+
|
192
|
+
type RoomsApartmentInfoStepFields = {
|
193
|
+
floor: number | null
|
194
|
+
floorCount: number | null
|
195
|
+
roomsNumber: number | null
|
196
|
+
bedroomsNumber: number | null
|
197
|
+
bathroomsNumber: number | null
|
198
|
+
restroomsNumber: number | null
|
199
|
+
combinedBathroomsNumber: number | null
|
200
|
+
}
|
201
|
+
|
202
|
+
type DetailApartmentInfoStepFields = {
|
203
|
+
area: number | string | null
|
204
|
+
livingArea: number | string | null
|
205
|
+
kitchenArea: number | string | null
|
206
|
+
ceilingHeight: number | string | null
|
207
|
+
numberOfWindows: number | null
|
208
|
+
renovation: RenovationParams | null
|
209
|
+
rooms: RoomParams[]
|
210
|
+
}
|
211
|
+
|
212
|
+
type HouseInfoStepFields = {
|
213
|
+
typeOfHouse: HouseTypes | null
|
214
|
+
buildingYear: number | null
|
215
|
+
wallMaterial: WallMaterials | null
|
216
|
+
overlapType: OverlapTypes | null
|
217
|
+
passengerElevatorsCount: number | null
|
218
|
+
serviceElevatorsCount: number | null
|
219
|
+
gasLeads: GasTypes | null
|
220
|
+
withHotWater: boolean | null
|
221
|
+
houseNumber: string
|
222
|
+
}
|
223
|
+
|
224
|
+
type AvailableResourcesParams = {
|
225
|
+
water: boolean
|
226
|
+
electricity: boolean
|
227
|
+
gas: boolean
|
228
|
+
heating: boolean
|
229
|
+
}
|
230
|
+
|
231
|
+
type AvailableResourcesStepFields = {
|
232
|
+
availableResources: AvailableResourcesParams
|
233
|
+
}
|
234
|
+
|
235
|
+
type InitialInspectionFormFields = CommonInspectionFormFields &
|
236
|
+
InitialInspectionInfoFields &
|
237
|
+
InspectionRoomsImagesFields
|
238
|
+
|
239
|
+
type InitialInspectionInfoFields = BasicApartmentInfoStepFields &
|
240
|
+
AvailableResourcesStepFields &
|
241
|
+
SecurityApartmentInfoStepFields &
|
242
|
+
RoomsApartmentInfoStepFields &
|
243
|
+
DetailApartmentInfoStepFields &
|
244
|
+
HouseInfoStepFields
|
245
|
+
|
245
246
|
type HouseServicesInfoStepFields = {
|
246
247
|
hasBarrier: boolean | null
|
247
248
|
barrierPhone: PhoneParams | null
|
@@ -271,6 +272,7 @@ type ApartmentPaymentsFormFields = {
|
|
271
272
|
type AdditionalInfoStepFields = {
|
272
273
|
withPets: boolean
|
273
274
|
withChildren: boolean
|
275
|
+
withSmoking: boolean
|
274
276
|
additionalTerms: string
|
275
277
|
} & ApartmentPaymentsFormFields
|
276
278
|
|
@@ -278,55 +280,6 @@ type MetersInfoStepFields = {
|
|
278
280
|
maxMeters: MetersCountParams | null
|
279
281
|
}
|
280
282
|
|
281
|
-
declare type ParkingTypes = "public" | "house" | "underground" | "multi_level";
|
282
|
-
declare type GasTypes = "not_have" | "stove" | "stove_and_heater";
|
283
|
-
declare type WallMaterials = "brick" | "panel" | "wood" | "block" | "stone";
|
284
|
-
declare type HouseTypes = "ST" | "MB" | "M" | "BR" | "P" | "W" | "BL" | "WP" | "apart_hotel" | "apartment" | "townhouse" | "private_residence";
|
285
|
-
declare type OverlapTypes = "wood" | "stone" | "brick" | "reinforced_concrete" | "metal" | "combined";
|
286
|
-
declare type ApartmentMetroParams = {
|
287
|
-
name: string;
|
288
|
-
metro_station_id: number;
|
289
|
-
distance_walk_meters?: number;
|
290
|
-
distance_car_kilometers?: string | number;
|
291
|
-
time_car_minutes?: number;
|
292
|
-
};
|
293
|
-
declare type ApartmentDetailInfoModelFields = {
|
294
|
-
financial_personal_account: string;
|
295
|
-
max_electricity_counters: number | null;
|
296
|
-
max_gas_counters: number | null;
|
297
|
-
max_heating_counters: number | null;
|
298
|
-
max_water_counters: number | null;
|
299
|
-
has_barrier: boolean | null;
|
300
|
-
has_concierge: boolean | null;
|
301
|
-
has_security: boolean | null;
|
302
|
-
has_video_surveillance: boolean | null;
|
303
|
-
barrier_phone: string | null;
|
304
|
-
concierge_phone: string | null;
|
305
|
-
security_phone: string | null;
|
306
|
-
video_surveillance_phone: string | null;
|
307
|
-
home_phone: string | null;
|
308
|
-
wifi_name: string;
|
309
|
-
wifi_password: string;
|
310
|
-
internet_provider_link: string;
|
311
|
-
internet_provider_login: string;
|
312
|
-
internet_provider_password: string;
|
313
|
-
parking_type: ParkingTypes | null;
|
314
|
-
parking_number: string;
|
315
|
-
passenger_elevators_number: string | number | null;
|
316
|
-
service_elevators_number: string | number | null;
|
317
|
-
payer_code: string;
|
318
|
-
};
|
319
|
-
declare type HouseInfoModelFields = {
|
320
|
-
building_year: number | null;
|
321
|
-
type_houses: HouseTypes | null;
|
322
|
-
serial_number: string;
|
323
|
-
type_gas: GasTypes | null;
|
324
|
-
wall_type: WallMaterials | null;
|
325
|
-
overlap_type: OverlapTypes | null;
|
326
|
-
hot_water: boolean;
|
327
|
-
};
|
328
|
-
declare type ApartmentWithHouseInfoModelFields = ApartmentDetailInfoModelFields & HouseInfoModelFields;
|
329
|
-
|
330
283
|
declare type InspectionAppraisalLiteModel = {
|
331
284
|
id: number;
|
332
285
|
date: string;
|
@@ -443,9 +396,10 @@ declare type InventoryInspectionFieldsBody = {
|
|
443
396
|
filling: InspectionFillingParams$1[];
|
444
397
|
allowed_children: boolean;
|
445
398
|
allowed_pets: boolean;
|
399
|
+
allowed_smoking: boolean;
|
446
400
|
additional_terms: string;
|
447
401
|
contract_document?: FileBodyRequest | null;
|
448
|
-
} & Partial<ApartmentDetailInfoModelFields
|
402
|
+
} & Partial<ApartmentDetailInfoModelFields>;
|
449
403
|
declare type InventoryInspectionPostBody = {
|
450
404
|
inventory: InventoryInspectionFieldsBody;
|
451
405
|
photo_groups: InspectionRoomPhotoRequest[];
|
@@ -470,6 +424,9 @@ declare type InspectionRoomPhotoRequest = {
|
|
470
424
|
};
|
471
425
|
declare type InspectionTypesResponse = {
|
472
426
|
inspection_types: InspectionTypes[];
|
427
|
+
};
|
428
|
+
declare type TransferTypesResponse = {
|
429
|
+
transfer_inspection_types: TransferInspectionTypes[];
|
473
430
|
};
|
474
431
|
|
475
432
|
declare class FillingListStore {
|
@@ -527,7 +484,7 @@ type InspectionFillingFormParams = {
|
|
527
484
|
} & Omit<InspectionFillingParams, "images">
|
528
485
|
|
529
486
|
type FillingListInfoStepFields = {
|
530
|
-
fillingList:
|
487
|
+
fillingList: InspectionFillingParams[]
|
531
488
|
}
|
532
489
|
|
533
490
|
|
@@ -540,13 +497,18 @@ type InventoryInspectionFormFields = CommonInspectionFormFields &
|
|
540
497
|
FillingListInfoStepFields &
|
541
498
|
InspectionRoomsImagesFields
|
542
499
|
|
500
|
+
type InventoryInspectionPostFormFields = {
|
501
|
+
fillingList: InspectionFillingFormParams[]
|
502
|
+
} & Omit<InventoryInspectionFormFields, "fillingList">
|
503
|
+
|
543
504
|
declare const inspectionsRequests: {
|
544
505
|
getInspectionTypes(apartmentId: number): Promise<InspectionTypes[] | undefined>;
|
506
|
+
getTransferTypes(apartmentId: number): Promise<TransferInspectionTypes[] | undefined>;
|
545
507
|
createInspection(apartmentId: number, body: any, loader: Loader): Promise<number | undefined>;
|
546
508
|
createInitialInspection(data: InitialInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
|
547
509
|
createRegularInspection(data: RegularInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
|
548
510
|
createTransferInspection(data: TransferInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
|
549
|
-
createInventoryInspection(data:
|
511
|
+
createInventoryInspection(data: InventoryInspectionPostFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
|
550
512
|
getRoomParams(rooms: InspectionRoomImagesParams[]): {
|
551
513
|
purpose: kui_crm.InspectionRoomPhotoTypes;
|
552
514
|
comment: string;
|
@@ -577,7 +539,7 @@ declare const inspectionsRequestBody: {
|
|
577
539
|
};
|
578
540
|
}[];
|
579
541
|
};
|
580
|
-
getPostBodyInventoryInspection(inspection:
|
542
|
+
getPostBodyInventoryInspection(inspection: InventoryInspectionPostFormFields, roomsImages: InspectionRoomPhotoRequest[], fillingFiles: FileBodyRequest[], metersFiles: FileBodyRequest[], contractFile?: FileBodyRequest | null | undefined): InventoryInspectionPostBody;
|
581
543
|
getInventoryInspectionMeters(meters: InspectionMeterFields[], metersFiles: FileBodyRequest[], metersImages?: ImageBodyRequest[][] | undefined): {
|
582
544
|
meters: {
|
583
545
|
passport: FileBodyRequest;
|
@@ -590,7 +552,7 @@ declare const inspectionsRequestBody: {
|
|
590
552
|
id: number | undefined;
|
591
553
|
meter_type: kui_crm.MeterTypes | undefined;
|
592
554
|
passport_number: string;
|
593
|
-
resource_type: "
|
555
|
+
resource_type: "water" | "electricity" | "gas" | "heating";
|
594
556
|
activation_date: string | null;
|
595
557
|
}[];
|
596
558
|
};
|
@@ -624,7 +586,7 @@ declare const inspectionsRequestBody: {
|
|
624
586
|
id: number | undefined;
|
625
587
|
meter_type: kui_crm.MeterTypes | undefined;
|
626
588
|
passport_number: string;
|
627
|
-
resource_type: "
|
589
|
+
resource_type: "water" | "electricity" | "gas" | "heating";
|
628
590
|
activation_date: string | null;
|
629
591
|
};
|
630
592
|
getMeterValues(initialValue?: string | number | null | undefined, lastValue?: string | number | null | undefined): {
|
@@ -648,7 +610,7 @@ declare const apartmentFields: {
|
|
648
610
|
getObjectRoomsImages(images: InspectionRoomPhotoModel[]): RoomImagesParams[];
|
649
611
|
getInspectionFillingParams(filling: InspectionFillingModel, withChecking?: boolean | undefined): InspectionFillingParams;
|
650
612
|
getApartmentDescriptionWithMetro(apartment: ApartmentModel): ApartmentDescriptionWithMetro;
|
651
|
-
getMetroStationsParams(metroStations?: ApartmentMetroParams
|
613
|
+
getMetroStationsParams(metroStations?: ApartmentMetroParams[] | undefined): {
|
652
614
|
id: number;
|
653
615
|
name: string;
|
654
616
|
walkDistance: number | undefined;
|
@@ -960,8 +922,8 @@ declare const MetersInfoFieldsSchema: {
|
|
960
922
|
};
|
961
923
|
declare const MetersInfoStepSchema: yup.ObjectSchema<{
|
962
924
|
maxMeters: {
|
963
|
-
electricity: number;
|
964
925
|
water: number;
|
926
|
+
electricity: number;
|
965
927
|
gas: number;
|
966
928
|
heating: number;
|
967
929
|
};
|
@@ -1137,4 +1099,4 @@ type ApartmentPointProps = {
|
|
1137
1099
|
|
1138
1100
|
declare const ObjectForMapPoint: (props: ApartmentPointProps) => JSX.Element;
|
1139
1101
|
|
1140
|
-
export { AddedMetersBlock, AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, AvailableResourcesParams, AvailableResourcesStepFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingListInfoStepFields, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepFields, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, _default as InspectionFeedback, InspectionFieldsSettings, InspectionFillingCard, InspectionFillingCardProps, InspectionFillingItemFields, InspectionFillingListFields, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InspectionTypesResponse, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterInfoFields, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapParams, ObjectForMapPoint, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomImagesParams, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, UsedResourcesModel, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getAvailableResourcesFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getInventoryMeterFields, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, onInspectionModalClose, onInspectionModalOpen, renderMetersSteps, useFillingList, useInspectionData, useInspectionIndexDB, useMetersValues };
|
1102
|
+
export { AddedMetersBlock, AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, AvailableResourcesParams, AvailableResourcesStepFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingListInfoStepFields, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepFields, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, _default as InspectionFeedback, InspectionFieldsSettings, InspectionFillingCard, InspectionFillingCardProps, InspectionFillingItemFields, InspectionFillingListFields, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InspectionTypesResponse, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterInfoFields, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapParams, ObjectForMapPoint, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomImagesParams, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, TransferTypesResponse, UsedResourcesModel, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getAvailableResourcesFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getInventoryMeterFields, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, onInspectionModalClose, onInspectionModalOpen, renderMetersSteps, useFillingList, useInspectionData, useInspectionIndexDB, useMetersValues };
|
package/index.js
CHANGED
@@ -271,7 +271,7 @@ var inspectionsRequestBody = {
|
|
271
271
|
based_on: null,
|
272
272
|
dropbox_link: inspection.dropboxLink,
|
273
273
|
photo_groups: roomsImages,
|
274
|
-
inventory: __assign({ contract_document: contractFile || undefined, allowed_children: inspection.withChildren, allowed_pets: inspection.withPets, additional_terms: inspection.additionalTerms, country_of_residence: ((_a = inspection.countryOfResidence) === null || _a === void 0 ? void 0 : _a.id) || null, administrative_company: ((_b = inspection.company) === null || _b === void 0 ? void 0 : _b.id) || null, tax_type: inspection.taxesType, financial_personal_account: inspection.communalServicesAccount, max_electricity_counters: (_c = inspection.maxMeters) === null || _c === void 0 ? void 0 : _c.electricity, max_gas_counters: (_d = inspection.maxMeters) === null || _d === void 0 ? void 0 : _d.gas, max_heating_counters: (_e = inspection.maxMeters) === null || _e === void 0 ? void 0 : _e.heating, max_water_counters: (_f = inspection.maxMeters) === null || _f === void 0 ? void 0 : _f.water, has_barrier: inspection.hasBarrier, has_concierge: inspection.hasConcierge, has_security: inspection.hasSecurity, has_video_surveillance: inspection.hasVideoControl, barrier_phone: inspection.barrierPhone
|
274
|
+
inventory: __assign({ contract_document: contractFile || undefined, allowed_children: inspection.withChildren, allowed_pets: inspection.withPets, allowed_smoking: inspection.withSmoking, additional_terms: inspection.additionalTerms, country_of_residence: ((_a = inspection.countryOfResidence) === null || _a === void 0 ? void 0 : _a.id) || null, administrative_company: ((_b = inspection.company) === null || _b === void 0 ? void 0 : _b.id) || null, tax_type: inspection.taxesType, financial_personal_account: inspection.communalServicesAccount, max_electricity_counters: (_c = inspection.maxMeters) === null || _c === void 0 ? void 0 : _c.electricity, max_gas_counters: (_d = inspection.maxMeters) === null || _d === void 0 ? void 0 : _d.gas, max_heating_counters: (_e = inspection.maxMeters) === null || _e === void 0 ? void 0 : _e.heating, max_water_counters: (_f = inspection.maxMeters) === null || _f === void 0 ? void 0 : _f.water, has_barrier: inspection.hasBarrier, has_concierge: inspection.hasConcierge, has_security: inspection.hasSecurity, has_video_surveillance: inspection.hasVideoControl, barrier_phone: inspection.barrierPhone
|
275
275
|
? getPhoneNumberFromPhoneParams(inspection.barrierPhone)
|
276
276
|
: null, concierge_phone: inspection.conciergePhone
|
277
277
|
? getPhoneNumberFromPhoneParams(inspection.conciergePhone)
|
@@ -367,6 +367,19 @@ var inspectionsRequests = {
|
|
367
367
|
});
|
368
368
|
});
|
369
369
|
},
|
370
|
+
getTransferTypes: function (apartmentId) {
|
371
|
+
return __awaiter(this, void 0, void 0, function () {
|
372
|
+
var _a, res;
|
373
|
+
return __generator(this, function (_b) {
|
374
|
+
switch (_b.label) {
|
375
|
+
case 0: return [4 /*yield*/, to(requests.get("/apartments/".concat(apartmentId, "/transfer-inspection-types")))];
|
376
|
+
case 1:
|
377
|
+
_a = _b.sent(), _a[0], res = _a[1];
|
378
|
+
return [2 /*return*/, res === null || res === void 0 ? void 0 : res.transfer_inspection_types];
|
379
|
+
}
|
380
|
+
});
|
381
|
+
});
|
382
|
+
},
|
370
383
|
createInspection: function (apartmentId, body, loader) {
|
371
384
|
var _a;
|
372
385
|
return __awaiter(this, void 0, void 0, function () {
|
@@ -881,6 +894,7 @@ var checkboxLabelProps = {
|
|
881
894
|
var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
|
882
895
|
__assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
|
883
896
|
__assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
|
897
|
+
__assign({ label: "Smoking", name: "withSmoking", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withSmoking),
|
884
898
|
__assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
|
885
899
|
], getApartmentPaymentFields(settings), true); };
|
886
900
|
|
@@ -968,7 +982,7 @@ var getFillingInfoFields = function (withType, type, setType, settings) { return
|
|
968
982
|
var FillingInfoFieldsSchema = yup.object().shape({
|
969
983
|
type: yup.string(),
|
970
984
|
tag: yup.object({
|
971
|
-
name: yup.string().required(
|
985
|
+
name: yup.string().required(defaultRequiredMessage),
|
972
986
|
}),
|
973
987
|
name: yup.string().when("type", {
|
974
988
|
is: function (value) { return value === "electronics"; },
|
@@ -1139,7 +1153,11 @@ var templateObject_1$5, templateObject_2$4, templateObject_3$1;
|
|
1139
1153
|
|
1140
1154
|
var InspectionFillingCard = function (props) {
|
1141
1155
|
var className = props.className, form = props.form, index = props.index, disabled = props.disabled, other = __rest(props, ["className", "form", "index", "disabled"]);
|
1142
|
-
return (jsx(StyledCard$1, __assign({ className: className }, { children: jsx(StyledCheckbox
|
1156
|
+
return (jsx(StyledCard$1, __assign({ className: className }, { children: jsx(StyledCheckbox
|
1157
|
+
// @ts-ignore
|
1158
|
+
, {
|
1159
|
+
// @ts-ignore
|
1160
|
+
form: form, name: "fillingList.".concat(index, ".check"), label: jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
|
1143
1161
|
};
|
1144
1162
|
var StyledCard$1 = styled(Grid)(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n padding: 8px 16px;\n border-radius: 12px;\n background: white;\n"], ["\n padding: 8px 16px;\n border-radius: 12px;\n background: white;\n"])));
|
1145
1163
|
var StyledCheckbox = styled(CheckboxWithController)(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n .KUI-Label_checkbox {\n margin-left: 0;\n }\n"], ["\n .KUI-Label_checkbox {\n margin-left: 0;\n }\n"])));
|