io-sanita-theme 2.31.0 → 2.31.2
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
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.31.2](https://github.com/RedTurtle/io-sanita-theme/compare/2.31.1...2.31.2) (2026-05-29)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* responsabile custom in UO (per sync) ([#148](https://github.com/RedTurtle/io-sanita-theme/issues/148)) ([a169a70](https://github.com/RedTurtle/io-sanita-theme/commit/a169a709a524bdca51696c4fd4669bdf45ec98c0))
|
|
8
|
+
|
|
9
|
+
## [2.31.1](https://github.com/RedTurtle/io-sanita-theme/compare/2.31.0...2.31.1) (2026-05-29)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* gelocation edge cases ([#146](https://github.com/RedTurtle/io-sanita-theme/issues/146)) ([0ec2a50](https://github.com/RedTurtle/io-sanita-theme/commit/0ec2a509ba4098cdce3932145a11c4596313ddec))
|
|
14
|
+
|
|
3
15
|
## [2.31.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.30.2...2.31.0) (2026-05-28)
|
|
4
16
|
|
|
5
17
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl';
|
|
3
|
-
import { RichTextSection } from 'io-sanita-theme/helpers';
|
|
3
|
+
import { RichTextSection, richTextHasContent, RichText } from 'io-sanita-theme/helpers';
|
|
4
4
|
import { CardPersona } from 'io-sanita-theme/components';
|
|
5
5
|
import { Row, Col } from 'design-react-kit';
|
|
6
6
|
|
|
@@ -13,8 +13,11 @@ const messages = defineMessages({
|
|
|
13
13
|
|
|
14
14
|
const UOResponsabile = ({ content }) => {
|
|
15
15
|
const intl = useIntl();
|
|
16
|
+
const has_richTextContent = richTextHasContent(
|
|
17
|
+
content?.responsabile_correlato_text,
|
|
18
|
+
);
|
|
16
19
|
|
|
17
|
-
return content?.responsabile_correlato?.length > 0 ? (
|
|
20
|
+
return content?.responsabile_correlato?.length > 0 || has_richTextContent ? (
|
|
18
21
|
<RichTextSection
|
|
19
22
|
tag_id="responsabile"
|
|
20
23
|
title={intl.formatMessage(messages.responsabile)}
|
|
@@ -28,10 +31,17 @@ const UOResponsabile = ({ content }) => {
|
|
|
28
31
|
);
|
|
29
32
|
})}
|
|
30
33
|
</Row>
|
|
31
|
-
|
|
34
|
+
{/* Contenuto testuale alternativo, usato ad esempio con il sync virtualdesk */}
|
|
35
|
+
{has_richTextContent && (
|
|
36
|
+
<div className="richtext-blocks font-serif">
|
|
37
|
+
<RichText data={content?.responsabile_correlato_text} />
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
</RichTextSection>
|
|
32
41
|
) : (
|
|
33
42
|
<></>
|
|
34
43
|
);
|
|
44
|
+
|
|
35
45
|
};
|
|
36
46
|
|
|
37
47
|
export default UOResponsabile;
|
package/src/helpers/Item/item.js
CHANGED
|
@@ -36,7 +36,12 @@ export const getItemIcon = (item) => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export const hasGeolocation = (item) => {
|
|
39
|
-
if (
|
|
39
|
+
if (
|
|
40
|
+
item &&
|
|
41
|
+
item.geolocation &&
|
|
42
|
+
item?.geolocation?.latitude !== 0 &&
|
|
43
|
+
item?.geolocation?.longitude !== 0
|
|
44
|
+
) {
|
|
40
45
|
return true;
|
|
41
|
-
}
|
|
46
|
+
}
|
|
42
47
|
};
|