kui-crm_actions 0.0.147 → 0.0.150
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 +28 -6
- package/cjs/index.js.map +1 -1
- package/index.d.ts +89 -131
- package/index.js +28 -6
- 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)
|
@@ -385,13 +385,30 @@ var inspectionsRequestBody = {
|
|
385
385
|
var inspectionsRequests = {
|
386
386
|
getInspectionTypes: function (apartmentId) {
|
387
387
|
return __awaiter(this, void 0, void 0, function () {
|
388
|
-
var _a, res;
|
388
|
+
var _a, err, res;
|
389
389
|
return __generator(this, function (_b) {
|
390
390
|
switch (_b.label) {
|
391
391
|
case 0: return [4 /*yield*/, to__default["default"](kuiCrm.requests.get("/apartments/".concat(apartmentId, "/inspection-types")))];
|
392
392
|
case 1:
|
393
|
-
_a = _b.sent(), _a[0], res = _a[1];
|
394
|
-
|
393
|
+
_a = _b.sent(), err = _a[0], res = _a[1];
|
394
|
+
if (err)
|
395
|
+
return [2 /*return*/, [err, undefined]];
|
396
|
+
return [2 /*return*/, [null, res === null || res === void 0 ? void 0 : res.inspection_types]];
|
397
|
+
}
|
398
|
+
});
|
399
|
+
});
|
400
|
+
},
|
401
|
+
getTransferTypes: function (apartmentId) {
|
402
|
+
return __awaiter(this, void 0, void 0, function () {
|
403
|
+
var _a, err, res;
|
404
|
+
return __generator(this, function (_b) {
|
405
|
+
switch (_b.label) {
|
406
|
+
case 0: return [4 /*yield*/, to__default["default"](kuiCrm.requests.get("/apartments/".concat(apartmentId, "/transfer-inspection-types")))];
|
407
|
+
case 1:
|
408
|
+
_a = _b.sent(), err = _a[0], res = _a[1];
|
409
|
+
if (err)
|
410
|
+
return [2 /*return*/, [err, undefined]];
|
411
|
+
return [2 /*return*/, [null, res === null || res === void 0 ? void 0 : res.transfer_inspection_types]];
|
395
412
|
}
|
396
413
|
});
|
397
414
|
});
|
@@ -910,6 +927,7 @@ var checkboxLabelProps = {
|
|
910
927
|
var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
|
911
928
|
__assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
|
912
929
|
__assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
|
930
|
+
__assign({ label: "Smoking", name: "withSmoking", variant: "custom", CustomInput: kuiComplex.CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withSmoking),
|
913
931
|
__assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
|
914
932
|
], kuiCrm.getApartmentPaymentFields(settings), true); };
|
915
933
|
|
@@ -997,7 +1015,7 @@ var getFillingInfoFields = function (withType, type, setType, settings) { return
|
|
997
1015
|
var FillingInfoFieldsSchema = yup__namespace.object().shape({
|
998
1016
|
type: yup__namespace.string(),
|
999
1017
|
tag: yup__namespace.object({
|
1000
|
-
name: yup__namespace.string().required(
|
1018
|
+
name: yup__namespace.string().required(kuiCrm.defaultRequiredMessage),
|
1001
1019
|
}),
|
1002
1020
|
name: yup__namespace.string().when("type", {
|
1003
1021
|
is: function (value) { return value === "electronics"; },
|
@@ -1168,7 +1186,11 @@ var templateObject_1$5, templateObject_2$4, templateObject_3$1;
|
|
1168
1186
|
|
1169
1187
|
var InspectionFillingCard = function (props) {
|
1170
1188
|
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
|
1189
|
+
return (jsxRuntime.jsx(StyledCard$1, __assign({ className: className }, { children: jsxRuntime.jsx(StyledCheckbox
|
1190
|
+
// @ts-ignore
|
1191
|
+
, {
|
1192
|
+
// @ts-ignore
|
1193
|
+
form: form, name: "fillingList.".concat(index, ".check"), label: jsxRuntime.jsx(FillingCardContent, __assign({}, other)), disabled: disabled }) })));
|
1172
1194
|
};
|
1173
1195
|
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
1196
|
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"])));
|