kui-crm_actions 0.0.97 → 0.0.99

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 CHANGED
@@ -166,10 +166,10 @@ var getWaterMeterFields = function (meters, meter, withCheckValue, name, setting
166
166
  label: "".concat(___default["default"].capitalize(meterParams.type || ""), " | #").concat(meterParams.number),
167
167
  }); });
168
168
  return [
169
- __assign({ label: "Meter", name: "".concat(prefixName, "number"), variant: "select", options: meterOptions, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.meter),
169
+ __assign({ label: "Meter", name: "".concat(prefixName, "number"), variant: "select", options: meterOptions, size: 12, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.meter),
170
170
  __assign({ label: "Value", name: "".concat(prefixName, "value"), variant: "custom", CustomInput: kuiCrm.NumberField, maxIntegerPart: 7, maxDecimalPart: 3, maxValue: ((_a = meter === null || meter === void 0 ? void 0 : meter.maxValue) === null || _a === void 0 ? void 0 : _a.value) && withCheckValue
171
171
  ? Number(meter.maxValue.value)
172
- : null, warningMessage: "There are deviations in meter readings. It should be no more than", placeholder: (_b = meter === null || meter === void 0 ? void 0 : meter.values) === null || _b === void 0 ? void 0 : _b.value }, settings === null || settings === void 0 ? void 0 : settings.value),
172
+ : null, warningMessage: "There are deviations in meter readings. It should be no more than", placeholder: (_b = meter === null || meter === void 0 ? void 0 : meter.values) === null || _b === void 0 ? void 0 : _b.value, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.value),
173
173
  ];
174
174
  };
175
175
 
@@ -209,6 +209,13 @@ var inspectionsRequestBody = {
209
209
  renovation_year: (_a = inspection.renovation) === null || _a === void 0 ? void 0 : _a.year,
210
210
  renovation_type: (_b = inspection.renovation) === null || _b === void 0 ? void 0 : _b.type,
211
211
  renovation_style: (_c = inspection.renovation) === null || _c === void 0 ? void 0 : _c.style,
212
+ wall_type: inspection.wallMaterial,
213
+ overlap_type: inspection.overlapType,
214
+ passenger_elevators_number: inspection.passengerElevatorsCount,
215
+ service_elevators_number: inspection.serviceElevatorsCount,
216
+ ceiling_height: inspection.ceilingHeight,
217
+ building_year: inspection.buildingYear,
218
+ type_houses: inspection.typeOfHouse,
212
219
  rooms: inspection.rooms.map(function (room, index) { return ({
213
220
  id: room.id,
214
221
  room_type: room.type,
@@ -276,7 +283,7 @@ var inspectionsRequestBody = {
276
283
  ? kuiUtils.getPhoneNumberFromPhoneParams(inspection.videoControlPhone)
277
284
  : null, home_phone: inspection.homePhone
278
285
  ? kuiUtils.getPhoneNumberFromPhoneParams(inspection.homePhone)
279
- : 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, parking_type: inspection.parkingType, parking_number: inspection.parkingNumber, passenger_elevators_number: inspection.passengerElevatorsCount, service_elevators_number: inspection.serviceElevatorsCount, payer_code: inspection.payerCode, filling: inspection.fillingList.map(function (filling, index) {
286
+ : 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, parking_type: inspection.parkingType, parking_number: inspection.parkingNumber, payer_code: inspection.payerCode, filling: inspection.fillingList.map(function (filling, index) {
280
287
  var _a;
281
288
  return ({
282
289
  feature: ((_a = filling.tag) === null || _a === void 0 ? void 0 : _a.id) || 0,
@@ -694,6 +701,27 @@ var BasicApartmentInfoFieldsSchema = {
694
701
  };
695
702
  var BasicApartmentInfoStepSchema = yup__namespace.object(BasicApartmentInfoFieldsSchema);
696
703
 
704
+ var getHouseInfoStep = function (settings) { return [
705
+ __assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: kuiCrm.HouseTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
706
+ __assign({ name: "buildingYear", label: "Builded" }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
707
+ __assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: kuiCrm.WallMaterialsValues }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
708
+ __assign({ name: "overlapType", label: "Overlap type", variant: "select", options: kuiCrm.SlabsTypesValues }, settings === null || settings === void 0 ? void 0 : settings.overlapType),
709
+ __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
710
+ __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
711
+ __assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m.", step: 0.1 }, settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
712
+ ]; };
713
+
714
+ var HouseInfoFieldsSchema = {
715
+ passengerElevatorsCount: kuiCrm.positiveNumberSchema,
716
+ serviceElevatorsCount: kuiCrm.positiveNumberSchema,
717
+ typeOfHouse: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
718
+ buildingYear: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
719
+ wallMaterial: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
720
+ overlapType: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
721
+ ceilingHeight: kuiCrm.positiveNumberSchema,
722
+ };
723
+ var HouseInfoStepSchema = yup__namespace.object(HouseInfoFieldsSchema);
724
+
697
725
  var inputProps = {
698
726
  step: 0.01,
699
727
  };
@@ -804,14 +832,6 @@ var SecurityApartmentInfoFieldsSchema = {
804
832
  intercomCode: kuiCrm.fieldWithConditionSchema("hasIntercom"),
805
833
  hasGate: yup__namespace.string().required("This field is required"),
806
834
  gateCode: kuiCrm.fieldWithConditionSchema("hasGate"),
807
- parkingType: yup__namespace.string().nullable(),
808
- parkingNumber: yup__namespace
809
- .string()
810
- .when("parkingType", {
811
- is: function (value) { return !!value; },
812
- then: function (rule) { return rule.required(kuiCrm.defaultRequiredMessage); },
813
- })
814
- .nullable(),
815
835
  };
816
836
  var SecurityApartmentInfoStepSchema = yup__namespace.object(SecurityApartmentInfoFieldsSchema);
817
837
 
@@ -841,8 +861,6 @@ var getHouseServicesInfoStep = function (settings) { return [
841
861
  __assign({ name: "securityPhone", label: "Security", variant: "custom", CustomInput: kuiComplex.DependentInput, dependentInputName: "hasSecurity", Input: kuiComplex.InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.securityPhone),
842
862
  __assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: kuiCrm.BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
843
863
  __assign({ name: "videoControlPhone", label: "Video surveillance", variant: "custom", CustomInput: kuiComplex.DependentInput, dependentInputName: "hasVideoControl", Input: kuiComplex.InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.videoControlPhone),
844
- __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
845
- __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
846
864
  ]; };
847
865
 
848
866
  var HouseServicesInfoFieldsSchema = {
@@ -854,8 +872,6 @@ var HouseServicesInfoFieldsSchema = {
854
872
  securityPhone: kuiCrm.phoneWithConditionSchema("hasSecurity"),
855
873
  hasVideoControl: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
856
874
  videoControlPhone: kuiCrm.phoneWithConditionSchema("hasVideoControl"),
857
- passengerElevatorsCount: kuiCrm.positiveNumberSchema,
858
- serviceElevatorsCount: kuiCrm.positiveNumberSchema,
859
875
  };
860
876
  var HouseServicesInfoStepSchema = yup__namespace.object(HouseServicesInfoFieldsSchema);
861
877
 
@@ -1126,6 +1142,8 @@ exports.DetailApartmentInfoFieldsSchema = DetailApartmentInfoFieldsSchema;
1126
1142
  exports.DetailApartmentInfoStepSchema = DetailApartmentInfoStepSchema;
1127
1143
  exports.FillingInfoFieldsSchema = FillingInfoFieldsSchema;
1128
1144
  exports.FillingListStore = FillingListStore;
1145
+ exports.HouseInfoFieldsSchema = HouseInfoFieldsSchema;
1146
+ exports.HouseInfoStepSchema = HouseInfoStepSchema;
1129
1147
  exports.HouseServicesInfoFieldsSchema = HouseServicesInfoFieldsSchema;
1130
1148
  exports.HouseServicesInfoStepSchema = HouseServicesInfoStepSchema;
1131
1149
  exports.InspectionFeedback = index;
@@ -1147,6 +1165,7 @@ exports.getAdditionalInfoStepFields = getAdditionalInfoStepFields;
1147
1165
  exports.getBasicApartmentInfoFields = getBasicApartmentInfoFields;
1148
1166
  exports.getDetailApartmentInfoFields = getDetailApartmentInfoFields;
1149
1167
  exports.getFillingInfoFields = getFillingInfoFields;
1168
+ exports.getHouseInfoStep = getHouseInfoStep;
1150
1169
  exports.getHouseServicesInfoStep = getHouseServicesInfoStep;
1151
1170
  exports.getMetersInfoStepFields = getMetersInfoStepFields;
1152
1171
  exports.getPartialMeterInfoSchema = getPartialMeterInfoSchema;