kui-crm_actions 0.0.138 → 0.0.140

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
@@ -636,6 +636,13 @@ declare const BasicApartmentInfoFieldsSchema: {
636
636
  }, yup.AnyObject, {
637
637
  name: undefined;
638
638
  }, "">;
639
+ metroStations: yup.ArraySchema<{
640
+ id?: number | undefined;
641
+ name: string;
642
+ walkDistance: number;
643
+ carDistance: number;
644
+ carTime: number;
645
+ }[] | undefined, yup.AnyObject, "", "">;
639
646
  };
640
647
  declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
641
648
  apartment: {
@@ -645,6 +652,13 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
645
652
  city: {
646
653
  name: string;
647
654
  };
655
+ metroStations: {
656
+ id?: number | undefined;
657
+ name: string;
658
+ walkDistance: number;
659
+ carDistance: number;
660
+ carTime: number;
661
+ }[] | undefined;
648
662
  }, yup.AnyObject, {
649
663
  apartment: {
650
664
  address: undefined;
@@ -653,6 +667,7 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
653
667
  city: {
654
668
  name: undefined;
655
669
  };
670
+ metroStations: "";
656
671
  }, "">;
657
672
 
658
673
  declare const getHouseInfoStep: (settings?: InspectionFieldsSettings | undefined) => InputParams<HouseInfoStepFields>[];
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as yup from 'yup';
2
- import { NumberField, requests, uploadNewFile, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, HouseTypesValues, WallMaterialsValues, SlabsTypesValues, GasTypesValues, BooleanValues, positiveNumberSchema, defaultRequiredMessage, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, ParkingTypesValues, fieldWithConditionSchema, BigCheckbox, getApartmentPaymentFields, phoneWithConditionSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, getMeterValuesFieldsSchema, basicFieldsOfNewResourceMeter, meterUnitLabel, FormWrapper, MeterTypeRadioGroup, InputByType, Tooltip, ApartmentsAgent, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
2
+ import { NumberField, requests, uploadNewFile, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, defaultRequiredMessage, HouseTypesValues, WallMaterialsValues, SlabsTypesValues, GasTypesValues, BooleanValues, positiveNumberSchema, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, ParkingTypesValues, fieldWithConditionSchema, BigCheckbox, getApartmentPaymentFields, phoneWithConditionSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, getMeterValuesFieldsSchema, basicFieldsOfNewResourceMeter, meterUnitLabel, FormWrapper, MeterTypeRadioGroup, InputByType, 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, clearIndexStores, addToIndexDBWithQueue, initIndexDB, readFromIndexDB, addIndexDBStore } from 'kui-utils';
5
5
  import to from 'await-to-js';
@@ -706,6 +706,18 @@ var BasicApartmentInfoFieldsSchema = {
706
706
  city: yup.object({
707
707
  name: yup.string().required("This field is required"),
708
708
  }),
709
+ metroStations: yup.array().of(yup.object({
710
+ id: yup.number(),
711
+ name: yup
712
+ .string()
713
+ .required(defaultRequiredMessage)
714
+ .test("check-id", "Please select an metro station from the dropdown", function (value) {
715
+ return !!this.parent.id;
716
+ }),
717
+ walkDistance: yup.number().required(defaultRequiredMessage),
718
+ carDistance: yup.number().required(defaultRequiredMessage),
719
+ carTime: yup.number().required(defaultRequiredMessage),
720
+ })),
709
721
  };
710
722
  var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
711
723