kui-crm_actions 0.0.141 → 0.0.143
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 +13 -16
- package/cjs/index.js.map +1 -1
- package/index.d.ts +26 -14
- package/index.js +13 -16
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -149,11 +149,23 @@ type HouseInfoStepFields = {
|
|
149
149
|
houseNumber: string
|
150
150
|
}
|
151
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
|
+
|
152
163
|
type InitialInspectionFormFields = CommonInspectionFormFields &
|
153
164
|
InitialInspectionInfoFields &
|
154
165
|
InspectionRoomsImagesFields
|
155
166
|
|
156
167
|
type InitialInspectionInfoFields = BasicApartmentInfoStepFields &
|
168
|
+
AvailableResourcesStepFields &
|
157
169
|
SecurityApartmentInfoStepFields &
|
158
170
|
RoomsApartmentInfoStepFields &
|
159
171
|
DetailApartmentInfoStepFields &
|
@@ -441,6 +453,12 @@ declare type InitialInspectionRoomParams = {
|
|
441
453
|
room_type?: RoomType | null;
|
442
454
|
order_number?: number;
|
443
455
|
};
|
456
|
+
declare type UsedResourcesModel = {
|
457
|
+
water: boolean;
|
458
|
+
electricity: boolean;
|
459
|
+
heating: boolean;
|
460
|
+
gas: boolean;
|
461
|
+
};
|
444
462
|
declare type InitialInspectionFieldsBody = {
|
445
463
|
city: number;
|
446
464
|
rooms: InitialInspectionRoomParams[];
|
@@ -450,6 +468,7 @@ declare type InitialInspectionFieldsBody = {
|
|
450
468
|
parking_type: ParkingTypes | null;
|
451
469
|
parking_number: string;
|
452
470
|
metro: ApartmentMetroParams[];
|
471
|
+
used_resources: UsedResourcesModel;
|
453
472
|
} & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms"> & HouseInfoModelFields;
|
454
473
|
declare type RegularlyInspectionFieldsBody = {
|
455
474
|
meters: PartialMeterModel[];
|
@@ -639,9 +658,9 @@ declare const BasicApartmentInfoFieldsSchema: {
|
|
639
658
|
metroStations: yup.ArraySchema<{
|
640
659
|
id?: number | undefined;
|
641
660
|
name: string;
|
642
|
-
walkDistance:
|
643
|
-
carDistance:
|
644
|
-
carTime:
|
661
|
+
walkDistance: string;
|
662
|
+
carDistance: string;
|
663
|
+
carTime: string;
|
645
664
|
}[] | undefined, yup.AnyObject, "", "">;
|
646
665
|
};
|
647
666
|
declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
|
@@ -655,9 +674,9 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
655
674
|
metroStations: {
|
656
675
|
id?: number | undefined;
|
657
676
|
name: string;
|
658
|
-
walkDistance:
|
659
|
-
carDistance:
|
660
|
-
carTime:
|
677
|
+
walkDistance: string;
|
678
|
+
carDistance: string;
|
679
|
+
carTime: string;
|
661
680
|
}[] | undefined;
|
662
681
|
}, yup.AnyObject, {
|
663
682
|
apartment: {
|
@@ -800,13 +819,6 @@ declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
800
819
|
gateCode: undefined;
|
801
820
|
}, "">;
|
802
821
|
|
803
|
-
type AvailableResourcesStepFields = {
|
804
|
-
water: boolean
|
805
|
-
electricity: boolean
|
806
|
-
gas: boolean
|
807
|
-
heating: boolean
|
808
|
-
}
|
809
|
-
|
810
822
|
declare const getAvailableResourcesFields: (settings?: InspectionFieldsSettings | undefined) => InputParams<AvailableResourcesStepFields>[];
|
811
823
|
|
812
824
|
declare const getAdditionalInfoStepFields: (settings?: InspectionFieldsSettings | undefined) => InputParams<AdditionalInfoStepFields>[];
|
@@ -1135,4 +1147,4 @@ type ApartmentPointProps = {
|
|
1135
1147
|
|
1136
1148
|
declare const ObjectForMapPoint: (props: ApartmentPointProps) => JSX.Element;
|
1137
1149
|
|
1138
|
-
export { AddedMetersBlock, AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, AvailableResourcesStepFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, 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, 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 };
|
1150
|
+
export { AddedMetersBlock, AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, AvailableResourcesStepFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, 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 };
|
package/index.js
CHANGED
@@ -213,6 +213,12 @@ var inspectionsRequestBody = {
|
|
213
213
|
distance_car_kilometers: station.carDistance,
|
214
214
|
time_car_minutes: station.carTime,
|
215
215
|
}); }),
|
216
|
+
used_resources: {
|
217
|
+
electricity: inspection.availableResources.electricity,
|
218
|
+
water: inspection.availableResources.water,
|
219
|
+
gas: inspection.availableResources.gas,
|
220
|
+
heating: inspection.availableResources.heating,
|
221
|
+
},
|
216
222
|
};
|
217
223
|
},
|
218
224
|
getPostBodyRegularInspection: function (inspection, roomsImages) {
|
@@ -716,18 +722,9 @@ var BasicApartmentInfoFieldsSchema = {
|
|
716
722
|
.test("check-id", "Please select an metro station from the dropdown", function (value) {
|
717
723
|
return !!this.parent.id;
|
718
724
|
}),
|
719
|
-
walkDistance: yup
|
720
|
-
|
721
|
-
|
722
|
-
.transform(function (value) { return (Number.isNaN(value) ? undefined : value); }),
|
723
|
-
carDistance: yup
|
724
|
-
.number()
|
725
|
-
.required(defaultRequiredMessage)
|
726
|
-
.transform(function (value) { return (Number.isNaN(value) ? undefined : value); }),
|
727
|
-
carTime: yup
|
728
|
-
.number()
|
729
|
-
.required(defaultRequiredMessage)
|
730
|
-
.transform(function (value) { return (Number.isNaN(value) ? undefined : value); }),
|
725
|
+
walkDistance: yup.string().required(defaultRequiredMessage),
|
726
|
+
carDistance: yup.string().required(defaultRequiredMessage),
|
727
|
+
carTime: yup.string().required(defaultRequiredMessage),
|
731
728
|
})),
|
732
729
|
};
|
733
730
|
var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
|
@@ -872,10 +869,10 @@ var SecurityApartmentInfoFieldsSchema = {
|
|
872
869
|
var SecurityApartmentInfoStepSchema = yup.object(SecurityApartmentInfoFieldsSchema);
|
873
870
|
|
874
871
|
var getAvailableResourcesFields = function (settings) { return [
|
875
|
-
__assign({ label: "Water", name: "water", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.water),
|
876
|
-
__assign({ label: "Electricity", name: "electricity", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.electricity),
|
877
|
-
__assign({ label: "Gas", name: "gas", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.gas),
|
878
|
-
__assign({ label: "Heating", name: "heating", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.heating),
|
872
|
+
__assign({ label: "Water", name: "availableResources.water", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.water),
|
873
|
+
__assign({ label: "Electricity", name: "availableResources.electricity", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.electricity),
|
874
|
+
__assign({ label: "Gas", name: "availableResources.gas", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.gas),
|
875
|
+
__assign({ label: "Heating", name: "availableResources.heating", variant: "custom", CustomInput: BigCheckbox }, settings === null || settings === void 0 ? void 0 : settings.heating),
|
879
876
|
]; };
|
880
877
|
|
881
878
|
var checkboxLabelProps = {
|