kui-crm_actions 0.0.49 → 0.0.51
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 +7 -7
- package/cjs/index.js.map +1 -1
- package/index.d.ts +10 -10
- package/index.js +7 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
@@ -202,14 +202,14 @@ var inspectionsRequestBody = {
|
|
202
202
|
}); }),
|
203
203
|
};
|
204
204
|
},
|
205
|
-
|
205
|
+
getPostBodyRegularInspection: function (inspection, roomsImages, metersImages) {
|
206
206
|
return {
|
207
207
|
date: luxon.DateTime.now().toISODate(),
|
208
|
-
inspection_type: "
|
208
|
+
inspection_type: "regular",
|
209
209
|
based_on: null,
|
210
210
|
dropbox_link: inspection.dropboxLink,
|
211
211
|
photo_groups: roomsImages,
|
212
|
-
|
212
|
+
regular: this.getPartialInspectionMeters(inspection.meters, metersImages),
|
213
213
|
};
|
214
214
|
},
|
215
215
|
getPostBodyTransferInspection: function (inspection, roomsImages, metersImages) {
|
@@ -383,7 +383,7 @@ var inspectionsRequests = {
|
|
383
383
|
});
|
384
384
|
});
|
385
385
|
},
|
386
|
-
|
386
|
+
createRegularInspection: function (data, apartmentId, loader) {
|
387
387
|
var _a;
|
388
388
|
return __awaiter(this, void 0, void 0, function () {
|
389
389
|
var metersImages, files, body;
|
@@ -398,7 +398,7 @@ var inspectionsRequests = {
|
|
398
398
|
], metersImages, true))];
|
399
399
|
case 1:
|
400
400
|
files = _b.sent();
|
401
|
-
body = inspectionsRequestBody.
|
401
|
+
body = inspectionsRequestBody.getPostBodyRegularInspection(data, files[0], files.slice(1));
|
402
402
|
return [2 /*return*/, this.createInspection(apartmentId, body, loader)];
|
403
403
|
case 2: return [2 /*return*/, null];
|
404
404
|
}
|
@@ -787,10 +787,10 @@ var StyledPhoneIcon = styled__default["default"](kuiIcon.PhoneIcon)(templateObje
|
|
787
787
|
var templateObject_1$2, templateObject_2$1;
|
788
788
|
|
789
789
|
var ApartmentInspectionCard = function (props) {
|
790
|
-
var inspection = props.inspection, onClose = props.onClose, getClientLink = props.getClientLink,
|
790
|
+
var inspection = props.inspection, onClose = props.onClose, getClientLink = props.getClientLink, getInspectionLink = props.getInspectionLink;
|
791
791
|
var apartment = inspection.apartment, tenant = inspection.tenant, metroStations = inspection.metroStations;
|
792
792
|
var clientLink = getClientLink ? getClientLink(tenant.id) : "";
|
793
|
-
var apartmentLink =
|
793
|
+
var apartmentLink = getInspectionLink(apartment.id, inspection.id);
|
794
794
|
return (jsxRuntime.jsxs(StyledCard, { children: [jsxRuntime.jsx(kuiCrm.Link, __assign({ href: apartmentLink }, { children: jsxRuntime.jsx(StyledPreviewContent, { imageSrc: apartment.previewImage, description: "".concat(apartment.address, ", \u043A\u0432. ").concat(apartment.apartmentNumber) }) })), jsxRuntime.jsx(kuiBasic.Grid, __assign({ container: true, spacing: 2, alignItems: "center" }, { children: metroStations.map(function (station) { return (jsxRuntime.jsx(MetroStation, { metroStation: station }, station.name)); }) })), jsxRuntime.jsxs(StyledTenantInfo, __assign({ container: true, alignItems: "center", justify: "space-between" }, { children: [clientLink ? (jsxRuntime.jsx(StyledClientLink, __assign({ href: clientLink }, { children: jsxRuntime.jsx(kuiCrm.UserBadge, { weight: 500, user: tenant }) }))) : (jsxRuntime.jsx(kuiCrm.UserBadge, { weight: 500, user: tenant })), !!tenant.phone && jsxRuntime.jsx(ContactPhone, { phone: tenant.phone })] })), jsxRuntime.jsx(StyledCloseButton, __assign({ isCircle: true, size: "xs", variant: "whiteWithGray", onClick: onClose }, { children: jsxRuntime.jsx(kuiIcon.CloseIcon, { width: 6, height: 6 }) }))] }));
|
795
795
|
};
|
796
796
|
var StyledCard = styled__default["default"].div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n width: 330px;\n background: ", ";\n border-radius: 8px;\n padding: 8px;\n position: absolute;\n bottom: 46px;\n left: -115px;\n z-index: 1;\n"], ["\n width: 330px;\n background: ", ";\n border-radius: 8px;\n padding: 8px;\n position: absolute;\n bottom: 46px;\n left: -115px;\n z-index: 1;\n"])), kuiBasic.theme.palette.grey.zero);
|