From f4ec297e3e5a5b2ec7cfc60b96fa73565c202de7 Mon Sep 17 00:00:00 2001
From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com>
Date: Mon, 23 Oct 2023 12:31:04 +0200
Subject: [PATCH] fix: fixed requiredBlocks config with spread and added
controls in EventView props (#374)
---
.../ItaliaTheme/View/EventoView/EventoCosE.jsx | 11 +++++++++--
.../View/EventoView/EventoUlterioriInformazioni.jsx | 6 +++---
src/config/italiaConfig.js | 4 +---
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx b/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx
index cb58ca601..f1e670518 100644
--- a/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx
+++ b/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx
@@ -12,6 +12,7 @@ import {
richTextHasContent,
Gallery,
} from 'design-comuni-plone-theme/components/ItaliaTheme/View';
+import { contentFolderHasItems } from 'design-comuni-plone-theme/helpers';
const messages = defineMessages({
cos_e: {
@@ -36,7 +37,11 @@ const messages = defineMessages({
const EventoCosE = ({ content }) => {
const intl = useIntl();
- return (
+ return richTextHasContent(content?.descrizione_estesa) ||
+ contentFolderHasItems(content, 'immagini') ||
+ contentFolderHasItems(content, 'video') ||
+ content?.persone_amministrazione?.length > 0 ||
+ richTextHasContent(content?.descrizione_destinatari) ? (
{intl.formatMessage(messages.parteciperanno)}
- {content.persone_amministrazione.map((item, i) => (
+ {content?.persone_amministrazione?.map((item, i) => (