kui-crm_actions 0.0.55 → 0.0.57
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 -6
- package/cjs/index.js.map +1 -1
- package/index.d.ts +6 -1
- package/index.js +7 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -735,8 +735,8 @@ var useMetersValues = function (formStore, metersStore) {
|
|
735
735
|
};
|
736
736
|
|
737
737
|
var ApartmentInspectionPoint = function (props) {
|
738
|
-
var date = props.date, onClick = props.onClick, isActive = props.isActive;
|
739
|
-
return (jsx(Button, __assign({ size: "xs", variant: isActive ? "primary" : "white", onClick: onClick }, { children: (date === null || date === void 0 ? void 0 : date.toFormat("dd.MM.yyyy")) || "
|
738
|
+
var date = props.date, onClick = props.onClick, isActive = props.isActive, apartment = props.apartment;
|
739
|
+
return (jsx(Button, __assign({ size: "xs", variant: isActive ? "primary" : "white", onClick: onClick }, { children: (date === null || date === void 0 ? void 0 : date.toFormat("dd.MM.yyyy")) || "".concat(Number(apartment.roomsCount), "-\u043A\u043E\u043C\u043D.") })));
|
740
740
|
};
|
741
741
|
|
742
742
|
var MetroStation = function (props) {
|
@@ -760,10 +760,11 @@ var templateObject_1$2, templateObject_2$1;
|
|
760
760
|
|
761
761
|
var ApartmentInspectionCard = function (props) {
|
762
762
|
var inspection = props.inspection, onClose = props.onClose, getClientLink = props.getClientLink, getInspectionLink = props.getInspectionLink;
|
763
|
-
var apartment = inspection.apartment, tenant = inspection.tenant, metroStations = inspection.metroStations;
|
764
|
-
var
|
763
|
+
var apartment = inspection.apartment, tenant = inspection.tenant, landlord = inspection.landlord, metroStations = inspection.metroStations;
|
764
|
+
var client = tenant || landlord;
|
765
|
+
var clientLink = getClientLink && client ? getClientLink(client === null || client === void 0 ? void 0 : client.id) : "";
|
765
766
|
var apartmentLink = getInspectionLink(apartment.id, inspection.id);
|
766
|
-
return (jsxs(StyledCard, { children: [jsx(Link, __assign({ href: apartmentLink }, { children: jsx(StyledPreviewContent, { imageSrc: apartment.previewImage, description: apartment.address }) })), jsx(Grid, __assign({ container: true, spacing: 2, alignItems: "center" }, { children: metroStations.map(function (station) { return (jsx(MetroStation, { metroStation: station }, station.name)); }) })), !!
|
767
|
+
return (jsxs(StyledCard, { children: [jsx(Link, __assign({ href: apartmentLink }, { children: jsx(StyledPreviewContent, { imageSrc: apartment.previewImage, description: apartment.address }) })), jsx(Grid, __assign({ container: true, spacing: 2, alignItems: "center" }, { children: metroStations.map(function (station) { return (jsx(MetroStation, { metroStation: station }, station.name)); }) })), !!client && (jsxs(StyledTenantInfo, __assign({ container: true, alignItems: "center", justify: "space-between" }, { children: [clientLink ? (jsx(StyledClientLink, __assign({ href: clientLink }, { children: jsx(UserBadge, { weight: 500, user: client }) }))) : (jsx(UserBadge, { weight: 500, user: client })), !!(client === null || client === void 0 ? void 0 : client.phoneNumber) && (jsx(ContactPhone, { phone: client === null || client === void 0 ? void 0 : client.phoneNumber }))] }))), jsx(StyledCloseButton, __assign({ isCircle: true, size: "xs", variant: "whiteWithGray", onClick: onClose }, { children: jsx(CloseIcon, { width: 6, height: 6 }) }))] }));
|
767
768
|
};
|
768
769
|
var StyledCard = styled.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"])), theme.palette.grey.zero);
|
769
770
|
var StyledPreviewContent = styled(PreviewContent)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-bottom: 8px;\n p {\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n }\n"], ["\n margin-bottom: 8px;\n p {\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n }\n"])));
|
@@ -775,7 +776,7 @@ var templateObject_1$1, templateObject_2, templateObject_3, templateObject_4, te
|
|
775
776
|
var ApartmentInspectionOverlay = function (props) {
|
776
777
|
var inspection = props.inspection, map = props.map, other = __rest(props, ["inspection", "map"]);
|
777
778
|
var _a = useMapCards(inspection.location, map), ref = _a.ref, isOpen = _a.isOpen, closeCard = _a.closeCard, toggleCard = _a.toggleCard;
|
778
|
-
return (jsx(MapOverlay, __assign({ map: map, position: inspection.location }, { children: jsxs(StyledWrapper, __assign({ ref: ref }, { children: [jsx(ApartmentInspectionPoint, { date: inspection.date, isActive: isOpen, onClick: toggleCard }), isOpen && (jsx(ApartmentInspectionCard, __assign({ inspection: inspection, onClose: closeCard }, other)))] })) })));
|
779
|
+
return (jsx(MapOverlay, __assign({ map: map, position: inspection.location }, { children: jsxs(StyledWrapper, __assign({ ref: ref }, { children: [jsx(ApartmentInspectionPoint, { date: inspection.date, apartment: inspection.apartment, isActive: isOpen, onClick: toggleCard }), isOpen && (jsx(ApartmentInspectionCard, __assign({ inspection: inspection, onClose: closeCard }, other)))] })) })));
|
779
780
|
};
|
780
781
|
var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
781
782
|
var templateObject_1;
|