kui-crm_actions 0.0.60 → 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 +6 -34
- package/cjs/index.js.map +1 -1
- package/index.d.ts +9 -32
- package/index.js +7 -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,
|
@@ -203,6 +183,7 @@ var inspectionsRequestBody = {
|
|
203
183
|
renovation_type: (_b = inspection.renovation) === null || _b === void 0 ? void 0 : _b.type,
|
204
184
|
renovation_style: (_c = inspection.renovation) === null || _c === void 0 ? void 0 : _c.style,
|
205
185
|
rooms: inspection.rooms.map(function (room, index) { return ({
|
186
|
+
id: room.id,
|
206
187
|
room_type: room.type,
|
207
188
|
order_number: index,
|
208
189
|
}); }),
|
@@ -585,7 +566,7 @@ var RoomsApartmentInfoFieldsSchema = {
|
|
585
566
|
var RoomsApartmentInfoStepSchema = yup__namespace.object(RoomsApartmentInfoFieldsSchema);
|
586
567
|
|
587
568
|
var getSecurityApartmentInfoFields = function (settings) { return [
|
588
|
-
__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),
|
589
570
|
__assign({ label: "Entrance", name: "entrance" }, settings === null || settings === void 0 ? void 0 : settings.entrance),
|
590
571
|
__assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: kuiCrm.BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
|
591
572
|
__assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: kuiComplex.DependentInput, dependentInputName: "hasIntercom" }, settings === null || settings === void 0 ? void 0 : settings.intercomCode),
|
@@ -596,7 +577,7 @@ var getSecurityApartmentInfoFields = function (settings) { return [
|
|
596
577
|
]; };
|
597
578
|
|
598
579
|
var SecurityApartmentInfoFieldsSchema = {
|
599
|
-
|
580
|
+
typeOfObject: yup__namespace.string().required("This field is required"),
|
600
581
|
entrance: yup__namespace.string().required("This field is required"),
|
601
582
|
hasIntercom: yup__namespace.string().required("This field is required"),
|
602
583
|
intercomCode: kuiCrm.fieldWithConditionSchema("hasIntercom"),
|
@@ -616,18 +597,11 @@ var SecurityApartmentInfoStepSchema = yup__namespace.object(SecurityApartmentInf
|
|
616
597
|
var checkboxLabelProps = {
|
617
598
|
size: "s",
|
618
599
|
};
|
619
|
-
var getApartmentPaymentFields = function (settings) { return [
|
620
|
-
__assign({ name: "payerCode", label: "Payer code" }, settings === null || settings === void 0 ? void 0 : settings.payerCode),
|
621
|
-
__assign({ name: "communalServicesAccount", label: "Operational account number" }, settings === null || settings === void 0 ? void 0 : settings.communalServicesAccount),
|
622
|
-
__assign({ name: "company", label: "Administrative company", variant: "custom", CustomInput: kuiCrm.CompanyAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.company),
|
623
|
-
__assign({ name: "countryOfResidence", label: "Country of Residence", variant: "custom", CustomInput: kuiCrm.CountryAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.countryOfResidence),
|
624
|
-
__assign({ label: "Tax type", name: "taxesType", variant: "select", options: kuiCrm.TaxTypeValues }, settings === null || settings === void 0 ? void 0 : settings.taxesType),
|
625
|
-
]; };
|
626
600
|
var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
|
627
601
|
__assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
|
628
602
|
__assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
|
629
603
|
__assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
|
630
|
-
], getApartmentPaymentFields(settings), true); };
|
604
|
+
], kuiCrm.getApartmentPaymentFields(settings), true); };
|
631
605
|
|
632
606
|
var AdditionalInfoFieldsSchema = {
|
633
607
|
taxesType: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
|
@@ -834,13 +808,11 @@ exports.SecurityApartmentInfoStepSchema = SecurityApartmentInfoStepSchema;
|
|
834
808
|
exports.TelecommunicationsInfoFieldsSchema = TelecommunicationsInfoFieldsSchema;
|
835
809
|
exports.TelecommunicationsInfoStepSchema = TelecommunicationsInfoStepSchema;
|
836
810
|
exports.getAdditionalInfoStepFields = getAdditionalInfoStepFields;
|
837
|
-
exports.getApartmentPaymentFields = getApartmentPaymentFields;
|
838
811
|
exports.getBasicApartmentInfoFields = getBasicApartmentInfoFields;
|
839
812
|
exports.getDetailApartmentInfoFields = getDetailApartmentInfoFields;
|
840
813
|
exports.getFillingInfoFields = getFillingInfoFields;
|
841
814
|
exports.getHouseServicesInfoStep = getHouseServicesInfoStep;
|
842
815
|
exports.getMetersInfoStepFields = getMetersInfoStepFields;
|
843
|
-
exports.getPartialMeterInfoFields = getPartialMeterInfoFields;
|
844
816
|
exports.getPartialMeterInfoSchema = getPartialMeterInfoSchema;
|
845
817
|
exports.getRoomsApartmentInfoFields = getRoomsApartmentInfoFields;
|
846
818
|
exports.getRoomsImagesSteps = getRoomsImagesSteps;
|