kui-crm_actions 0.0.61 → 0.0.62
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 +5 -34
- package/cjs/index.js.map +1 -1
- package/index.d.ts +8 -32
- package/index.js +6 -33
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
+
var yup = require('yup');
|
5
6
|
var kuiCrm = require('kui-crm');
|
6
7
|
var kuiUtils = require('kui-utils');
|
7
|
-
var yup = require('yup');
|
8
8
|
var to = require('await-to-js');
|
9
9
|
var luxon = require('luxon');
|
10
10
|
var kuiComplex = require('kui-complex');
|
@@ -129,26 +129,6 @@ function __makeTemplateObject(cooked, raw) {
|
|
129
129
|
return cooked;
|
130
130
|
}
|
131
131
|
|
132
|
-
var valueOptions = {
|
133
|
-
variant: "custom",
|
134
|
-
CustomInput: kuiCrm.NumberField,
|
135
|
-
maxIntegerPart: 7,
|
136
|
-
maxDecimalPart: 3,
|
137
|
-
};
|
138
|
-
var getPartialMeterInfoFields = function (resource, type, name, settings) {
|
139
|
-
var prefixName = name ? "".concat(name, ".") : "";
|
140
|
-
if (resource === "electricity") {
|
141
|
-
return __spreadArray(__spreadArray([
|
142
|
-
__assign({ label: "Number", name: "".concat(prefixName, "number") }, settings === null || settings === void 0 ? void 0 : settings.number),
|
143
|
-
__assign(__assign({ label: "T1 value", name: "".concat(prefixName, "T1") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t1)
|
144
|
-
], kuiUtils.addToArrayByCondition(type !== "T1", __assign(__assign({ label: "T2 value", name: "".concat(prefixName, "T2") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t2)), true), kuiUtils.addToArrayByCondition(type === "T3", __assign(__assign({ label: "T3 value", name: "".concat(prefixName, "T3") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t3)), true);
|
145
|
-
}
|
146
|
-
return [
|
147
|
-
__assign({ label: "Number", name: "".concat(prefixName, "number") }, settings === null || settings === void 0 ? void 0 : settings.number),
|
148
|
-
__assign(__assign({ label: "Value", name: "".concat(prefixName, "value") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.value),
|
149
|
-
];
|
150
|
-
};
|
151
|
-
|
152
132
|
var getPartialMeterInfoSchema = function (valuesFields) {
|
153
133
|
var filteredFields = valuesFields
|
154
134
|
.filter(function (field) { return field.type === "number"; })
|
@@ -186,7 +166,7 @@ var inspectionsRequestBody = {
|
|
186
166
|
post_index: inspection.zipCode,
|
187
167
|
floor: inspection.floor,
|
188
168
|
floor_count: inspection.floorCount,
|
189
|
-
room_type: inspection.
|
169
|
+
room_type: inspection.typeOfObject,
|
190
170
|
num_entrance: inspection.entrance,
|
191
171
|
has_intercom: inspection.hasIntercom,
|
192
172
|
intercom_code: inspection.intercomCode,
|
@@ -586,7 +566,7 @@ var RoomsApartmentInfoFieldsSchema = {
|
|
586
566
|
var RoomsApartmentInfoStepSchema = yup__namespace.object(RoomsApartmentInfoFieldsSchema);
|
587
567
|
|
588
568
|
var getSecurityApartmentInfoFields = function (settings) { return [
|
589
|
-
__assign({ label: "Object type", name: "
|
569
|
+
__assign({ label: "Object type", name: "typeOfObject", variant: "select", options: kuiCrm.RoomTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfObject),
|
590
570
|
__assign({ label: "Entrance", name: "entrance" }, settings === null || settings === void 0 ? void 0 : settings.entrance),
|
591
571
|
__assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: kuiCrm.BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
|
592
572
|
__assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: kuiComplex.DependentInput, dependentInputName: "hasIntercom" }, settings === null || settings === void 0 ? void 0 : settings.intercomCode),
|
@@ -597,7 +577,7 @@ var getSecurityApartmentInfoFields = function (settings) { return [
|
|
597
577
|
]; };
|
598
578
|
|
599
579
|
var SecurityApartmentInfoFieldsSchema = {
|
600
|
-
|
580
|
+
typeOfObject: yup__namespace.string().required("This field is required"),
|
601
581
|
entrance: yup__namespace.string().required("This field is required"),
|
602
582
|
hasIntercom: yup__namespace.string().required("This field is required"),
|
603
583
|
intercomCode: kuiCrm.fieldWithConditionSchema("hasIntercom"),
|
@@ -617,18 +597,11 @@ var SecurityApartmentInfoStepSchema = yup__namespace.object(SecurityApartmentInf
|
|
617
597
|
var checkboxLabelProps = {
|
618
598
|
size: "s",
|
619
599
|
};
|
620
|
-
var getApartmentPaymentFields = function (settings) { return [
|
621
|
-
__assign({ name: "payerCode", label: "Payer code" }, settings === null || settings === void 0 ? void 0 : settings.payerCode),
|
622
|
-
__assign({ name: "communalServicesAccount", label: "Operational account number" }, settings === null || settings === void 0 ? void 0 : settings.communalServicesAccount),
|
623
|
-
__assign({ name: "company", label: "Administrative company", variant: "custom", CustomInput: kuiCrm.CompanyAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.company),
|
624
|
-
__assign({ name: "countryOfResidence", label: "Country of Residence", variant: "custom", CustomInput: kuiCrm.CountryAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.countryOfResidence),
|
625
|
-
__assign({ label: "Tax type", name: "taxesType", variant: "select", options: kuiCrm.TaxTypeValues }, settings === null || settings === void 0 ? void 0 : settings.taxesType),
|
626
|
-
]; };
|
627
600
|
var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
|
628
601
|
__assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
|
629
602
|
__assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
|
630
603
|
__assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
|
631
|
-
], getApartmentPaymentFields(settings), true); };
|
604
|
+
], kuiCrm.getApartmentPaymentFields(settings), true); };
|
632
605
|
|
633
606
|
var AdditionalInfoFieldsSchema = {
|
634
607
|
taxesType: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
|
@@ -835,13 +808,11 @@ exports.SecurityApartmentInfoStepSchema = SecurityApartmentInfoStepSchema;
|
|
835
808
|
exports.TelecommunicationsInfoFieldsSchema = TelecommunicationsInfoFieldsSchema;
|
836
809
|
exports.TelecommunicationsInfoStepSchema = TelecommunicationsInfoStepSchema;
|
837
810
|
exports.getAdditionalInfoStepFields = getAdditionalInfoStepFields;
|
838
|
-
exports.getApartmentPaymentFields = getApartmentPaymentFields;
|
839
811
|
exports.getBasicApartmentInfoFields = getBasicApartmentInfoFields;
|
840
812
|
exports.getDetailApartmentInfoFields = getDetailApartmentInfoFields;
|
841
813
|
exports.getFillingInfoFields = getFillingInfoFields;
|
842
814
|
exports.getHouseServicesInfoStep = getHouseServicesInfoStep;
|
843
815
|
exports.getMetersInfoStepFields = getMetersInfoStepFields;
|
844
|
-
exports.getPartialMeterInfoFields = getPartialMeterInfoFields;
|
845
816
|
exports.getPartialMeterInfoSchema = getPartialMeterInfoSchema;
|
846
817
|
exports.getRoomsApartmentInfoFields = getRoomsApartmentInfoFields;
|
847
818
|
exports.getRoomsImagesSteps = getRoomsImagesSteps;
|