kui-crm_actions 0.0.59 → 0.0.61
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 +11 -4
- package/cjs/index.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +11 -4
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
+
import { NumberField, requests, uploadImages, uploadFiles, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, defaultRequiredMessage, CompanyAutocomplete, TaxTypeValues, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
|
1
2
|
import { addToArrayByCondition, clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises } from 'kui-utils';
|
2
3
|
import * as yup from 'yup';
|
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, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } 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';
|
@@ -101,17 +101,23 @@ function __makeTemplateObject(cooked, raw) {
|
|
101
101
|
return cooked;
|
102
102
|
}
|
103
103
|
|
104
|
+
var valueOptions = {
|
105
|
+
variant: "custom",
|
106
|
+
CustomInput: NumberField,
|
107
|
+
maxIntegerPart: 7,
|
108
|
+
maxDecimalPart: 3,
|
109
|
+
};
|
104
110
|
var getPartialMeterInfoFields = function (resource, type, name, settings) {
|
105
111
|
var prefixName = name ? "".concat(name, ".") : "";
|
106
112
|
if (resource === "electricity") {
|
107
113
|
return __spreadArray(__spreadArray([
|
108
114
|
__assign({ label: "Number", name: "".concat(prefixName, "number") }, settings === null || settings === void 0 ? void 0 : settings.number),
|
109
|
-
__assign({ label: "T1 value", name: "".concat(prefixName, "T1")
|
110
|
-
], addToArrayByCondition(type !== "T1", __assign({ label: "T2 value", name: "".concat(prefixName, "T2")
|
115
|
+
__assign(__assign({ label: "T1 value", name: "".concat(prefixName, "T1") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t1)
|
116
|
+
], addToArrayByCondition(type !== "T1", __assign(__assign({ label: "T2 value", name: "".concat(prefixName, "T2") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t2)), true), addToArrayByCondition(type === "T3", __assign(__assign({ label: "T3 value", name: "".concat(prefixName, "T3") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.t3)), true);
|
111
117
|
}
|
112
118
|
return [
|
113
119
|
__assign({ label: "Number", name: "".concat(prefixName, "number") }, settings === null || settings === void 0 ? void 0 : settings.number),
|
114
|
-
__assign({ label: "Value", name: "".concat(prefixName, "value")
|
120
|
+
__assign(__assign({ label: "Value", name: "".concat(prefixName, "value") }, valueOptions), settings === null || settings === void 0 ? void 0 : settings.value),
|
115
121
|
];
|
116
122
|
};
|
117
123
|
|
@@ -169,6 +175,7 @@ var inspectionsRequestBody = {
|
|
169
175
|
renovation_type: (_b = inspection.renovation) === null || _b === void 0 ? void 0 : _b.type,
|
170
176
|
renovation_style: (_c = inspection.renovation) === null || _c === void 0 ? void 0 : _c.style,
|
171
177
|
rooms: inspection.rooms.map(function (room, index) { return ({
|
178
|
+
id: room.id,
|
172
179
|
room_type: room.type,
|
173
180
|
order_number: index,
|
174
181
|
}); }),
|