kui-crm_actions 0.0.39 → 0.0.40
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 +14 -12
- package/cjs/index.js.map +1 -1
- package/index.d.ts +6 -6
- package/index.js +15 -13
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -619,6 +619,8 @@ declare const SecurityApartmentInfoFieldsSchema: {
|
|
619
619
|
intercomCode: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
620
620
|
hasGate: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
621
621
|
gateCode: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
622
|
+
parkingType: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
623
|
+
parkingNumber: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
622
624
|
};
|
623
625
|
declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
624
626
|
typeOfRoom: string;
|
@@ -627,6 +629,8 @@ declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
627
629
|
intercomCode: string | null | undefined;
|
628
630
|
hasGate: string;
|
629
631
|
gateCode: string | null | undefined;
|
632
|
+
parkingType: string | null | undefined;
|
633
|
+
parkingNumber: string | null | undefined;
|
630
634
|
}, yup.AnyObject, {
|
631
635
|
typeOfRoom: undefined;
|
632
636
|
entrance: undefined;
|
@@ -634,6 +638,8 @@ declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
634
638
|
intercomCode: undefined;
|
635
639
|
hasGate: undefined;
|
636
640
|
gateCode: undefined;
|
641
|
+
parkingType: undefined;
|
642
|
+
parkingNumber: undefined;
|
637
643
|
}, "">;
|
638
644
|
|
639
645
|
declare const getApartmentPaymentFields: (settings?: InspectionFieldsSettings | undefined) => any[];
|
@@ -686,8 +692,6 @@ declare const HouseServicesInfoFieldsSchema: {
|
|
686
692
|
} | null, yup.AnyObject, {
|
687
693
|
phoneNumber: undefined;
|
688
694
|
}, "">;
|
689
|
-
parkingType: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
690
|
-
parkingNumber: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
691
695
|
passengerElevatorsCount: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
|
692
696
|
serviceElevatorsCount: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
|
693
697
|
};
|
@@ -708,8 +712,6 @@ declare const HouseServicesInfoStepSchema: yup.ObjectSchema<{
|
|
708
712
|
videoControlPhone: {
|
709
713
|
phoneNumber?: string | null | undefined;
|
710
714
|
} | null;
|
711
|
-
parkingType: string | null | undefined;
|
712
|
-
parkingNumber: string | null | undefined;
|
713
715
|
passengerElevatorsCount: number;
|
714
716
|
serviceElevatorsCount: number;
|
715
717
|
}, yup.AnyObject, {
|
@@ -729,8 +731,6 @@ declare const HouseServicesInfoStepSchema: yup.ObjectSchema<{
|
|
729
731
|
videoControlPhone: {
|
730
732
|
phoneNumber: undefined;
|
731
733
|
};
|
732
|
-
parkingType: undefined;
|
733
|
-
parkingNumber: undefined;
|
734
734
|
passengerElevatorsCount: undefined;
|
735
735
|
serviceElevatorsCount: undefined;
|
736
736
|
}, "">;
|
package/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { addToArrayByCondition, clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises } from 'kui-utils';
|
2
2
|
import * as yup from 'yup';
|
3
|
-
import { requests, uploadImages, uploadFiles, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues,
|
3
|
+
import { requests, uploadImages, uploadFiles, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, defaultRequiredMessage, CompanyAutocomplete, TaxTypeValues, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete } from 'kui-crm';
|
4
4
|
import to from 'await-to-js';
|
5
5
|
import { DateTime } from 'luxon';
|
6
6
|
import { InputWithAddressAutocomplete, DependentInput, CheckboxWithController, InputPhoneWithForm } from 'kui-complex';
|
@@ -536,6 +536,8 @@ var getSecurityApartmentInfoFields = function (settings) { return [
|
|
536
536
|
__assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasIntercom" }, settings === null || settings === void 0 ? void 0 : settings.intercomCode),
|
537
537
|
__assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasGate),
|
538
538
|
__assign({ name: "gateCode", label: "Gate code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasGate" }, settings === null || settings === void 0 ? void 0 : settings.gateCode),
|
539
|
+
__assign({ name: "parkingType", label: "Parking", variant: "select", options: ParkingTypesValues }, settings === null || settings === void 0 ? void 0 : settings.parkingType),
|
540
|
+
__assign({ name: "parkingNumber", label: "Parking number", variant: "custom", CustomInput: DependentInput, dependentInputName: "parkingType" }, settings === null || settings === void 0 ? void 0 : settings.parkingNumber),
|
539
541
|
]; };
|
540
542
|
|
541
543
|
var SecurityApartmentInfoFieldsSchema = {
|
@@ -545,6 +547,14 @@ var SecurityApartmentInfoFieldsSchema = {
|
|
545
547
|
intercomCode: fieldWithConditionSchema("hasIntercom"),
|
546
548
|
hasGate: yup.string().required("This field is required"),
|
547
549
|
gateCode: fieldWithConditionSchema("hasGate"),
|
550
|
+
parkingType: yup.string().nullable(),
|
551
|
+
parkingNumber: yup
|
552
|
+
.string()
|
553
|
+
.when("parkingType", {
|
554
|
+
is: function (value) { return !!value; },
|
555
|
+
then: function (rule) { return rule.required(defaultRequiredMessage); },
|
556
|
+
})
|
557
|
+
.nullable(),
|
548
558
|
};
|
549
559
|
var SecurityApartmentInfoStepSchema = yup.object(SecurityApartmentInfoFieldsSchema);
|
550
560
|
|
@@ -581,8 +591,6 @@ var getHouseServicesInfoStep = function (settings) { return [
|
|
581
591
|
__assign({ name: "securityPhone", label: "Security", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasSecurity", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.securityPhone),
|
582
592
|
__assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
|
583
593
|
__assign({ name: "videoControlPhone", label: "Video surveillance", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasVideoControl", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.videoControlPhone),
|
584
|
-
__assign({ name: "parkingType", label: "Parking", variant: "select", options: ParkingTypesValues }, settings === null || settings === void 0 ? void 0 : settings.parkingType),
|
585
|
-
__assign({ name: "parkingNumber", label: "Parking number", variant: "custom", CustomInput: DependentInput, dependentInputName: "parkingType" }, settings === null || settings === void 0 ? void 0 : settings.parkingNumber),
|
586
594
|
__assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
|
587
595
|
__assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
|
588
596
|
]; };
|
@@ -596,14 +604,6 @@ var HouseServicesInfoFieldsSchema = {
|
|
596
604
|
securityPhone: phoneWithConditionSchema("hasSecurity"),
|
597
605
|
hasVideoControl: yup.string().required(defaultRequiredMessage),
|
598
606
|
videoControlPhone: phoneWithConditionSchema("hasVideoControl"),
|
599
|
-
parkingType: yup.string().nullable(),
|
600
|
-
parkingNumber: yup
|
601
|
-
.string()
|
602
|
-
.when("parkingType", {
|
603
|
-
is: function (value) { return !!value; },
|
604
|
-
then: function (rule) { return rule.required(defaultRequiredMessage); },
|
605
|
-
})
|
606
|
-
.nullable(),
|
607
607
|
passengerElevatorsCount: positiveNumberSchema,
|
608
608
|
serviceElevatorsCount: positiveNumberSchema,
|
609
609
|
};
|
@@ -677,7 +677,7 @@ var renderMetersSteps = function (MeterStep, MeterPhotoStep, maxMeters) {
|
|
677
677
|
]; });
|
678
678
|
};
|
679
679
|
|
680
|
-
var getRoomsImagesSteps = function (type, settings, roomsParams) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
|
680
|
+
var getRoomsImagesSteps = function (type, settings, roomsParams) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
|
681
681
|
__assign({ type: "kitchen" }, settings.kitchen)
|
682
682
|
], new Array(Number((roomsParams === null || roomsParams === void 0 ? void 0 : roomsParams.bedroomsNumber) || 0))
|
683
683
|
.fill(0)
|
@@ -695,7 +695,9 @@ var getRoomsImagesSteps = function (type, settings, roomsParams) { return __spre
|
|
695
695
|
.map(function (_, index) { return (__assign({ type: "combined_bathroom" }, settings.combinedBathroom((roomsParams === null || roomsParams === void 0 ? void 0 : roomsParams.combinedBathroomsNumber) ? "".concat(index + 1, " ") : ""))); }), true), [
|
696
696
|
__assign({ type: "others" }, settings.others),
|
697
697
|
__assign({ type: "keys" }, settings.keys)
|
698
|
-
], false), addToArrayByCondition(type === "inventory", __assign({ type: "entrance" }, settings.entrance)), true)
|
698
|
+
], false), addToArrayByCondition(type === "inventory", __assign({ type: "entrance" }, settings.entrance)), true), addToArrayByCondition(type === "initial", __assign({ type: "parking" }, settings.parkung)), true), [
|
699
|
+
__assign({ type: "additional" }, settings.additional),
|
700
|
+
], false); };
|
699
701
|
|
700
702
|
var useMetersValues = function (formStore, metersStore) {
|
701
703
|
useEffect(function () {
|