@eeacms/volto-clms-theme 1.1.127 → 1.1.128
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/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [1.1.
|
|
7
|
+
### [1.1.128](https://github.com/eea/volto-clms-theme/compare/1.1.127...1.1.128) - 25 March 2024
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- eslint [Mikel Larreategi - [`46467f3`](https://github.com/eea/volto-clms-theme/commit/46467f3d83364a7c6609b26b5329a08c967d4cb3)]
|
|
12
|
+
- import [Mikel Larreategi - [`bde0dab`](https://github.com/eea/volto-clms-theme/commit/bde0dab20e4655efa43e9213753a4bbf1d2c1dbf)]
|
|
13
|
+
- show production updates [Mikel Larreategi - [`b8f83c7`](https://github.com/eea/volto-clms-theme/commit/b8f83c7cee89193c7f2bf6250fac3f5fb1ad6057)]
|
|
14
|
+
### [1.1.127](https://github.com/eea/volto-clms-theme/compare/1.1.126...1.1.127) - 21 March 2024
|
|
15
|
+
|
|
12
16
|
### [1.1.126](https://github.com/eea/volto-clms-theme/compare/1.1.125...1.1.126) - 21 March 2024
|
|
13
17
|
|
|
14
18
|
### [1.1.125](https://github.com/eea/volto-clms-theme/compare/1.1.124...1.1.125) - 20 March 2024
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { Modal, Segment, Grid, Icon } from 'semantic-ui-react';
|
|
|
7
7
|
import { toast } from 'react-toastify';
|
|
8
8
|
import { Toast } from '@plone/volto/components';
|
|
9
9
|
|
|
10
|
-
import { getUser } from '@plone/volto/actions';
|
|
10
|
+
import { getUser, searchContent } from '@plone/volto/actions';
|
|
11
11
|
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
12
12
|
import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
|
|
13
13
|
import {
|
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
|
|
18
18
|
import { postImportWMSLayers, postImportWMSFields } from '../../actions';
|
|
19
19
|
import { GeonetworkImporterButtons } from './GeonetworkImporterButtons';
|
|
20
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
21
|
+
import { cclDateTimeFormat } from '../CclUtils/dateFormats';
|
|
20
22
|
|
|
21
23
|
import jwtDecode from 'jwt-decode';
|
|
22
24
|
import PropTypes from 'prop-types';
|
|
@@ -95,6 +97,31 @@ const CLMSDatasetDetailView = ({ content, token }) => {
|
|
|
95
97
|
)
|
|
96
98
|
);
|
|
97
99
|
};
|
|
100
|
+
const allSearchSubrequests = useSelector((state) => state.search.subrequests);
|
|
101
|
+
const searchSubrequests = allSearchSubrequests?.[`related-${content.UID}`];
|
|
102
|
+
const libraries = searchSubrequests?.items || [];
|
|
103
|
+
|
|
104
|
+
React.useEffect(() => {
|
|
105
|
+
!searchSubrequests?.loading &&
|
|
106
|
+
!searchSubrequests?.loaded &&
|
|
107
|
+
!searchSubrequests?.error &&
|
|
108
|
+
dispatch(
|
|
109
|
+
searchContent(
|
|
110
|
+
'/',
|
|
111
|
+
{
|
|
112
|
+
portal_type: 'ProductionUpdate',
|
|
113
|
+
associated_datasets: content.UID,
|
|
114
|
+
status: 'active',
|
|
115
|
+
metadata_fields: '_all',
|
|
116
|
+
sort_on: 'effective',
|
|
117
|
+
sort_order: 'reverse',
|
|
118
|
+
b_size: 99999,
|
|
119
|
+
},
|
|
120
|
+
`${'related'}-${content.UID}`,
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
124
|
+
}, []);
|
|
98
125
|
|
|
99
126
|
return (
|
|
100
127
|
<div className="ccl-container ">
|
|
@@ -351,7 +378,6 @@ const CLMSDatasetDetailView = ({ content, token }) => {
|
|
|
351
378
|
</CclButton>
|
|
352
379
|
</div>
|
|
353
380
|
)}
|
|
354
|
-
|
|
355
381
|
{(content?.metadata_wms_url ||
|
|
356
382
|
content?.metadata_wmts_url ||
|
|
357
383
|
content?.metadata_rest_api_url) && (
|
|
@@ -365,6 +391,27 @@ const CLMSDatasetDetailView = ({ content, token }) => {
|
|
|
365
391
|
/>
|
|
366
392
|
</div>
|
|
367
393
|
)}
|
|
394
|
+
|
|
395
|
+
{libraries && libraries.length > 0 && (
|
|
396
|
+
<>
|
|
397
|
+
<Segment>
|
|
398
|
+
<h3>Production updates</h3>
|
|
399
|
+
|
|
400
|
+
{libraries.map((item) => {
|
|
401
|
+
const show_dt = cclDateTimeFormat(item.effective);
|
|
402
|
+
return (
|
|
403
|
+
<Segment basic>
|
|
404
|
+
{show_dt} <br />
|
|
405
|
+
<UniversalLink item={item}>{item.title}</UniversalLink>
|
|
406
|
+
</Segment>
|
|
407
|
+
);
|
|
408
|
+
})}
|
|
409
|
+
<UniversalLink href="/en/production-updates">
|
|
410
|
+
See all or subscribe to production updates
|
|
411
|
+
</UniversalLink>
|
|
412
|
+
</Segment>
|
|
413
|
+
</>
|
|
414
|
+
)}
|
|
368
415
|
</nav>
|
|
369
416
|
</div>
|
|
370
417
|
</CclTabs>
|