kui-crm_actions 0.0.103 → 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/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';
@@ -143,7 +143,9 @@ type HouseInfoStepFields = {
143
143
  overlapType: OverlapTypes$1 | null
144
144
  passengerElevatorsCount: number | null
145
145
  serviceElevatorsCount: number | null
146
- ceilingHeight: number | string | null
146
+ gasLeads: GasTypes$1 | null
147
+ withHotWater: boolean
148
+ houseNumber: string
147
149
  }
148
150
 
149
151
  type InitialInspectionFormFields = CommonInspectionFormFields &
@@ -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,16 +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
- building_year: number | null;
441
- type_houses: HouseTypes | null;
442
440
  parking_type: ParkingTypes | null;
443
441
  parking_number: string;
444
- } & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms">;
442
+ } & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms"> & HouseInfoModelFields;
445
443
  declare type RegularlyInspectionFieldsBody = {
446
444
  meters: PartialMeterModel[];
447
445
  } & PostInspectionFillingListModel;
@@ -659,7 +657,8 @@ declare const HouseInfoFieldsSchema: {
659
657
  buildingYear: yup.StringSchema<string, yup.AnyObject, undefined, "">;
660
658
  wallMaterial: yup.StringSchema<string, yup.AnyObject, undefined, "">;
661
659
  overlapType: yup.StringSchema<string, yup.AnyObject, undefined, "">;
662
- ceilingHeight: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
660
+ gasLeads: yup.StringSchema<string, yup.AnyObject, undefined, "">;
661
+ withHotWater: yup.BooleanSchema<boolean, yup.AnyObject, undefined, "">;
663
662
  };
664
663
  declare const HouseInfoStepSchema: yup.ObjectSchema<{
665
664
  passengerElevatorsCount: number;
@@ -668,7 +667,8 @@ declare const HouseInfoStepSchema: yup.ObjectSchema<{
668
667
  buildingYear: string;
669
668
  wallMaterial: string;
670
669
  overlapType: string;
671
- ceilingHeight: number;
670
+ gasLeads: string;
671
+ withHotWater: boolean;
672
672
  }, yup.AnyObject, {
673
673
  passengerElevatorsCount: undefined;
674
674
  serviceElevatorsCount: undefined;
@@ -676,7 +676,8 @@ declare const HouseInfoStepSchema: yup.ObjectSchema<{
676
676
  buildingYear: undefined;
677
677
  wallMaterial: undefined;
678
678
  overlapType: undefined;
679
- ceilingHeight: undefined;
679
+ gasLeads: undefined;
680
+ withHotWater: undefined;
680
681
  }, "">;
681
682
 
682
683
  declare const getDetailApartmentInfoFields: (roomsCount?: number | null | undefined, bedroomsCount?: number | null | undefined, settings?: InspectionFieldsSettings | undefined) => InputParams<DetailApartmentInfoStepFields>[];
@@ -696,6 +697,7 @@ declare const DetailApartmentInfoFieldsSchema: {
696
697
  type: undefined;
697
698
  style: undefined;
698
699
  }, "">;
700
+ ceilingHeight: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
699
701
  };
700
702
  declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
701
703
  area: number;
@@ -708,6 +710,7 @@ declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
708
710
  style: string;
709
711
  year: number;
710
712
  };
713
+ ceilingHeight: number;
711
714
  }, yup.AnyObject, {
712
715
  area: undefined;
713
716
  rooms: "";
@@ -717,6 +720,7 @@ declare const DetailApartmentInfoStepSchema: yup.ObjectSchema<{
717
720
  type: undefined;
718
721
  style: undefined;
719
722
  };
723
+ ceilingHeight: undefined;
720
724
  }, "">;
721
725
 
722
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, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, getApartmentPaymentFields, phoneWithConditionSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, Tooltip, ApartmentsAgent, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
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,6 +186,9 @@ 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,
190
193
  parking_type: inspection.parkingType,
191
194
  parking_number: inspection.parkingNumber,
@@ -676,12 +679,14 @@ var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
676
679
 
677
680
  var getHouseInfoStep = function (settings) { return [
678
681
  __assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: HouseTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
679
- __assign({ name: "buildingYear", label: "Builded" }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
682
+ __assign({ name: "houseNumber", label: "House series" }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
680
683
  __assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: WallMaterialsValues }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
681
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),
682
687
  __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
683
688
  __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
684
- __assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m.", step: 0.01 }, settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
689
+ __assign({ name: "buildingYear", label: "Builded" }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
685
690
  ]; };
686
691
 
687
692
  var HouseInfoFieldsSchema = {
@@ -691,7 +696,8 @@ var HouseInfoFieldsSchema = {
691
696
  buildingYear: yup.string().required(defaultRequiredMessage),
692
697
  wallMaterial: yup.string().required(defaultRequiredMessage),
693
698
  overlapType: yup.string().required(defaultRequiredMessage),
694
- ceilingHeight: positiveNumberSchema,
699
+ gasLeads: yup.string().required(defaultRequiredMessage),
700
+ withHotWater: yup.boolean().required(defaultRequiredMessage),
695
701
  };
696
702
  var HouseInfoStepSchema = yup.object(HouseInfoFieldsSchema);
697
703
 
@@ -720,6 +726,8 @@ var getDetailApartmentInfoFields = function (roomsCount, bedroomsCount, settings
720
726
  .flat()
721
727
  : []), true), [
722
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),
723
731
  __assign({ name: "renovation.year", label: "Year of last renovation", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
724
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),
725
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),
@@ -737,6 +745,7 @@ var DetailApartmentInfoFieldsSchema = {
737
745
  type: yup.string().required("This field is required"),
738
746
  style: yup.string().required("This field is required"),
739
747
  }),
748
+ ceilingHeight: positiveNumberSchema,
740
749
  };
741
750
  var DetailApartmentInfoStepSchema = yup.object(DetailApartmentInfoFieldsSchema);
742
751