kui-crm_actions 0.0.110 → 0.0.112

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, 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, BasicMeterFeaturesFormFields, 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, BasicMeterFeaturesFormFields, BasicMeterFieldsSettings, InputByTypeProps, 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';
@@ -265,14 +265,15 @@ type MetersInfoStepFields = {
265
265
  maxMeters: MetersCountParams | null
266
266
  }
267
267
 
268
- type FillingInfoFormFields = {
269
- tag: FillingTagsAutocompleteFields
270
- serialNumber?: string
271
- numberOfSubjects?: string | number | null
272
- name?: string
273
- type?: ApartmentFillingVariants
274
- instruction?: InputFileWithVisibilityFields
275
- tempImages?: ImageBodyRequest[]
268
+ type FillingInfoFormFields = {
269
+ tag: FillingTagsAutocompleteFields
270
+ serialNumber?: string
271
+ numberOfSubjects?: string | number | null
272
+ name?: string
273
+ description?: string
274
+ type?: ApartmentFillingVariants
275
+ instruction?: InputFileWithVisibilityFields
276
+ tempImages?: ImageBodyRequest[]
276
277
  }
277
278
 
278
279
  type FillingInfoStepFields = {
@@ -620,7 +621,6 @@ declare const BasicApartmentInfoFieldsSchema: {
620
621
  }, yup.AnyObject, {
621
622
  name: undefined;
622
623
  }, "">;
623
- zipCode: yup.StringSchema<string, yup.AnyObject, undefined, "">;
624
624
  };
625
625
  declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
626
626
  apartment: {
@@ -630,7 +630,6 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
630
630
  city: {
631
631
  name: string;
632
632
  };
633
- zipCode: string;
634
633
  }, yup.AnyObject, {
635
634
  apartment: {
636
635
  address: undefined;
@@ -639,7 +638,6 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
639
638
  city: {
640
639
  name: undefined;
641
640
  };
642
- zipCode: undefined;
643
641
  }, "">;
644
642
 
645
643
  declare const getHouseInfoStep: (settings?: InspectionFieldsSettings | undefined) => InputParams<HouseInfoStepFields>[];
@@ -781,17 +779,28 @@ declare const AdditionalInfoFieldsSchema: {
781
779
  }, yup.AnyObject, {
782
780
  name: undefined;
783
781
  }, "">;
782
+ company: yup.ObjectSchema<{
783
+ name: string;
784
+ }, yup.AnyObject, {
785
+ name: undefined;
786
+ }, "">;
784
787
  };
785
788
  declare const AdditionalInfoStepSchema: yup.ObjectSchema<{
786
789
  taxesType: string;
787
790
  countryOfResidence: {
788
791
  name: string;
789
792
  };
793
+ company: {
794
+ name: string;
795
+ };
790
796
  }, yup.AnyObject, {
791
797
  taxesType: undefined;
792
798
  countryOfResidence: {
793
799
  name: undefined;
794
800
  };
801
+ company: {
802
+ name: undefined;
803
+ };
795
804
  }, "">;
796
805
 
797
806
  declare const getHouseServicesInfoStep: (settings?: InspectionFieldsSettings | undefined) => InputParams<HouseServicesInfoStepFields>[];
@@ -892,7 +901,6 @@ declare const MetersInfoStepSchema: yup.ObjectSchema<{
892
901
  declare const getTelecommunicationsInfoStepFields: (settings?: InspectionFieldsSettings | undefined) => InputParams<TelecommunicationsInfoStepFields>[];
893
902
 
894
903
  declare const TelecommunicationsInfoFieldsSchema: {
895
- tvType: yup.StringSchema<string, yup.AnyObject, undefined, "">;
896
904
  homePhone: yup.ObjectSchema<{
897
905
  phoneNumber: string | null | undefined;
898
906
  } | null, yup.AnyObject, {
@@ -900,12 +908,10 @@ declare const TelecommunicationsInfoFieldsSchema: {
900
908
  }, "">;
901
909
  };
902
910
  declare const TelecommunicationsInfoStepSchema: yup.ObjectSchema<{
903
- tvType: string;
904
911
  homePhone: {
905
912
  phoneNumber?: string | null | undefined;
906
913
  } | null;
907
914
  }, yup.AnyObject, {
908
- tvType: undefined;
909
915
  homePhone: {
910
916
  phoneNumber: undefined;
911
917
  };
@@ -918,15 +924,13 @@ declare const FillingInfoFieldsSchema: yup.ObjectSchema<{
918
924
  tag: {
919
925
  name: string;
920
926
  };
921
- name: string;
922
- serialNumber: string | undefined;
927
+ name: string | undefined;
923
928
  }, yup.AnyObject, {
924
929
  type: undefined;
925
930
  tag: {
926
931
  name: undefined;
927
932
  };
928
933
  name: undefined;
929
- serialNumber: undefined;
930
934
  }, "">;
931
935
 
932
936
  type InventoryMeterInfoFieldsProps = {
@@ -936,6 +940,8 @@ type InventoryMeterInfoFieldsProps = {
936
940
  defaultValues?: Partial<BasicMeterFeaturesFormFields>
937
941
  }
938
942
 
943
+ declare const getInventoryMeterFields: (settings: BasicMeterFieldsSettings, inputsSettings?: any) => InputByTypeProps<BasicMeterFeaturesFormFields>[];
944
+
939
945
  declare function InventoryMeterInfoFields(props: InventoryMeterInfoFieldsProps): JSX.Element;
940
946
 
941
947
  type MeterInfoStepProps = {
@@ -1048,4 +1054,4 @@ type ApartmentPointProps = {
1048
1054
 
1049
1055
  declare const ObjectForMapPoint: (props: ApartmentPointProps) => JSX.Element;
1050
1056
 
1051
- export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, 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, 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, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
1057
+ export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, 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, 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, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getInventoryMeterFields, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
package/index.js CHANGED
@@ -265,7 +265,8 @@ var inspectionsRequestBody = {
265
265
  var _a;
266
266
  return ({
267
267
  feature: ((_a = filling.tag) === null || _a === void 0 ? void 0 : _a.id) || 0,
268
- description: filling.name,
268
+ description: filling.description,
269
+ model: filling.name,
269
270
  serial_code: filling.serialNumber,
270
271
  amount: filling.numberOfSubjects,
271
272
  photos: _this.getFilesParams(filling.images),
@@ -658,9 +659,9 @@ var apartmentFields = {
658
659
  var getBasicApartmentInfoFields = function (handlePlaceSelect, settings) { return [
659
660
  __assign({ name: "country", label: "Country", variant: "custom", CustomInput: CountryAutocomplete, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.country),
660
661
  __assign({ name: "region", label: "Region", variant: "custom", CustomInput: RegionAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.region),
661
- __assign({ name: "city", label: "City", variant: "custom", CustomInput: CityAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.city),
662
- __assign({ name: "apartment", variant: "custom", CustomInput: InputWithAddressAutocomplete, handlePlaceSelect: handlePlaceSelect, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.apartment),
663
- __assign({ label: "Apartment", name: "apartmentNumber", "data-testid": "apartment_number" }, settings === null || settings === void 0 ? void 0 : settings.apartmentNumber),
662
+ __assign({ name: "city", label: "City", variant: "custom", CustomInput: CityAutocomplete, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.city),
663
+ __assign({ name: "apartment", variant: "custom", CustomInput: InputWithAddressAutocomplete, handlePlaceSelect: handlePlaceSelect, size: 12, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.apartment),
664
+ __assign({ label: "Apartment", name: "apartmentNumber", "data-testid": "apartment_number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.apartmentNumber),
664
665
  __assign({ label: "Zip code", name: "zipCode" }, settings === null || settings === void 0 ? void 0 : settings.zipCode),
665
666
  ]; };
666
667
 
@@ -672,20 +673,19 @@ var BasicApartmentInfoFieldsSchema = {
672
673
  city: yup.object({
673
674
  name: yup.string().required("This field is required"),
674
675
  }),
675
- zipCode: yup.string().required("This field is required"),
676
676
  };
677
677
  var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
678
678
 
679
679
  var getHouseInfoStep = function (settings) { return [
680
- __assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: HouseTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
680
+ __assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: HouseTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
681
681
  __assign({ name: "houseNumber", label: "House series" }, settings === null || settings === void 0 ? void 0 : settings.houseNumber),
682
- __assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: WallMaterialsValues }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
683
- __assign({ name: "overlapType", label: "Overlap type", variant: "select", options: SlabsTypesValues }, settings === null || settings === void 0 ? void 0 : settings.overlapType),
684
- __assign({ name: "gasLeads", label: "Gas", variant: "select", options: GasTypesValues }, settings === null || settings === void 0 ? void 0 : settings.gasLeads),
685
- __assign({ name: "withHotWater", label: "Hot water", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.withHotWater),
686
- __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
687
- __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
688
- __assign({ name: "buildingYear", label: "Builded" }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
682
+ __assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: WallMaterialsValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
683
+ __assign({ name: "overlapType", label: "Overlap type", variant: "select", options: SlabsTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.overlapType),
684
+ __assign({ name: "gasLeads", label: "Gas", variant: "select", options: GasTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.gasLeads),
685
+ __assign({ name: "withHotWater", label: "Hot water", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.withHotWater),
686
+ __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
687
+ __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
688
+ __assign({ name: "buildingYear", label: "Builded", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
689
689
  ]; };
690
690
 
691
691
  var HouseInfoFieldsSchema = {
@@ -706,7 +706,7 @@ var inputProps = {
706
706
  var getDetailApartmentInfoFields = function (roomsCount, bedroomsCount, settings) {
707
707
  var _a, _b;
708
708
  return __spreadArray(__spreadArray([
709
- __assign(__assign({ label: "Total area", name: "area", type: "number" }, inputProps), settings === null || settings === void 0 ? void 0 : settings.area)
709
+ __assign(__assign({ label: "Total area", name: "area", type: "number", isRequired: true }, inputProps), settings === null || settings === void 0 ? void 0 : settings.area)
710
710
  ], (roomsCount
711
711
  ? new Array(Number(roomsCount))
712
712
  .fill(0)
@@ -717,18 +717,18 @@ var getDetailApartmentInfoFields = function (roomsCount, bedroomsCount, settings
717
717
  : "Room ".concat(key + 1);
718
718
  var settingsKey = bedroomsCount && key < bedroomsCount ? "bedrooms" : "rooms";
719
719
  return [
720
- __assign({ name: "rooms.".concat(key, ".type"), label: "".concat(label, " type"), variant: "select", options: RoomTypeValues }, ((settings === null || settings === void 0 ? void 0 : settings[settingsKey])
720
+ __assign({ name: "rooms.".concat(key, ".type"), label: "".concat(label, " type"), variant: "select", options: RoomTypeValues, isRequired: true }, ((settings === null || settings === void 0 ? void 0 : settings[settingsKey])
721
721
  ? (_a = settings[settingsKey](key)) === null || _a === void 0 ? void 0 : _a.type
722
722
  : {})),
723
723
  ];
724
724
  })
725
725
  .flat()
726
726
  : []), true), [
727
- __assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m." }, inputProps), settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
728
- __assign({ name: "numberOfWindows", label: "Windows", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
729
- __assign({ name: "renovation.year", label: "Year of last renovation", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
730
- __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),
731
- __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),
727
+ __assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m.", isRequired: true }, inputProps), settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
728
+ __assign({ name: "numberOfWindows", label: "Windows", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
729
+ __assign({ name: "renovation.year", label: "Year of last renovation", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
730
+ __assign({ name: "renovation.type", label: "Type of renovation", variant: "select", options: RenovationTypeValues, isRequired: true }, (_a = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _a === void 0 ? void 0 : _a.type),
731
+ __assign({ name: "renovation.style", label: "Renovation style", variant: "select", options: RenovationStyleValues, isRequired: true }, (_b = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _b === void 0 ? void 0 : _b.style),
732
732
  ], false);
733
733
  };
734
734
 
@@ -748,13 +748,13 @@ var DetailApartmentInfoFieldsSchema = {
748
748
  var DetailApartmentInfoStepSchema = yup.object(DetailApartmentInfoFieldsSchema);
749
749
 
750
750
  var getRoomsApartmentInfoFields = function (settings) { return [
751
- __assign({ label: "Floor", name: "floor", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.floor),
752
- __assign({ label: "Floors", name: "floorCount", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.floorCount),
753
- __assign({ label: "Rooms", name: "roomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.roomsNumber),
754
- __assign({ label: "Bedrooms", name: "bedroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.bedroomsNumber),
755
- __assign({ label: "Bathrooms", name: "bathroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.bathroomsNumber),
756
- __assign({ label: "Restrooms", name: "restroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.restroomsNumber),
757
- __assign({ label: "Combined bathroom", name: "combinedBathroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.combinedBathroomsNumber),
751
+ __assign({ label: "Floor", name: "floor", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.floor),
752
+ __assign({ label: "Floors", name: "floorCount", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.floorCount),
753
+ __assign({ label: "Rooms", name: "roomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.roomsNumber),
754
+ __assign({ label: "Bedrooms", name: "bedroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.bedroomsNumber),
755
+ __assign({ label: "Bathrooms", name: "bathroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.bathroomsNumber),
756
+ __assign({ label: "Restrooms", name: "restroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.restroomsNumber),
757
+ __assign({ label: "Combined bathroom", name: "combinedBathroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.combinedBathroomsNumber),
758
758
  ]; };
759
759
 
760
760
  var RoomsApartmentInfoFieldsSchema = {
@@ -795,11 +795,11 @@ var RoomsApartmentInfoFieldsSchema = {
795
795
  var RoomsApartmentInfoStepSchema = yup.object(RoomsApartmentInfoFieldsSchema);
796
796
 
797
797
  var getSecurityApartmentInfoFields = function (settings) { return [
798
- __assign({ label: "Object type", name: "typeOfObject", variant: "select", options: RoomTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfObject),
799
- __assign({ label: "Entrance", name: "entrance" }, settings === null || settings === void 0 ? void 0 : settings.entrance),
800
- __assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
798
+ __assign({ label: "Object type", name: "typeOfObject", variant: "select", options: RoomTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.typeOfObject),
799
+ __assign({ label: "Entrance", name: "entrance", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.entrance),
800
+ __assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
801
801
  __assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasIntercom" }, settings === null || settings === void 0 ? void 0 : settings.intercomCode),
802
- __assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasGate),
802
+ __assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasGate),
803
803
  __assign({ name: "gateCode", label: "Gate code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasGate" }, settings === null || settings === void 0 ? void 0 : settings.gateCode),
804
804
  __assign({ name: "parkingType", label: "Parking", variant: "select", options: ParkingTypesValues }, settings === null || settings === void 0 ? void 0 : settings.parkingType),
805
805
  __assign({ name: "parkingNumber", label: "Parking number", variant: "custom", CustomInput: DependentInput, dependentInputName: "parkingType" }, settings === null || settings === void 0 ? void 0 : settings.parkingNumber),
@@ -829,17 +829,20 @@ var AdditionalInfoFieldsSchema = {
829
829
  countryOfResidence: yup.object({
830
830
  name: yup.string().required(defaultRequiredMessage),
831
831
  }),
832
+ company: yup.object({
833
+ name: yup.string().required(defaultRequiredMessage),
834
+ }),
832
835
  };
833
836
  var AdditionalInfoStepSchema = yup.object(AdditionalInfoFieldsSchema);
834
837
 
835
838
  var getHouseServicesInfoStep = function (settings) { return [
836
- __assign({ name: "hasBarrier", label: "Barrier", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasBarrier),
839
+ __assign({ name: "hasBarrier", label: "Barrier", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasBarrier),
837
840
  __assign({ name: "barrierPhone", label: "Barrier code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasBarrier", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.barrierPhone),
838
- __assign({ name: "hasConcierge", label: "Concierge", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasConcierge),
841
+ __assign({ name: "hasConcierge", label: "Concierge", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasConcierge),
839
842
  __assign({ name: "conciergePhone", label: "Concierge", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasConcierge", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.conciergePhone),
840
- __assign({ name: "hasSecurity", label: "Security", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasSecurity),
843
+ __assign({ name: "hasSecurity", label: "Security", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasSecurity),
841
844
  __assign({ name: "securityPhone", label: "Security", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasSecurity", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.securityPhone),
842
- __assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
845
+ __assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
843
846
  __assign({ name: "videoControlPhone", label: "Video surveillance", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasVideoControl", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.videoControlPhone),
844
847
  ]; };
845
848
 
@@ -859,10 +862,10 @@ var metersOptions = getNumbersValues(7);
859
862
  var getMetersInfoStepFields = function (settings) {
860
863
  var _a, _b, _c, _d;
861
864
  return [
862
- __assign({ name: "maxMeters.water", label: "Water", variant: "select", options: metersOptions }, (_a = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _a === void 0 ? void 0 : _a.water),
863
- __assign({ name: "maxMeters.electricity", label: "Electricity", variant: "select", options: metersOptions }, (_b = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _b === void 0 ? void 0 : _b.electricity),
864
- __assign({ name: "maxMeters.gas", label: "Gas", variant: "select", options: metersOptions }, (_c = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _c === void 0 ? void 0 : _c.gas),
865
- __assign({ name: "maxMeters.heating", label: "Heating", variant: "select", options: metersOptions }, (_d = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _d === void 0 ? void 0 : _d.heating),
865
+ __assign({ name: "maxMeters.water", label: "Water", variant: "select", options: metersOptions, isRequired: true }, (_a = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _a === void 0 ? void 0 : _a.water),
866
+ __assign({ name: "maxMeters.electricity", label: "Electricity", variant: "select", options: metersOptions, isRequired: true }, (_b = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _b === void 0 ? void 0 : _b.electricity),
867
+ __assign({ name: "maxMeters.gas", label: "Gas", variant: "select", options: metersOptions, isRequired: true }, (_c = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _c === void 0 ? void 0 : _c.gas),
868
+ __assign({ name: "maxMeters.heating", label: "Heating", variant: "select", options: metersOptions, isRequired: true }, (_d = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _d === void 0 ? void 0 : _d.heating),
866
869
  ];
867
870
  };
868
871
 
@@ -890,17 +893,16 @@ var getTelecommunicationsInfoStepFields = function (settings) {
890
893
  };
891
894
 
892
895
  var TelecommunicationsInfoFieldsSchema = {
893
- tvType: yup.string().required(defaultRequiredMessage),
894
896
  homePhone: phoneNonRequiredSchema("homePhone"),
895
897
  };
896
898
  var TelecommunicationsInfoStepSchema = yup
897
899
  .object()
898
900
  .shape(TelecommunicationsInfoFieldsSchema, [["homePhone", "homePhone"]]);
899
901
 
900
- var getFillingInfoFields = function (withType, type, setType, settings) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], addToArrayByCondition(withType, __assign({ label: "Filling type", name: "type", variant: "select", options: FillingTypeValues, handleChange: setType }, settings === null || settings === void 0 ? void 0 : settings.type)), true), [
901
- __assign({ label: "Name (tag)", name: "tag", type: type, variant: "custom", CustomInput: FillingTagsAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.tag)
902
- ], false), addToArrayByCondition(type !== "finish", __assign({ label: "Serial code", name: "serialNumber", size: 6 }, settings === null || settings === void 0 ? void 0 : settings.serialNumber)), true), addToArrayByCondition(type !== "finish", __assign({ label: "Amount", name: "numberOfSubjects", type: "number", size: 6 }, settings === null || settings === void 0 ? void 0 : settings.numberOfSubjects)), true), [
903
- __assign({ label: "Description", name: "name", isTextArea: true }, settings === null || settings === void 0 ? void 0 : settings.name)
902
+ var getFillingInfoFields = function (withType, type, setType, settings) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], addToArrayByCondition(withType, __assign({ label: "Filling type", name: "type", variant: "select", options: FillingTypeValues, handleChange: setType, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.type)), true), [
903
+ __assign({ label: "Name (tag)", name: "tag", type: type, variant: "custom", CustomInput: FillingTagsAutocomplete, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.tag)
904
+ ], false), addToArrayByCondition(type !== "finish", __assign({ label: "Model", name: "name" }, settings === null || settings === void 0 ? void 0 : settings.name)), true), addToArrayByCondition(type !== "finish", __assign({ label: "Serial code", name: "serialNumber", size: 6 }, settings === null || settings === void 0 ? void 0 : settings.serialNumber)), true), addToArrayByCondition(type !== "finish", __assign({ label: "Amount", name: "numberOfSubjects", type: "number", size: 6 }, settings === null || settings === void 0 ? void 0 : settings.numberOfSubjects)), true), [
905
+ __assign({ label: "Description", name: "description", isTextArea: true }, settings === null || settings === void 0 ? void 0 : settings.description)
904
906
  ], false), addToArrayByCondition(type !== "finish", __assign({ label: "Instruction", name: "instruction", variant: "custom", CustomInput: InputFileWithVisibility }, settings === null || settings === void 0 ? void 0 : settings.instruction)), true); };
905
907
 
906
908
  var FillingInfoFieldsSchema = yup.object().shape({
@@ -908,8 +910,7 @@ var FillingInfoFieldsSchema = yup.object().shape({
908
910
  tag: yup.object({
909
911
  name: yup.string().required("This is a required field"),
910
912
  }),
911
- name: yup.string().required("This is a required field"),
912
- serialNumber: yup.string().when("type", {
913
+ name: yup.string().when("type", {
913
914
  is: function (value) { return value === "electronics"; },
914
915
  then: function (rule) { return rule.required(defaultRequiredMessage); },
915
916
  }),
@@ -923,7 +924,7 @@ var getMeterFeaturesFieldsSchema = function (valuesFields) {
923
924
  return yup.object().shape(__assign(__assign({}, meterFeaturesFieldsSchema), Object.assign.apply(Object, __spreadArray([{}], valuesSchema, false))));
924
925
  };
925
926
 
926
- var getMeterFields = function (settings, inputsSettings) { return __spreadArray(__spreadArray([], basicFieldsOfNewResourceMeter(settings, inputsSettings), true), [
927
+ var getInventoryMeterFields = function (settings, inputsSettings) { return __spreadArray(__spreadArray([], basicFieldsOfNewResourceMeter(settings, inputsSettings), true), [
927
928
  __assign({ label: "Activation date", name: "startDate", variant: "date", max: DateTime.now() }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.startDate),
928
929
  __assign({ label: "Passport", name: "passportFile", variant: "custom", CustomInput: InputFile }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.passportFile),
929
930
  ], false); };
@@ -934,7 +935,7 @@ function InventoryMeterInfoFields(props) {
934
935
  var defaultType = resource === "water" ? "cold" : "T1";
935
936
  var defaultMeterType = withMeterType ? defaultType : null;
936
937
  var _a = useState((defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.type) || defaultMeterType), meterType = _a[0], setMeterType = _a[1];
937
- var meterFields = getMeterFields({
938
+ var meterFields = getInventoryMeterFields({
938
939
  resource: resource,
939
940
  meterType: meterType,
940
941
  });
@@ -1154,5 +1155,5 @@ var ObjectForMapOverlay = function (props) {
1154
1155
  var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
1155
1156
  var templateObject_1;
1156
1157
 
1157
- export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, InventoryMeterInfoFields, MetersInfoFieldsSchema, MetersInfoStepSchema, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapPoint, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
1158
+ export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, InventoryMeterInfoFields, MetersInfoFieldsSchema, MetersInfoStepSchema, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapPoint, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getInventoryMeterFields, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
1158
1159
  //# sourceMappingURL=index.js.map