kui-crm_actions 0.0.147 → 0.0.149
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 +21 -3
- package/cjs/index.js.map +1 -1
- package/index.d.ts +88 -130
- package/index.js +21 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
@@ -300,7 +300,7 @@ var inspectionsRequestBody = {
|
|
300
300
|
based_on: null,
|
301
301
|
dropbox_link: inspection.dropboxLink,
|
302
302
|
photo_groups: roomsImages,
|
303
|
-
inventory: __assign({ contract_document: contractFile || undefined, allowed_children: inspection.withChildren, allowed_pets: inspection.withPets, additional_terms: inspection.additionalTerms, country_of_residence: ((_a = inspection.countryOfResidence) === null || _a === void 0 ? void 0 : _a.id) || null, administrative_company: ((_b = inspection.company) === null || _b === void 0 ? void 0 : _b.id) || null, tax_type: inspection.taxesType, financial_personal_account: inspection.communalServicesAccount, max_electricity_counters: (_c = inspection.maxMeters) === null || _c === void 0 ? void 0 : _c.electricity, max_gas_counters: (_d = inspection.maxMeters) === null || _d === void 0 ? void 0 : _d.gas, max_heating_counters: (_e = inspection.maxMeters) === null || _e === void 0 ? void 0 : _e.heating, max_water_counters: (_f = inspection.maxMeters) === null || _f === void 0 ? void 0 : _f.water, has_barrier: inspection.hasBarrier, has_concierge: inspection.hasConcierge, has_security: inspection.hasSecurity, has_video_surveillance: inspection.hasVideoControl, barrier_phone: inspection.barrierPhone
|
303
|
+
inventory: __assign({ contract_document: contractFile || undefined, allowed_children: inspection.withChildren, allowed_pets: inspection.withPets, allowed_smoking: inspection.withSmoking, additional_terms: inspection.additionalTerms, country_of_residence: ((_a = inspection.countryOfResidence) === null || _a === void 0 ? void 0 : _a.id) || null, administrative_company: ((_b = inspection.company) === null || _b === void 0 ? void 0 : _b.id) || null, tax_type: inspection.taxesType, financial_personal_account: inspection.communalServicesAccount, max_electricity_counters: (_c = inspection.maxMeters) === null || _c === void 0 ? void 0 : _c.electricity, max_gas_counters: (_d = inspection.maxMeters) === null || _d === void 0 ? void 0 : _d.gas, max_heating_counters: (_e = inspection.maxMeters) === null || _e === void 0 ? void 0 : _e.heating, max_water_counters: (_f = inspection.maxMeters) === null || _f === void 0 ? void 0 : _f.water, has_barrier: inspection.hasBarrier, has_concierge: inspection.hasConcierge, has_security: inspection.hasSecurity, has_video_surveillance: inspection.hasVideoControl, barrier_phone: inspection.barrierPhone
|
304
304
|
? kuiUtils.getPhoneNumberFromPhoneParams(inspection.barrierPhone)
|
305
305
|
: null, concierge_phone: inspection.conciergePhone
|
306
306
|
? kuiUtils.getPhoneNumberFromPhoneParams(inspection.conciergePhone)
|
@@ -396,6 +396,19 @@ var inspectionsRequests = {
|
|
396
396
|
});
|
397
397
|
});
|
398
398
|
},
|
399
|
+
getTransferTypes: function (apartmentId) {
|
400
|
+
return __awaiter(this, void 0, void 0, function () {
|
401
|
+
var _a, res;
|
402
|
+
return __generator(this, function (_b) {
|
403
|
+
switch (_b.label) {
|
404
|
+
case 0: return [4 /*yield*/, to__default["default"](kuiCrm.requests.get("/apartments/".concat(apartmentId, "/transfer-inspection-types")))];
|
405
|
+
case 1:
|
406
|
+
_a = _b.sent(), _a[0], res = _a[1];
|
407
|
+
return [2 /*return*/, res === null || res === void 0 ? void 0 : res.transfer_inspection_types];
|
408
|
+
}
|
409
|
+
});
|
410
|
+
});
|
411
|
+
},
|
399
412
|
createInspection: function (apartmentId, body, loader) {
|
400
413
|
var _a;
|
401
414
|
return __awaiter(this, void 0, void 0, function () {
|
@@ -910,6 +923,7 @@ var checkboxLabelProps = {
|
|
910
923
|
var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
|
911
924
|
__assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
|
912
925
|
__assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
|
926
|
+
__assign({ label: "Smoking", name: "withSmoking", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withSmoking),
|
913
927
|
__assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
|
914
928
|
], kuiCrm.getApartmentPaymentFields(settings), true); };
|
915
929
|
|
@@ -997,7 +1011,7 @@ var getFillingInfoFields = function (withType, type, setType, settings) { return
|
|
997
1011
|
var FillingInfoFieldsSchema = yup__namespace.object().shape({
|
998
1012
|
type: yup__namespace.string(),
|
999
1013
|
tag: yup__namespace.object({
|
1000
|
-
name: yup__namespace.string().required(
|
1014
|
+
name: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
|
1001
1015
|
}),
|
1002
1016
|
name: yup__namespace.string().when("type", {
|
1003
1017
|
is: function (value) { return value === "electronics"; },
|
@@ -1168,7 +1182,11 @@ var templateObject_1$5, templateObject_2$4, templateObject_3$1;
|
|
1168
1182
|
|
1169
1183
|
var InspectionFillingCard = function (props) {
|
1170
1184
|
var className = props.className, form = props.form, index = props.index, disabled = props.disabled, other = __rest(props, ["className", "form", "index", "disabled"]);
|
1171
|
-
return (jsxRuntime.jsx(StyledCard$1, __assign({ className: className }, { children: jsxRuntime.jsx(StyledCheckbox
|
1185
|
+
return (jsxRuntime.jsx(StyledCard$1, __assign({ className: className }, { children: jsxRuntime.jsx(StyledCheckbox
|
1186
|
+
// @ts-ignore
|
1187
|
+
, {
|
1188
|
+
// @ts-ignore
|
1189
|
+
form: form, name: "fillingList.".concat(index, ".check"), label: jsxRuntime.jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
|
1172
1190
|
};
|
1173
1191
|
var StyledCard$1 = styled__default["default"](kuiBasic.Grid)(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n padding: 8px 16px;\n border-radius: 12px;\n background: white;\n"], ["\n padding: 8px 16px;\n border-radius: 12px;\n background: white;\n"])));
|
1174
1192
|
var StyledCheckbox = styled__default["default"](kuiComplex.CheckboxWithController)(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n .KUI-Label_checkbox {\n margin-left: 0;\n }\n"], ["\n .KUI-Label_checkbox {\n margin-left: 0;\n }\n"])));
|