@dhis2/analytics 26.6.4 → 26.6.5
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.
|
@@ -109,6 +109,11 @@ const InterpretationModal = _ref2 => {
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
}, [interpretationId, refetch]);
|
|
112
|
+
const filters = (0, _react.useMemo)(() => {
|
|
113
|
+
return {
|
|
114
|
+
relativePeriodDate: interpretation === null || interpretation === void 0 ? void 0 : interpretation.created
|
|
115
|
+
};
|
|
116
|
+
}, [interpretation === null || interpretation === void 0 ? void 0 : interpretation.created]);
|
|
112
117
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loadingInProgress && /*#__PURE__*/_react.default.createElement(_ui.Layer, null, /*#__PURE__*/_react.default.createElement(_ui.CenteredContent, null, /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, null))), /*#__PURE__*/_react.default.createElement(_ui.Modal, {
|
|
113
118
|
fluid: true,
|
|
114
119
|
onClose: handleClose,
|
|
@@ -135,12 +140,11 @@ const InterpretationModal = _ref2 => {
|
|
|
135
140
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
136
141
|
className: _style.default.dynamic([["2014146191", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]]) + " " + "visualisation-wrap"
|
|
137
142
|
}, /*#__PURE__*/_react.default.createElement(VisualizationPlugin, {
|
|
138
|
-
filters:
|
|
139
|
-
relativePeriodDate: interpretation.created
|
|
140
|
-
},
|
|
143
|
+
filters: filters,
|
|
141
144
|
visualization: visualization,
|
|
142
145
|
onResponsesReceived: onResponsesReceived,
|
|
143
146
|
displayProperty: (_currentUser$settings = currentUser.settings) === null || _currentUser$settings === void 0 ? void 0 : _currentUser$settings.keyAnalysisDisplayProperty,
|
|
147
|
+
isInModal: true,
|
|
144
148
|
className: _style.default.dynamic([["2014146191", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]])
|
|
145
149
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
146
150
|
className: _style.default.dynamic([["2014146191", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]]) + " " + "thread-wrap"
|
|
@@ -4,7 +4,7 @@ import i18n from '@dhis2/d2-i18n';
|
|
|
4
4
|
import { Modal, ModalActions, ModalContent, NoticeBox, Button, spacers, colors, Layer, CenteredContent, CircularLoader } from '@dhis2/ui';
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import React, { useEffect, useState, useMemo } from 'react';
|
|
8
8
|
import { InterpretationThread } from './InterpretationThread.js';
|
|
9
9
|
import { useModalContentWidth } from './useModalContentWidth.js';
|
|
10
10
|
const modalCSS = {
|
|
@@ -100,6 +100,11 @@ const InterpretationModal = _ref2 => {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
}, [interpretationId, refetch]);
|
|
103
|
+
const filters = useMemo(() => {
|
|
104
|
+
return {
|
|
105
|
+
relativePeriodDate: interpretation === null || interpretation === void 0 ? void 0 : interpretation.created
|
|
106
|
+
};
|
|
107
|
+
}, [interpretation === null || interpretation === void 0 ? void 0 : interpretation.created]);
|
|
103
108
|
return /*#__PURE__*/React.createElement(React.Fragment, null, loadingInProgress && /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(CenteredContent, null, /*#__PURE__*/React.createElement(CircularLoader, null))), /*#__PURE__*/React.createElement(Modal, {
|
|
104
109
|
fluid: true,
|
|
105
110
|
onClose: handleClose,
|
|
@@ -126,12 +131,11 @@ const InterpretationModal = _ref2 => {
|
|
|
126
131
|
}, /*#__PURE__*/React.createElement("div", {
|
|
127
132
|
className: _JSXStyle.dynamic([["2014146191", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]]) + " " + "visualisation-wrap"
|
|
128
133
|
}, /*#__PURE__*/React.createElement(VisualizationPlugin, {
|
|
129
|
-
filters:
|
|
130
|
-
relativePeriodDate: interpretation.created
|
|
131
|
-
},
|
|
134
|
+
filters: filters,
|
|
132
135
|
visualization: visualization,
|
|
133
136
|
onResponsesReceived: onResponsesReceived,
|
|
134
137
|
displayProperty: (_currentUser$settings = currentUser.settings) === null || _currentUser$settings === void 0 ? void 0 : _currentUser$settings.keyAnalysisDisplayProperty,
|
|
138
|
+
isInModal: true,
|
|
135
139
|
className: _JSXStyle.dynamic([["2014146191", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]])
|
|
136
140
|
})), /*#__PURE__*/React.createElement("div", {
|
|
137
141
|
className: _JSXStyle.dynamic([["2014146191", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]]) + " " + "thread-wrap"
|