kui-crm_actions 0.0.102 → 0.0.104
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 +15 -4
- package/cjs/index.js.map +1 -1
- package/index.d.ts +19 -13
- package/index.js +16 -5
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as kui_crm from 'kui-crm';
|
2
|
-
import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes as ParkingTypes$1, CityParams, RoomTypes, RenovationParams, RoomParams, HouseTypes as HouseTypes$1, WallMaterials as WallMaterials$1, OverlapTypes as OverlapTypes$1, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields as ApartmentDetailInfoModelFields$1, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, InspectionFeedbackParams, FillingTypes, FillingListItemModel, GeolocationParams } from 'kui-crm';
|
2
|
+
import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes as ParkingTypes$1, CityParams, RoomTypes, RenovationParams, RoomParams, HouseTypes as HouseTypes$1, WallMaterials as WallMaterials$1, OverlapTypes as OverlapTypes$1, GasTypes as GasTypes$1, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields as ApartmentDetailInfoModelFields$1, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, InspectionFeedbackParams, FillingTypes, FillingListItemModel, 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';
|
@@ -112,6 +112,8 @@ type SecurityApartmentInfoStepFields = {
|
|
112
112
|
intercomCode: string
|
113
113
|
hasGate: boolean | null
|
114
114
|
gateCode: string
|
115
|
+
parkingType: ParkingTypes$1 | null
|
116
|
+
parkingNumber: string
|
115
117
|
}
|
116
118
|
|
117
119
|
type RoomsApartmentInfoStepFields = {
|
@@ -141,7 +143,9 @@ type HouseInfoStepFields = {
|
|
141
143
|
overlapType: OverlapTypes$1 | null
|
142
144
|
passengerElevatorsCount: number | null
|
143
145
|
serviceElevatorsCount: number | null
|
144
|
-
|
146
|
+
gasLeads: GasTypes$1 | null
|
147
|
+
withHotWater: boolean
|
148
|
+
houseNumber: string
|
145
149
|
}
|
146
150
|
|
147
151
|
type InitialInspectionFormFields = CommonInspectionFormFields &
|
@@ -234,8 +238,6 @@ type HouseServicesInfoStepFields = {
|
|
234
238
|
securityPhone: PhoneParams | null
|
235
239
|
hasVideoControl: boolean | null
|
236
240
|
videoControlPhone: PhoneParams | null
|
237
|
-
parkingType: ParkingTypes$1 | null
|
238
|
-
parkingNumber: string
|
239
241
|
}
|
240
242
|
|
241
243
|
type TelecommunicationsInfoStepFields = {
|
@@ -336,7 +338,7 @@ declare type ApartmentDetailInfoModelFields = {
|
|
336
338
|
payer_code: string;
|
337
339
|
};
|
338
340
|
declare type HouseInfoModelFields = {
|
339
|
-
building_year: number;
|
341
|
+
building_year: number | null;
|
340
342
|
type_houses: HouseTypes | null;
|
341
343
|
serial_number: string;
|
342
344
|
type_gas: GasTypes | null;
|
@@ -432,14 +434,12 @@ declare type InitialInspectionRoomParams = {
|
|
432
434
|
declare type InitialInspectionFieldsBody = {
|
433
435
|
city: number;
|
434
436
|
rooms: InitialInspectionRoomParams[];
|
435
|
-
wall_type: WallMaterials | null;
|
436
|
-
overlap_type: OverlapTypes | null;
|
437
437
|
passenger_elevators_number: string | number | null;
|
438
438
|
service_elevators_number: string | number | null;
|
439
439
|
ceiling_height: string | number | null;
|
440
|
-
|
441
|
-
|
442
|
-
} & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms"
|
440
|
+
parking_type: ParkingTypes | null;
|
441
|
+
parking_number: string;
|
442
|
+
} & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms"> & HouseInfoModelFields;
|
443
443
|
declare type RegularlyInspectionFieldsBody = {
|
444
444
|
meters: PartialMeterModel[];
|
445
445
|
} & PostInspectionFillingListModel;
|
@@ -657,7 +657,8 @@ declare const HouseInfoFieldsSchema: {
|
|
657
657
|
buildingYear: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
658
658
|
wallMaterial: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
659
659
|
overlapType: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
660
|
-
|
660
|
+
gasLeads: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
661
|
+
withHotWater: yup.BooleanSchema<boolean, yup.AnyObject, undefined, "">;
|
661
662
|
};
|
662
663
|
declare const HouseInfoStepSchema: yup.ObjectSchema<{
|
663
664
|
passengerElevatorsCount: number;
|
@@ -666,7 +667,8 @@ declare const HouseInfoStepSchema: yup.ObjectSchema<{
|
|
666
667
|
buildingYear: string;
|
667
668
|
wallMaterial: string;
|
668
669
|
overlapType: string;
|
669
|
-
|
670
|
+
gasLeads: string;
|
671
|
+
withHotWater: boolean;
|
670
672
|
}, yup.AnyObject, {
|
671
673
|
passengerElevatorsCount: undefined;
|
672
674
|
serviceElevatorsCount: undefined;
|
@@ -674,7 +676,8 @@ declare const HouseInfoStepSchema: yup.ObjectSchema<{
|
|
674
676
|
buildingYear: undefined;
|
675
677
|
wallMaterial: undefined;
|
676
678
|
overlapType: undefined;
|
677
|
-
|
679
|
+
gasLeads: undefined;
|
680
|
+
withHotWater: undefined;
|
678
681
|
}, "">;
|
679
682
|
|
680
683
|
declare const getDetailApartmentInfoFields: (roomsCount?: number | null | undefined, bedroomsCount?: number | null | undefined, settings?: InspectionFieldsSettings | undefined) => InputParams<DetailApartmentInfoStepFields>[];
|
@@ -694,6 +697,7 @@ declare const DetailApartmentInfoFieldsSchema: {
|
|
694
697
|
type: undefined;
|
695
698
|
style: undefined;
|
696
699
|
}, "">;
|
700
|
+
ceilingHeight: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
|
697
701
|
};
|
698
702
|
declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
|
699
703
|
area: number;
|
@@ -706,6 +710,7 @@ declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
706
710
|
style: string;
|
707
711
|
year: number;
|
708
712
|
};
|
713
|
+
ceilingHeight: number;
|
709
714
|
}, yup.AnyObject, {
|
710
715
|
area: undefined;
|
711
716
|
rooms: "";
|
@@ -715,6 +720,7 @@ declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
715
720
|
type: undefined;
|
716
721
|
style: undefined;
|
717
722
|
};
|
723
|
+
ceilingHeight: undefined;
|
718
724
|
}, "">;
|
719
725
|
|
720
726
|
declare const getRoomsApartmentInfoFields: (settings?: InspectionFieldsSettings | undefined) => InputParams<RoomsApartmentInfoStepFields>[];
|
package/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as yup from 'yup';
|
2
|
-
import { NumberField, requests, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, HouseTypesValues, WallMaterialsValues, SlabsTypesValues, positiveNumberSchema, defaultRequiredMessage, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues,
|
2
|
+
import { NumberField, requests, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, HouseTypesValues, WallMaterialsValues, SlabsTypesValues, GasTypesValues, BooleanValues, positiveNumberSchema, defaultRequiredMessage, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, ParkingTypesValues, fieldWithConditionSchema, getApartmentPaymentFields, phoneWithConditionSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, 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 } from 'kui-utils';
|
5
5
|
import to from 'await-to-js';
|
@@ -186,7 +186,12 @@ var inspectionsRequestBody = {
|
|
186
186
|
service_elevators_number: inspection.serviceElevatorsCount,
|
187
187
|
ceiling_height: inspection.ceilingHeight,
|
188
188
|
building_year: inspection.buildingYear,
|
189
|
+
serial_number: inspection.houseNumber,
|
190
|
+
type_gas: inspection.gasLeads,
|
191
|
+
hot_water: inspection.withHotWater,
|
189
192
|
type_houses: inspection.typeOfHouse,
|
193
|
+
parking_type: inspection.parkingType,
|
194
|
+
parking_number: inspection.parkingNumber,
|
190
195
|
rooms: inspection.rooms.map(function (room, index) { return ({
|
191
196
|
id: room.id,
|
192
197
|
room_type: room.type,
|
@@ -254,7 +259,7 @@ var inspectionsRequestBody = {
|
|
254
259
|
? getPhoneNumberFromPhoneParams(inspection.videoControlPhone)
|
255
260
|
: null, home_phone: inspection.homePhone
|
256
261
|
? getPhoneNumberFromPhoneParams(inspection.homePhone)
|
257
|
-
: null, wifi_name: (_g = inspection.wifi) === null || _g === void 0 ? void 0 : _g.name, wifi_password: (_h = inspection.wifi) === null || _h === void 0 ? void 0 : _h.password, internet_provider_link: (_j = inspection.internetProvider) === null || _j === void 0 ? void 0 : _j.link, internet_provider_login: (_k = inspection.internetProvider) === null || _k === void 0 ? void 0 : _k.login, internet_provider_password: (_l = inspection.internetProvider) === null || _l === void 0 ? void 0 : _l.password,
|
262
|
+
: null, wifi_name: (_g = inspection.wifi) === null || _g === void 0 ? void 0 : _g.name, wifi_password: (_h = inspection.wifi) === null || _h === void 0 ? void 0 : _h.password, internet_provider_link: (_j = inspection.internetProvider) === null || _j === void 0 ? void 0 : _j.link, internet_provider_login: (_k = inspection.internetProvider) === null || _k === void 0 ? void 0 : _k.login, internet_provider_password: (_l = inspection.internetProvider) === null || _l === void 0 ? void 0 : _l.password, payer_code: inspection.payerCode, filling: inspection.fillingList.map(function (filling, index) {
|
258
263
|
var _a;
|
259
264
|
return ({
|
260
265
|
feature: ((_a = filling.tag) === null || _a === void 0 ? void 0 : _a.id) || 0,
|
@@ -674,12 +679,14 @@ var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
|
|
674
679
|
|
675
680
|
var getHouseInfoStep = function (settings) { return [
|
676
681
|
__assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: HouseTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
|
677
|
-
__assign({ name: "
|
682
|
+
__assign({ name: "houseNumber", label: "House series" }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
|
678
683
|
__assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: WallMaterialsValues }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
|
679
684
|
__assign({ name: "overlapType", label: "Overlap type", variant: "select", options: SlabsTypesValues }, settings === null || settings === void 0 ? void 0 : settings.overlapType),
|
685
|
+
__assign({ name: "gasLeads", label: "Gas", variant: "select", options: GasTypesValues }, settings === null || settings === void 0 ? void 0 : settings.gasLeads),
|
686
|
+
__assign({ name: "withHotWater", label: "Hot water", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.withHotWater),
|
680
687
|
__assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
|
681
688
|
__assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
|
682
|
-
__assign({ name: "
|
689
|
+
__assign({ name: "buildingYear", label: "Builded" }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
|
683
690
|
]; };
|
684
691
|
|
685
692
|
var HouseInfoFieldsSchema = {
|
@@ -689,7 +696,8 @@ var HouseInfoFieldsSchema = {
|
|
689
696
|
buildingYear: yup.string().required(defaultRequiredMessage),
|
690
697
|
wallMaterial: yup.string().required(defaultRequiredMessage),
|
691
698
|
overlapType: yup.string().required(defaultRequiredMessage),
|
692
|
-
|
699
|
+
gasLeads: yup.string().required(defaultRequiredMessage),
|
700
|
+
withHotWater: yup.boolean().required(defaultRequiredMessage),
|
693
701
|
};
|
694
702
|
var HouseInfoStepSchema = yup.object(HouseInfoFieldsSchema);
|
695
703
|
|
@@ -718,6 +726,8 @@ var getDetailApartmentInfoFields = function (roomsCount, bedroomsCount, settings
|
|
718
726
|
.flat()
|
719
727
|
: []), true), [
|
720
728
|
__assign({ name: "numberOfWindows", label: "Windows", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
|
729
|
+
__assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m." }, inputProps), settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
|
730
|
+
__assign({ name: "numberOfWindows", label: "Windows", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
|
721
731
|
__assign({ name: "renovation.year", label: "Year of last renovation", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
|
722
732
|
__assign({ name: "renovation.type", label: "Type of renovation", variant: "select", options: RenovationTypeValues }, (_a = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _a === void 0 ? void 0 : _a.type),
|
723
733
|
__assign({ name: "renovation.style", label: "Renovation style", variant: "select", options: RenovationStyleValues }, (_b = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _b === void 0 ? void 0 : _b.style),
|
@@ -735,6 +745,7 @@ var DetailApartmentInfoFieldsSchema = {
|
|
735
745
|
type: yup.string().required("This field is required"),
|
736
746
|
style: yup.string().required("This field is required"),
|
737
747
|
}),
|
748
|
+
ceilingHeight: positiveNumberSchema,
|
738
749
|
};
|
739
750
|
var DetailApartmentInfoStepSchema = yup.object(DetailApartmentInfoFieldsSchema);
|
740
751
|
|