kui-crm_actions 0.0.147 → 0.0.150
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 +28 -6
- package/cjs/index.js.map +1 -1
- package/index.d.ts +89 -131
- package/index.js +28 -6
- 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 {
|
@@ -545,7 +502,8 @@ type InventoryInspectionPostFormFields = {
|
|
545
502
|
} & Omit<InventoryInspectionFormFields, "fillingList">
|
546
503
|
|
547
504
|
declare const inspectionsRequests: {
|
548
|
-
getInspectionTypes(apartmentId: number): Promise<InspectionTypes[] |
|
505
|
+
getInspectionTypes(apartmentId: number): Promise<(Error | undefined)[] | (InspectionTypes[] | null)[]>;
|
506
|
+
getTransferTypes(apartmentId: number): Promise<(Error | undefined)[] | (TransferInspectionTypes[] | null)[]>;
|
549
507
|
createInspection(apartmentId: number, body: any, loader: Loader): Promise<number | undefined>;
|
550
508
|
createInitialInspection(data: InitialInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
|
551
509
|
createRegularInspection(data: RegularInspectionFormFields, apartmentId: number, loader: Loader): Promise<number | null | undefined>;
|
@@ -594,7 +552,7 @@ declare const inspectionsRequestBody: {
|
|
594
552
|
id: number | undefined;
|
595
553
|
meter_type: kui_crm.MeterTypes | undefined;
|
596
554
|
passport_number: string;
|
597
|
-
resource_type: "
|
555
|
+
resource_type: "water" | "electricity" | "gas" | "heating";
|
598
556
|
activation_date: string | null;
|
599
557
|
}[];
|
600
558
|
};
|
@@ -628,7 +586,7 @@ declare const inspectionsRequestBody: {
|
|
628
586
|
id: number | undefined;
|
629
587
|
meter_type: kui_crm.MeterTypes | undefined;
|
630
588
|
passport_number: string;
|
631
|
-
resource_type: "
|
589
|
+
resource_type: "water" | "electricity" | "gas" | "heating";
|
632
590
|
activation_date: string | null;
|
633
591
|
};
|
634
592
|
getMeterValues(initialValue?: string | number | null | undefined, lastValue?: string | number | null | undefined): {
|
@@ -652,7 +610,7 @@ declare const apartmentFields: {
|
|
652
610
|
getObjectRoomsImages(images: InspectionRoomPhotoModel[]): RoomImagesParams[];
|
653
611
|
getInspectionFillingParams(filling: InspectionFillingModel, withChecking?: boolean | undefined): InspectionFillingParams;
|
654
612
|
getApartmentDescriptionWithMetro(apartment: ApartmentModel): ApartmentDescriptionWithMetro;
|
655
|
-
getMetroStationsParams(metroStations?: ApartmentMetroParams
|
613
|
+
getMetroStationsParams(metroStations?: ApartmentMetroParams[] | undefined): {
|
656
614
|
id: number;
|
657
615
|
name: string;
|
658
616
|
walkDistance: number | undefined;
|
@@ -964,8 +922,8 @@ declare const MetersInfoFieldsSchema: {
|
|
964
922
|
};
|
965
923
|
declare const MetersInfoStepSchema: yup.ObjectSchema<{
|
966
924
|
maxMeters: {
|
967
|
-
electricity: number;
|
968
925
|
water: number;
|
926
|
+
electricity: number;
|
969
927
|
gas: number;
|
970
928
|
heating: number;
|
971
929
|
};
|
@@ -1141,4 +1099,4 @@ type ApartmentPointProps = {
|
|
1141
1099
|
|
1142
1100
|
declare const ObjectForMapPoint: (props: ApartmentPointProps) => JSX.Element;
|
1143
1101
|
|
1144
|
-
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)
|
@@ -356,13 +356,30 @@ var inspectionsRequestBody = {
|
|
356
356
|
var inspectionsRequests = {
|
357
357
|
getInspectionTypes: function (apartmentId) {
|
358
358
|
return __awaiter(this, void 0, void 0, function () {
|
359
|
-
var _a, res;
|
359
|
+
var _a, err, res;
|
360
360
|
return __generator(this, function (_b) {
|
361
361
|
switch (_b.label) {
|
362
362
|
case 0: return [4 /*yield*/, to(requests.get("/apartments/".concat(apartmentId, "/inspection-types")))];
|
363
363
|
case 1:
|
364
|
-
_a = _b.sent(), _a[0], res = _a[1];
|
365
|
-
|
364
|
+
_a = _b.sent(), err = _a[0], res = _a[1];
|
365
|
+
if (err)
|
366
|
+
return [2 /*return*/, [err, undefined]];
|
367
|
+
return [2 /*return*/, [null, res === null || res === void 0 ? void 0 : res.inspection_types]];
|
368
|
+
}
|
369
|
+
});
|
370
|
+
});
|
371
|
+
},
|
372
|
+
getTransferTypes: function (apartmentId) {
|
373
|
+
return __awaiter(this, void 0, void 0, function () {
|
374
|
+
var _a, err, res;
|
375
|
+
return __generator(this, function (_b) {
|
376
|
+
switch (_b.label) {
|
377
|
+
case 0: return [4 /*yield*/, to(requests.get("/apartments/".concat(apartmentId, "/transfer-inspection-types")))];
|
378
|
+
case 1:
|
379
|
+
_a = _b.sent(), err = _a[0], res = _a[1];
|
380
|
+
if (err)
|
381
|
+
return [2 /*return*/, [err, undefined]];
|
382
|
+
return [2 /*return*/, [null, res === null || res === void 0 ? void 0 : res.transfer_inspection_types]];
|
366
383
|
}
|
367
384
|
});
|
368
385
|
});
|
@@ -881,6 +898,7 @@ var checkboxLabelProps = {
|
|
881
898
|
var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
|
882
899
|
__assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
|
883
900
|
__assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
|
901
|
+
__assign({ label: "Smoking", name: "withSmoking", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withSmoking),
|
884
902
|
__assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
|
885
903
|
], getApartmentPaymentFields(settings), true); };
|
886
904
|
|
@@ -968,7 +986,7 @@ var getFillingInfoFields = function (withType, type, setType, settings) { return
|
|
968
986
|
var FillingInfoFieldsSchema = yup.object().shape({
|
969
987
|
type: yup.string(),
|
970
988
|
tag: yup.object({
|
971
|
-
name: yup.string().required(
|
989
|
+
name: yup.string().required(defaultRequiredMessage),
|
972
990
|
}),
|
973
991
|
name: yup.string().when("type", {
|
974
992
|
is: function (value) { return value === "electronics"; },
|
@@ -1139,7 +1157,11 @@ var templateObject_1$5, templateObject_2$4, templateObject_3$1;
|
|
1139
1157
|
|
1140
1158
|
var InspectionFillingCard = function (props) {
|
1141
1159
|
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
|
1160
|
+
return (jsx(StyledCard$1, __assign({ className: className }, { children: jsx(StyledCheckbox
|
1161
|
+
// @ts-ignore
|
1162
|
+
, {
|
1163
|
+
// @ts-ignore
|
1164
|
+
form: form, name: "fillingList.".concat(index, ".check"), label: jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
|
1143
1165
|
};
|
1144
1166
|
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
1167
|
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"])));
|